LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:STAGING SUBSYSTEM" <linux-staging@lists.linux.dev>,
	open list <linux-kernel@vger.kernel.org>,
	Pavel Skripkin <paskripkin@gmail.com>
Subject: Re: [PATCH RFC] staging: r8188eu: Use usb_control_msg_recv/send() in usbctrl_vendorreq()
Date: Tue, 24 Aug 2021 02:20:29 +0200	[thread overview]
Message-ID: <1935919.xT9xXRIY7p@localhost.localdomain> (raw)
In-Reply-To: <7ce23fb2-3c8b-352e-1f2e-421ac7c64200@gmail.com>

On Monday, August 23, 2021 1:05:17 PM CEST Pavel Skripkin wrote:
> On 8/23/21 1:47 PM, Fabio M. De Francesco wrote:
> >
> > [...]
> >
> >> I think, we can pass REALTEK_USB_VENQT_{READ,WRITE} directly as 
> >> requesttype argument and get rid of u8 reqtype. + we can define these 
> >> macros:
> >> 
> >> #define
> >> usbctrl_vendor_read(...)   usbctrl_vendorreq(...,REALTEK_USB_VENQT_READ)
> >> 
> >> #define
> >> usbctrl_vendor_write()    usbctrl_vendorreq(...,REALTEK_USB_VENQT_WRITE)
> >> 
> >> This will make code more nice, IMO  :)
> > 
> > Dear Pavel,
> > 
> > I agree in full: nicer and cleaner :)
> > 
> > I'll do that, but please notice that I will also need to change the code of the three
> > usb_read*() for calling usbctrl_vendor_read(). Furthermore, "else res = 0;" becomes
> > unnecessary. Please take these changes into account when you'll send them again
> > as "regular" patches.

I have reconsidered the tip above and, while I appreciate your suggestion, I think it's 
not so necessary to use the macros only to get rid of "u8 reqtype".  I finally got rid of 
that variable by passing the request types explicitly to usb_control_msg_recv/send().

> It depends on which patch will go in first.
> 
> There are a lot of upcoming clean ups, so I am waiting for merging my 
> series with random clean ups :) A lot of fun...

A lot of fun... Sure? :)
 
> I biggest hope is that my series will go in before camel-case clean ups, 
> because rewriting this for the 3rd time will kill my mind...

 In this case, I wouldn't want to be in your place :)
> 
> With regards,
> Pavel Skripkin

Thanks again very much for your review,

Fabio





  reply	other threads:[~2021-08-24  0:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 23:02 Fabio M. De Francesco
2021-08-23  8:11 ` Pavel Skripkin
2021-08-23  8:30   ` Pavel Skripkin
2021-08-23 10:52     ` Fabio M. De Francesco
2021-08-23 10:47   ` Fabio M. De Francesco
2021-08-23 11:05     ` Pavel Skripkin
2021-08-24  0:20       ` Fabio M. De Francesco [this message]
2021-08-23 21:41     ` Phillip Potter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1935919.xT9xXRIY7p@localhost.localdomain \
    --to=fmdefrancesco@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --subject='Re: [PATCH RFC] staging: r8188eu: Use usb_control_msg_recv/send() in usbctrl_vendorreq()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).