Re: [PATCH 3/3] drivers: usb: storage: datafab.c: clean up a variety of checkpatch errors.
On Sat, Feb 07, 2015 at 11:42:44PM +0100, Bas Peters wrote: > This patch cleans up a variety of checkpatch errors: > > Bunch of space issues. > C99 comments converted to /* */ format. > Some switch statement indentations. > "foo * bar" -> "foo *bar" > > Signed-off-by: Bas Peters > --- > drivers/usb/storage/datafab.c | 183 > +- > 1 file changed, 93 insertions(+), 90 deletions(-) You are doing multiple things in the same patch, please break this up into one-thing-per-patch and send a patch series for this single file. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] drivers: usb: storage: datafab.c: clean up a variety of checkpatch errors.
On Sat, Feb 07, 2015 at 11:42:44PM +0100, Bas Peters wrote: This patch cleans up a variety of checkpatch errors: Bunch of space issues. C99 comments converted to /* */ format. Some switch statement indentations. foo * bar - foo *bar Signed-off-by: Bas Peters baspeter...@gmail.com --- drivers/usb/storage/datafab.c | 183 +- 1 file changed, 93 insertions(+), 90 deletions(-) You are doing multiple things in the same patch, please break this up into one-thing-per-patch and send a patch series for this single file. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] drivers: usb: storage: datafab.c: clean up a variety of checkpatch errors.
This patch cleans up a variety of checkpatch errors: Bunch of space issues. C99 comments converted to /* */ format. Some switch statement indentations. "foo * bar" -> "foo *bar" Signed-off-by: Bas Peters --- drivers/usb/storage/datafab.c | 183 +- 1 file changed, 93 insertions(+), 90 deletions(-) diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c index 7b17c21..78f867d 100644 --- a/drivers/usb/storage/datafab.c +++ b/drivers/usb/storage/datafab.c @@ -10,7 +10,7 @@ * Many thanks to Robert Baruch for the SanDisk SmartMedia reader driver * which I used as a template for this driver. * - * Some bugfixes and scatter-gather code by Gregory P. Smith + * Some bugfixes and scatter-gather code by Gregory P. Smith * (greg-...@electricrain.com) * * Fix for media change by Joerg Schneider (j...@joergschneider.com) @@ -35,8 +35,8 @@ /* * This driver attempts to support USB CompactFlash reader/writer devices - * based on Datafab USB-to-ATA chips. It was specifically developed for the - * Datafab MDCFE-B USB CompactFlash reader but has since been found to work + * based on Datafab USB-to-ATA chips. It was specifically developed for the + * Datafab MDCFE-B USB CompactFlash reader but has since been found to work * with a variety of Datafab-based devices from a number of manufacturers. * I've received a report of this driver working with a Datafab-based * SmartMedia device though please be aware that I'm personally unable to @@ -153,11 +153,12 @@ static int datafab_read_data(struct us_data *us, unsigned int sg_offset = 0; struct scatterlist *sg = NULL; - // we're working in LBA mode. according to the ATA spec, - // we can support up to 28-bit addressing. I don't know if Datafab - // supports beyond 24-bit addressing. It's kind of hard to test - // since it requires > 8GB CF card. - // + /* we're working in LBA mode. according to the ATA spec, +* we can support up to 28-bit addressing. I don't know if Datafab +* supports beyond 24-bit addressing. It's kind of hard to test +* since it requires > 8GB CF card. +*/ + if (sectors > 0x0FFF) return USB_STOR_TRANSPORT_ERROR; @@ -169,9 +170,10 @@ static int datafab_read_data(struct us_data *us, totallen = sectors * info->ssize; - // Since we don't read more than 64 KB at a time, we have to create - // a bounce buffer and move the data a piece at a time between the - // bounce buffer and the actual transfer buffer. + /* Since we don't read more than 64 KB at a time, we have to create +* a bounce buffer and move the data a piece at a time between the +* bounce buffer and the actual transfer buffer. +*/ alloclen = min(totallen, 65536u); buffer = kmalloc(alloclen, GFP_NOIO); @@ -179,8 +181,9 @@ static int datafab_read_data(struct us_data *us, return USB_STOR_TRANSPORT_ERROR; do { - // loop, never allocate or transfer more than 64k at once - // (min(128k, 255*info->ssize) is the real limit) + /* loop, never allocate or transfer more than 64k at once +* (min(128k, 255*info->ssize) is the real limit) +*/ len = min(totallen, alloclen); thistime = (len / info->ssize) & 0xff; @@ -196,17 +199,17 @@ static int datafab_read_data(struct us_data *us, command[6] = 0x20; command[7] = 0x01; - // send the read command + /* send the read command */ result = datafab_bulk_write(us, command, 8); if (result != USB_STOR_XFER_GOOD) goto leave; - // read the result + /* read the result */ result = datafab_bulk_read(us, buffer, len); if (result != USB_STOR_XFER_GOOD) goto leave; - // Store the data in the transfer buffer + /* Store the data in the transfer buffer */ usb_stor_access_xfer_buf(buffer, len, us->srb, , _offset, TO_XFER_BUF); @@ -237,11 +240,11 @@ static int datafab_write_data(struct us_data *us, unsigned int sg_offset = 0; struct scatterlist *sg = NULL; - // we're working in LBA mode. according to the ATA spec, - // we can support up to 28-bit addressing. I don't know if Datafab - // supports beyond 24-bit addressing. It's kind of hard to test - // since it requires > 8GB CF card. - // + /* we're working in LBA mode. according to the ATA spec, +* we can support up to 28-bit addressing. I don't know if Datafab +* supports beyond 24-bit addressing. It's kind of hard to test +
[PATCH 3/3] drivers: usb: storage: datafab.c: clean up a variety of checkpatch errors.
This patch cleans up a variety of checkpatch errors: Bunch of space issues. C99 comments converted to /* */ format. Some switch statement indentations. foo * bar - foo *bar Signed-off-by: Bas Peters baspeter...@gmail.com --- drivers/usb/storage/datafab.c | 183 +- 1 file changed, 93 insertions(+), 90 deletions(-) diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c index 7b17c21..78f867d 100644 --- a/drivers/usb/storage/datafab.c +++ b/drivers/usb/storage/datafab.c @@ -10,7 +10,7 @@ * Many thanks to Robert Baruch for the SanDisk SmartMedia reader driver * which I used as a template for this driver. * - * Some bugfixes and scatter-gather code by Gregory P. Smith + * Some bugfixes and scatter-gather code by Gregory P. Smith * (greg-...@electricrain.com) * * Fix for media change by Joerg Schneider (j...@joergschneider.com) @@ -35,8 +35,8 @@ /* * This driver attempts to support USB CompactFlash reader/writer devices - * based on Datafab USB-to-ATA chips. It was specifically developed for the - * Datafab MDCFE-B USB CompactFlash reader but has since been found to work + * based on Datafab USB-to-ATA chips. It was specifically developed for the + * Datafab MDCFE-B USB CompactFlash reader but has since been found to work * with a variety of Datafab-based devices from a number of manufacturers. * I've received a report of this driver working with a Datafab-based * SmartMedia device though please be aware that I'm personally unable to @@ -153,11 +153,12 @@ static int datafab_read_data(struct us_data *us, unsigned int sg_offset = 0; struct scatterlist *sg = NULL; - // we're working in LBA mode. according to the ATA spec, - // we can support up to 28-bit addressing. I don't know if Datafab - // supports beyond 24-bit addressing. It's kind of hard to test - // since it requires 8GB CF card. - // + /* we're working in LBA mode. according to the ATA spec, +* we can support up to 28-bit addressing. I don't know if Datafab +* supports beyond 24-bit addressing. It's kind of hard to test +* since it requires 8GB CF card. +*/ + if (sectors 0x0FFF) return USB_STOR_TRANSPORT_ERROR; @@ -169,9 +170,10 @@ static int datafab_read_data(struct us_data *us, totallen = sectors * info-ssize; - // Since we don't read more than 64 KB at a time, we have to create - // a bounce buffer and move the data a piece at a time between the - // bounce buffer and the actual transfer buffer. + /* Since we don't read more than 64 KB at a time, we have to create +* a bounce buffer and move the data a piece at a time between the +* bounce buffer and the actual transfer buffer. +*/ alloclen = min(totallen, 65536u); buffer = kmalloc(alloclen, GFP_NOIO); @@ -179,8 +181,9 @@ static int datafab_read_data(struct us_data *us, return USB_STOR_TRANSPORT_ERROR; do { - // loop, never allocate or transfer more than 64k at once - // (min(128k, 255*info-ssize) is the real limit) + /* loop, never allocate or transfer more than 64k at once +* (min(128k, 255*info-ssize) is the real limit) +*/ len = min(totallen, alloclen); thistime = (len / info-ssize) 0xff; @@ -196,17 +199,17 @@ static int datafab_read_data(struct us_data *us, command[6] = 0x20; command[7] = 0x01; - // send the read command + /* send the read command */ result = datafab_bulk_write(us, command, 8); if (result != USB_STOR_XFER_GOOD) goto leave; - // read the result + /* read the result */ result = datafab_bulk_read(us, buffer, len); if (result != USB_STOR_XFER_GOOD) goto leave; - // Store the data in the transfer buffer + /* Store the data in the transfer buffer */ usb_stor_access_xfer_buf(buffer, len, us-srb, sg, sg_offset, TO_XFER_BUF); @@ -237,11 +240,11 @@ static int datafab_write_data(struct us_data *us, unsigned int sg_offset = 0; struct scatterlist *sg = NULL; - // we're working in LBA mode. according to the ATA spec, - // we can support up to 28-bit addressing. I don't know if Datafab - // supports beyond 24-bit addressing. It's kind of hard to test - // since it requires 8GB CF card. - // + /* we're working in LBA mode. according to the ATA spec, +* we can support up to 28-bit addressing. I don't know if Datafab +* supports beyond 24-bit addressing. It's kind of hard