[TEST PATCH] staging: emxx_udc: emxx_udc.c Avoid CamelCase

Walt Feasel waltfeasel at gmail.com
Sat Nov 26 12:03:13 EST 2016


On Sat, Nov 26, 2016 at 12:04:46PM +0100, Greg KH wrote:
> On Tue, Nov 22, 2016 at 12:27:48AM -0500, Walt Feasel wrote:
> > Make suggested checkpatch modification for
> > CHECK: Avoid CamelCase
> > 
> > Signed-off-by: Walt Feasel <waltfeasel at gmail.com>
> > ---
> > So here is another example of warnings I have been avoiding.
> > I have taken every string I found not in quotations or all capitals
> > and made them all lowercase.
> > There were far more instances then checkpatch warned of.
> > Are there instances when this mixed case use is acceptable?
> > I have tried to search for reference to this and could not find
> > anything other than fix it. The conversations in mailing list
> > saying to look in the CodingStyle file under Documents did not
> > help. I even did a search for 'camel', 'Camel','CamelCase',
> > 'Camel_Case', etc...
> > Will other files be trying use the instances of CamelCase
> > I have just changed?
> > 
> >  drivers/staging/emxx_udc/emxx_udc.c | 524 ++++++++++++++++++------------------
> >  1 file changed, 262 insertions(+), 262 deletions(-)
> > 
> > diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> > index 3f42fa8..7624c2d 100644
> > --- a/drivers/staging/emxx_udc/emxx_udc.c
> > +++ b/drivers/staging/emxx_udc/emxx_udc.c
> > @@ -152,15 +152,15 @@ static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req)
> >  
> >  	udc = (struct nbu2ss_udc *)_req->context;
> >  	p_ctrl = &udc->ctrl;
> > -	if ((p_ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
> > -		if (p_ctrl->bRequest == USB_REQ_SET_FEATURE) {
> > +	if ((p_ctrl->brequesttype & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
> 
> Unfortunately changes like this aren't ok, as these names are coming
> straight from the USB spec, so we need to keep them the same.  So I'd
> hold off on changing variable names unless you know exactly where they
> came from, sorry.
> 
Thank you I will look into it.
> thanks,
> 
> greg k-h



More information about the Kernelnewbies mailing list