lkml.org 
[lkml]   [2022]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] staging: r8188eu: convert rtw_set_802_11_add_wep error code semantics
On Sun, Jul 31, 2022 at 10:12:56AM -0700, Joe Perches wrote:
> > I'm happy of course to rewrite this to address any concerns, but
> > I was hoping I could clarify what you've said though? Apologies if I've
> > missed it, but how is this function now returning 1 on success? It sets
> > ret to 0 (success) at the start and then sets it to one of two negative
> > error codes depending on what happens. Am I missing something here?
> > (Perfectly possible that I am).
> >
> > In terms of do nothing gotos, do you mean gotos that just set an error
> > code then jump to the end? If you'd prefer, as the function just returns
> > right after the exit label, I can just return the codes directly and have
> > a 'return 0;' like you say above?
> >
> > Thanks as always for your insight.
>
> Yes, you've got it right.
>
> I think Dan is suggesting something like the below, but
> not necessarily in a single patch:

I always like your style, Joe.

regards,
dan carpenter

\
 
 \ /
  Last update: 2022-08-01 11:19    [W:0.170 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site