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 - 02:58:54 EST


On 30.09.19 16:50:46, Borislav Petkov wrote:
> ----------------------------------------------------------------------
> On Mon, Sep 23, 2019 at 08:17:40PM +0100, Hanna Hawa wrote:
> > +void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
> > + int inst_nr, int block_nr, const char *msg)
> > +{
> > + __edac_device_handle_ce(edac_dev, 1, inst_nr, block_nr, msg);
> > +}
> > +EXPORT_SYMBOL_GPL(edac_device_handle_ce);
>
> Eww, I don't like that: exporting the function *and* the __ counterpart.
> The user will get confused and that is unnecessary.

It is *not* the counterpart. The __* version already has the
additional count argument in. There are 2 patches:

1) introduce new function __edac_device_handle_ce/ue() including the
*_count() inline functions, but keep the old symbols (note the
count=1 parameter).

2) remove old symbol edac_device_handle_ce/ue() and replace it with an
inline function to use the counterpart symbol too.

The first patch only adds functionality but keeps the abi. Thus it
makes a backport easier. The 2nd switches completely to the new
function.

-Robert