Re: [PATCH] USB: xhci: simplify logic of skipping missed isoc TDs

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

 



Hi SaÑÐh,

On Wed, Mar 23, 2011 at 03:10:09PM -0700, Sarah Sharp wrote:
> Hi Dmitry,
> 
> Can you please respin this patch to not include initialization in
> variable declarations?  In general, I'd like to avoid anything but
> simple initialization for things like setting return values to 0 or
> pointers to NULL, although I know some of the code in the xHCI driver is
> not consistent about that.
> 
> I especially want to avoid initialization-during-declaration lines that
> include function calls, because it makes it really hard to notice what's
> happening in the code.

I really do not seemuch difference between:

	struct xhci_ring *ep_ring;
	struct urb_priv *urb_priv;
	int idx;
	struct usb_iso_packet_descriptor *frame;

	ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer);
	urb_priv = td->urb->hcpriv;
	idx = urb_priv->td_cnt;
	frame = &td->urb->iso_frame_desc[idx];

and:

	struct xhci_ring *ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer);
	struct urb_priv *urb_priv = td->urb->hcpriv;
	int idx = urb_priv->td_cnt;
	struct usb_iso_packet_descriptor *frame = &td->urb->iso_frame_desc[idx];

except that former takes twice as many lines on the screen. Such style
is very common in the kernel code. But I guess you are the boss, if you
insist I can change it back.

Thanks,
Dmitry
--
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