[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6Q2uoezTfbdpi7OA1V6BPpbSxa73uSdDW0qJGtvQWc-iXinkF0Llmp1kAOSOtTz_3cV2Y2IWtUAXG8lnDLv0-ebS08jwoDYLaOWf9y_KKfE=@protonmail.com>
Date: Fri, 16 Jan 2026 14:45:05 +0000
From: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dave Penkler <dpenkler@...il.com>, Michael Rubin <matchstick@...erthere.org>, Dan Carpenter <dan.carpenter@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/9] gpib: agilent_82350b: Unify *allocate_private
Hi Greg,
On Friday, January 16th, 2026 at 08:36, Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
>
>
> On Tue, Jan 13, 2026 at 07:08:43PM +0000, Dominik Karol Piątkowski wrote:
>
> > Return values for *allocate_private functions as well as calling code in
> > gpib driver are all over the place. Unify them by returning -errno if
> > something fails, zero otherwise. Use the returned value as early return
> > value in case of error.
> >
> > Signed-off-by: Dominik Karol Piątkowski dominik.karol.piatkowski@...tonmail.com
> > ---
> > drivers/gpib/agilent_82350b/agilent_82350b.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpib/agilent_82350b/agilent_82350b.c b/drivers/gpib/agilent_82350b/agilent_82350b.c
> > index 01a5bb43cd2d..f5f102863e47 100644
> > --- a/drivers/gpib/agilent_82350b/agilent_82350b.c
> > +++ b/drivers/gpib/agilent_82350b/agilent_82350b.c
> > @@ -599,8 +599,9 @@ static int agilent_82350b_generic_attach(struct gpib_board *board,
> >
> > board->status = 0;
> >
> > - if (agilent_82350b_allocate_private(board))
> > - return -ENOMEM;
> > + retval = agilent_82350b_allocate_private(board);
> > + if (retval < 0)
> > + return retval;
>
>
> This should be:
> if (retval)
> return retval;
>
> right?
This is even better, thank you!
>
> And the function only returns either 0 or -ENOMEM, so your changelog
> text is not correct.
Right, I will differentiate the changelog based on actual per-patch changes
instead of describing overall unification effort, which I admit wasn't the
best idea. Thank you for pointing that out!
I will also break the patches into smaller pieces as advised in another
mail, as there are indeed some patches that do more than one logical thing
(for example, v2 11/12).
Thanks,
Dominik Karol
>
> thanks,
>
> greg k-h
Powered by blists - more mailing lists