On Wed, Mar 26, 2003 at 11:48:59PM +1200, Bill Ryder wrote:
> Because Greg wanted more smaller patches:
Thanks.
> +// Read speed increase - start
> + /* increase the size of read buffers */
> +#define BUFSZ 512
> + if( port->bulk_in_buffer != NULL)
> + {
> + kfree(port->bulk_in_buffer);
> + port->bulk_in_buffer = kmalloc( BUFSZ, GFP_KERNEL);
> + port->read_urb->transfer_buffer = port->bulk_in_buffer;
> + port->read_urb->transfer_buffer_length = BUFSZ;
> + }
> +// Read speed increase --end
Why the "//" lines? Are they really needed anymore?
And the if statement is using the wrong {} style.
> + int packet_offset;
> +#define PKTSZ 64
> + if( urb->number_of_packets > 0 )
> + {
> + err("%s transfer_buffer_length %d actual_length %d number of packets
> %d",__FUNCTION__,
> + urb->transfer_buffer_length, urb->actual_length,
> urb->number_of_packets );
> + err("%s transfer_flags %x USB_QUEUE_BULK %x ",
> __FUNCTION__,urb->transfer_flags, USB_QUEUE_BULK );
> + }
> +
Again with the {}.
Also, why a #define right next to the code? Seems odd.
> + for(packet_offset=0; packet_offset < urb->actual_length; packet_offset +=
> PKTSZ )
> + {
> +
Again with the {
> /* Compare new line status to the old one, signal if different */
> if (priv != NULL) {
> - char new_status = data[0] & FTDI_STATUS_B0_MASK;
> + char new_status = data[packet_offset+0] & FTDI_STATUS_B0_MASK;
> if (new_status != priv->prev_status) {
> priv->diff_status |= new_status ^ priv->prev_status;
> wake_up_interruptible(&priv->delta_msr_wait);
> @@ -1237,25 +1271,27 @@
> /* errors on a packet - the order here sets the priority the */
> /* error is returned to the tty layer */
>
> - if ( data[1] & FTDI_RS_OE ) {
> + if ( data[packet_offset+1] & FTDI_RS_OE ) {
Why indent only the if line? Looks like the rest of the block should
also be indented.
> error_flag = TTY_OVERRUN;
> dbg("OVERRRUN error");
Mixing tabs and spaces, please convert everything to tabs.
> }
> #endif
> + } /* "for(packet_offset=0..." */
Again, wrong indent levels.
So, minor whitespace cleanups and then the patch will look just fine.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel