Re: [PATCH 3/9] pxa27x_udc: cleanup endpoints on configuration changes

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

 



On Tuesday 20 January 2009, Vernon Sauder wrote:
> >> -            if (udc_usb_ep->pxa_ep)
> >> -                    udc_usb_ep->pxa_ep = find_pxa_ep(udc, udc_usb_ep);
> >> +            if (udc_usb_ep->pxa_ep) {
> >> +                    struct pxa_ep *ep = find_pxa_ep(udc, udc_usb_ep);
> >
> > Please, no declaration in code flow. Take that "struct pxa_ep *ep" to the
> > beginning of the function.
> 
> I will correct this. I thought it was OK at the beginning of a new scope.

Variable declarations should always be at top of scope, yes.
So IMO your change was fine in this respect.

Some versions of C allow them later in scope, "in the middle
of code flow".  That's considered bad kernel style at this time.

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux