Re: [PATCH v4 1/2] edac: Add an API for edac device to report for multiple errors

From: Robert Richter
Date: Tue Oct 01 2019 - 05:47:25 EST


On 01.10.19 10:32:42, Borislav Petkov wrote:

> ----------------------------------------------------------------------
> On Tue, Oct 01, 2019 at 06:56:58AM +0000, Robert Richter wrote:
> > It is *not* the counterpart. The __* version already has the...
>
> Lemme cut to the chase:
>
> "Make the main workhorse the "count" functions which can log a @count
> of errors. Have the current APIs edac_device_handle_{ce,ue}() call
> the _count() variants and this way keep the exported symbols number
> unchanged."
>
> I want to see exactly *two* pairs of functions:
>
> edac_device_handle_{ce,ue}_count - logs a @count of errors
> edac_device_handle_{ce,ue} - logs a single error
>
> Not three pairs. I.e., the "__" versions are not needed.
>
> > The first patch only adds functionality but keeps the abi. Thus it
> > makes a backport easier.
>
> Works just the same with my version - single backport.

If you move to static inline for edac_device_handle_{ce,ue} the
symbols vanish and this breaks the abi. That's why the split in two
patches.

Your comment to not have a __ version as a third variant of the
interface makes sense to me. But to keep ABI your patch still needs to
be split. The first patch still must contain symbols for
edac_device_handle_{ce,ue}. I am not sure if ABI compatability is
something we want to make easier here. I personally like the approach.

-Robert