EDAC: Unify the mc_event tracepoint call
authorRobert Richter <rrichter@marvell.com>
Wed, 6 Nov 2019 09:33:27 +0000 (09:33 +0000)
committerBorislav Petkov <bp@suse.de>
Sun, 10 Nov 2019 11:40:14 +0000 (12:40 +0100)
commit787d899914aae1c8cdb467931cfd7c369ef8d37b
tree7a374e5daf52e50aa02604d717b26fe5b9697d98
parent501eb40d2b85ae70a617a3b46dbb519fb9c76532
EDAC: Unify the mc_event tracepoint call

The code in ghes_edac.c and edac_mc.c for grain_bits calculation and
calling trace_mc_event() is now the same. Move it to a single location
in edac_raw_mc_handle_error().

The only difference is the missing IS_ENABLED(CONFIG_RAS) switch, but
this is needed for ghes too.

Signed-off-by: Robert Richter <rrichter@marvell.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20191106093239.25517-13-rrichter@marvell.com
drivers/edac/edac_mc.c
drivers/edac/ghes_edac.c