EDAC/mc: Carve out error increment into a separate function
authorRobert Richter <rrichter@marvell.com>
Fri, 14 Feb 2020 14:17:56 +0000 (15:17 +0100)
committerBorislav Petkov <bp@suse.de>
Mon, 17 Feb 2020 12:07:50 +0000 (13:07 +0100)
commit6334dc4e3ff53031a2d522b826c4fab92cfdea93
tree640f3ffa04562aa12c27bd266d562fcf5d9bde4e
parent91b327f6728b0c4dfa089f11a474789854baa0b1
EDAC/mc: Carve out error increment into a separate function

Carve out the error_count increment into a separate function
edac_inc_csrow(). This better separates code and reduces the indentation
level.

Implementation note: The function edac_inc_csrow() counts the same
as before, ->ce_count is only incremented if row >= 0. This is esp.
true for the case of (!e->enable_per_layer_report). Here, a DIMM was
not found, variable row still has a value of -1 and ->ce_count is not
incremented.

 [ bp: Massage commit message. ]

Signed-off-by: Robert Richter <rrichter@marvell.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Aristeu Rozanski <aris@redhat.com>
Link: https://lkml.kernel.org/r/20200214141757.8976-1-rrichter@marvell.com
drivers/edac/edac_mc.c