Re: [PATCH v7 15/19] staging: r8188eu: clean up usbctrl_vendorreq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, September 17, 2021 4:44:17 PM CEST Greg Kroah-Hartman wrote:
> On Fri, Sep 17, 2021 at 09:18:33AM +0200, Fabio M. De Francesco wrote:
> > Clean up usbctrl_vendoreq() in usb_ops_linux.c.
> > 
> > List of changes:
> > 
> > 1) Rename variables:
> > 	pdata => data
> >         pio_priv => io_priv
> >         pintfhdl => intfhdl
> >         wvalue => address.
> > 2) Reorder variables declarations according to the "Reverse Xmas Tree"
> >    style.
> > 3) Remove unnecessary test for "!pIo_buf".
> > 4) Move comments one line below code.
> > 5) Remove unnecessary excess parentheses.
> > 6) Remove unnecessary extra spaces.
> > 7) Remove unnecessary comments.
> > 8) Fix grammar errors (checksumed => checksummed).
> 
> When you find yourself listing all of the different things you have done
> in a single commit, that is a HUGE hint that you need to break this up
> into smaller pieces.
> 
> Please do so here, this should not be just one change, as it's almost
> impossible to look at this and "know" it's all still the same logic
> happening here.  But if you had broken this down into 8 different
> changes, then it would have been obvious and I could easily have applied
> the changes.

Dear Greg,

My first thought when I read you message was to simply delete this patch 
because usbctrl_vendorreq() is going to be deleted in 18/19. But then I 
rethought of the original purpose behind this patch and (after talking with 
Pavel) we decided to do the task you asked and split this patch into 8 
smaller ones. The only reason is because, as you noticed, we "[]are moving 
code around", so, although I'm not required to clean up code in 
usbctrl_vendorreq(), I'm required to make the new usb_read() and usb_write() 
the cleaner the possible. This preventive clean up helps me a lot.

Obviously I guess that I'm required to split also the next patch of this 
series in 3 because there are also there 3 different kind of clean-ups.

So, we'll have a total of 11 clean-ups.

> 
> I've taken the first 14 patches in this series, it's great work, thank
> you all for doing this.  

Thanks to you for the "great work". We appreciated it.

> But this, and the remaining patches in here
> need to be split up more to make it obvious that the changes are correct
> and should be accepted.  Please feel free to start the numbering of the
> patch series over now, given that the first 14 are now merged into my
> tree.

We're working on this.

Thanks,

Fabio

> 
> thanks,
> 
> greg k-h
> 








[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux