lkml.org 
[lkml]   [2021]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 16/19] staging: r8188eu: clean up rtw_read*() and rtw_write*()
Date
On Friday, September 17, 2021 4:45:29 PM CEST Greg Kroah-Hartman wrote:
> On Fri, Sep 17, 2021 at 09:18:34AM +0200, Fabio M. De Francesco wrote:
> > Clean up rtw_read{8,16,32}() and rtw_write{8,16,32,N}() in
usb_ops_linux.c.
> >
> > 1) Rename variables:
> > length => len
> > pio_priv => io_priv
> > pintfhdl => intfhdl
> > wvalue => address.
>
> Wait, why are you changing wvalue? Isn't that the USB name for this
> variable in the USB message sent to the device? Check the USB spec
> before changing this, that is a common field and probably should not be
> changed.

Oh, sorry. This was due to my very limited knowledge of the USB subsystems
and its Core API. So I misunderstood the semantics of this "wvalue" argument
and we'll change it to "value" (just to remove that unnecessary 'w', that I
guess is for "word").

I had thought that the mere knowledge of C and OS kernels (from a theoretical
perspective) would suffice to work on the code that we change in our patches.
Now I understand that such a naive approach is clearly wrong.

I have been too lazy to open your LDD 3rd ed. for reading but now I have
decided that it is time to do it. Furthermore, I have found one more book
about Linux device drivers and I'm about to read also its "Linux USB device
drivers" chapter.

I think that by this evening I'll have some basic knowledge of the USB
subsystem, at least of what is needed to avoid future mistakes like the one
you noticed. :)

Thank you very much for the time you spent reviewing our code and for taking
the first 14 patches,

Fabio

>
> thanks,
>
> greg k-h



\
 
 \ /
  Last update: 2021-09-18 13:43    [W:0.075 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site