* [PATCH] Staging: Commedi: Fixed some warnings reported by checkpatch.pl tool
@ 2010-06-17 7:00 Matti Lammi
2010-06-17 23:06 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Matti Lammi @ 2010-06-17 7:00 UTC (permalink / raw)
To: gregkh, mithlesh, wfp5p, reodge, andrea.gelmini
Cc: devel, linux-kernel, Matti Lammi
Fixed a few "line over 80 characters" warnings. One of those lines were an
actual code line and I don't know if my corresction is sufficent with that
part. This is my third patch.
Signed-off-by: Matti Lammi <mattij.lammi@gmail.com>
---
drivers/staging/comedi/drivers.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 4a29ed7..9dcc5ef 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -118,7 +118,8 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
for (driv = comedi_drivers; driv; driv = driv->next) {
if (!try_module_get(driv->module)) {
printk
- (KERN_INFO "comedi: failed to increment module count, skipping\n");
+ (KERN_INFO "comedi: failed to increment "
+ "module count, skipping\n");
continue;
}
if (driv->num_names) {
@@ -206,8 +207,8 @@ int comedi_driver_unregister(struct comedi_driver *driver)
if (dev->attached && dev->driver == driver) {
if (dev->use_count)
printk
- (KERN_WARNING "BUG! detaching device with use_count=%d\n",
- dev->use_count);
+ (KERN_WARNING "BUG! detaching device "
+ "with use_count=%d\n", dev->use_count);
comedi_device_detach(dev);
}
mutex_unlock(&dev->mutex);
@@ -442,7 +443,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned i;
for (i = 0; i < async->n_buf_pages; ++i) {
if (async->buf_page_list[i].virt_addr) {
- clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));
+ clear_bit(PG_reserved,
+ &(virt_to_page(async->buf_page_list[i].
+ virt_addr)->flags));
if (s->async_dma_dir != DMA_NONE) {
dma_free_coherent(dev->hw_dev,
PAGE_SIZE,
@@ -647,7 +650,8 @@ unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes)
if ((int)(async->buf_write_count + nbytes -
async->buf_write_alloc_count) > 0) {
printk
- (KERN_INFO "comedi: attempted to write-free more bytes than have been write-allocated.\n");
+ (KERN_INFO "comedi: attempted to write-free more "
+ "bytes than have been write-allocated.\n");
nbytes = async->buf_write_alloc_count - async->buf_write_count;
}
async->buf_write_count += nbytes;
@@ -684,7 +688,8 @@ unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes)
if ((int)(async->buf_read_count + nbytes -
async->buf_read_alloc_count) > 0) {
printk(KERN_INFO
- "comedi: attempted to read-free more bytes than have been read-allocated.\n");
+ "comedi: attempted to read-free more bytes "
+ "than have been read-allocated.\n");
nbytes = async->buf_read_alloc_count - async->buf_read_count;
}
async->buf_read_count += nbytes;
--
1.6.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Staging: Commedi: Fixed some warnings reported by checkpatch.pl tool
2010-06-17 7:00 [PATCH] Staging: Commedi: Fixed some warnings reported by checkpatch.pl tool Matti Lammi
@ 2010-06-17 23:06 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2010-06-17 23:06 UTC (permalink / raw)
To: Matti Lammi
Cc: gregkh, mithlesh, wfp5p, reodge, andrea.gelmini, devel, linux-kernel
On Thu, Jun 17, 2010 at 10:00:11AM +0300, Matti Lammi wrote:
> Fixed a few "line over 80 characters" warnings. One of those lines were an
> actual code line and I don't know if my corresction is sufficent with that
> part. This is my third patch.
>
> Signed-off-by: Matti Lammi <mattij.lammi@gmail.com>
> ---
> drivers/staging/comedi/drivers.c | 17 +++++++++++------
> 1 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
> index 4a29ed7..9dcc5ef 100644
> --- a/drivers/staging/comedi/drivers.c
> +++ b/drivers/staging/comedi/drivers.c
> @@ -118,7 +118,8 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
> for (driv = comedi_drivers; driv; driv = driv->next) {
> if (!try_module_get(driv->module)) {
> printk
> - (KERN_INFO "comedi: failed to increment module count, skipping\n");
> + (KERN_INFO "comedi: failed to increment "
> + "module count, skipping\n");
> continue;
> }
> if (driv->num_names) {
> @@ -206,8 +207,8 @@ int comedi_driver_unregister(struct comedi_driver *driver)
> if (dev->attached && dev->driver == driver) {
> if (dev->use_count)
> printk
> - (KERN_WARNING "BUG! detaching device with use_count=%d\n",
> - dev->use_count);
> + (KERN_WARNING "BUG! detaching device "
> + "with use_count=%d\n", dev->use_count);
No, please don't break up printk lines like this. Move the whole thing
to one line and the checkpatch warning will go away.
> comedi_device_detach(dev);
> }
> mutex_unlock(&dev->mutex);
> @@ -442,7 +443,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
> unsigned i;
> for (i = 0; i < async->n_buf_pages; ++i) {
> if (async->buf_page_list[i].virt_addr) {
> - clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));
> + clear_bit(PG_reserved,
> + &(virt_to_page(async->buf_page_list[i].
> + virt_addr)->flags));
Ick, that's not very clean, push the virt_ stuff over a bunch please.
> if (s->async_dma_dir != DMA_NONE) {
> dma_free_coherent(dev->hw_dev,
> PAGE_SIZE,
> @@ -647,7 +650,8 @@ unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes)
> if ((int)(async->buf_write_count + nbytes -
> async->buf_write_alloc_count) > 0) {
> printk
> - (KERN_INFO "comedi: attempted to write-free more bytes than have been write-allocated.\n");
> + (KERN_INFO "comedi: attempted to write-free more "
> + "bytes than have been write-allocated.\n");
Same as above.
> nbytes = async->buf_write_alloc_count - async->buf_write_count;
> }
> async->buf_write_count += nbytes;
> @@ -684,7 +688,8 @@ unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes)
> if ((int)(async->buf_read_count + nbytes -
> async->buf_read_alloc_count) > 0) {
> printk(KERN_INFO
> - "comedi: attempted to read-free more bytes than have been read-allocated.\n");
> + "comedi: attempted to read-free more bytes "
> + "than have been read-allocated.\n");
And again.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-17 23:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-17 7:00 [PATCH] Staging: Commedi: Fixed some warnings reported by checkpatch.pl tool Matti Lammi
2010-06-17 23:06 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®