On Wed, Oct 26, 2016 at 05:58:53PM -0200, Mauro Carvalho Chehab wrote: > If a csrow is not found by edac_mc_find_csrow_by_page(), it > currently returns -1, to mean that the page is invalid. Use > the proper errorcode macro for that (-EINVAL). > > Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> > --- > drivers/edac/edac_mc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c > index c3ee3ad98a63..0438d3a48191 100644 > --- a/drivers/edac/edac_mc.c > +++ b/drivers/edac/edac_mc.c There's a /* FIXME - should return -1 */ which can go too. > @@ -845,7 +845,7 @@ int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, unsigned long page) > int row, i, j, n; > > edac_dbg(1, "MC%d: 0x%lx\n", mci->mc_idx, page); > - row = -1; > + row = -EINVAL; This breaks at least i82975x_process_error_info() which checks for row being -1. And its output gets fed into edac_mc_handle_error() which uses -1 to denote N/A for some layers. IOW, so what if it returns -1? The only thing that needs fixing is removing that FIXME above it. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html