LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: <gregkh@suse.de>
To: ilpo.jarvinen@helsinki.fi, gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: patch usb-usbtmc-indent-braces-disagree-something-else-is-desired.patch added to gregkh-2.6 tree
Date: Wed, 12 Nov 2008 12:25:09 -0800	[thread overview]
Message-ID: <12265215094096@kroah.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0810301349460.7072@wrl-59.cs.helsinki.fi>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2203 bytes --]


This is a note to let you know that I've just added the patch titled

    Subject: USB: usbtmc: indent & braces disagree, something else is desired

to my gregkh-2.6 tree.  Its filename is

    usb-usbtmc-indent-braces-disagree-something-else-is-desired.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From ilpo.jarvinen@helsinki.fi  Wed Nov 12 11:29:47 2008
From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Date: Thu, 30 Oct 2008 13:56:47 +0200 (EET)
Subject: USB: usbtmc: indent & braces disagree, something else is desired
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Message-ID: <Pine.LNX.4.64.0810301349460.7072@wrl-59.cs.helsinki.fi>

It seems that there's rather involved way to say something
which is commonly written in a plain simple form.

Some type changes would probably be necessary to get gcc
to do bitops instead of divide but it's no worse after my
change than before I think.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/class/usbtmc.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -21,6 +21,7 @@
 
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/uaccess.h>
 #include <linux/kref.h>
@@ -481,7 +482,6 @@ static ssize_t usbtmc_write(struct file 
 	int retval;
 	int actual;
 	unsigned long int n_bytes;
-	int n;
 	int remaining;
 	int done;
 	int this_part;
@@ -525,11 +525,8 @@ static ssize_t usbtmc_write(struct file 
 			goto exit;
 		}
 
-		n_bytes = 12 + this_part;
-		if (this_part % 4)
-			n_bytes += 4 - this_part % 4;
-			for (n = 12 + this_part; n < n_bytes; n++)
-				buffer[n] = 0;
+		n_bytes = roundup(12 + this_part, 4);
+		memset(buffer + 12 + this_part, 0, n_bytes - (12 + this_part));
 
 		retval = usb_bulk_msg(data->usb_dev,
 				      usb_sndbulkpipe(data->usb_dev,


Patches currently in gregkh-2.6 which might be from ilpo.jarvinen@helsinki.fi are

usb/usb-usbtmc-indent-braces-disagree-something-else-is-desired.patch

      reply	other threads:[~2008-11-12 20:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 11:09 [PATCH 01/10] sound/ice1712: indentation & braces disagree - add braces Ilpo Järvinen
2008-10-30 11:11 ` [PATCH 02/10] consolemap: indentation & braces disagree - reindent Ilpo Järvinen
2008-10-30 11:32 ` [PATCH 03/10] misdn: indentation & braces disagree - add braces Ilpo Järvinen
2008-10-30 11:34 ` [PATCH 04/10] misdn: one handmade ARRAY_SIZE converted Ilpo Järvinen
2008-10-30 11:35 ` [PATCH 05/10] misdn: indentation and braces disagree - add braces Ilpo Järvinen
2008-10-30 11:39 ` [PATCH 07/10] rdma/nes: reindent mis-indented spinlocks Ilpo Järvinen
2008-11-03  5:34   ` Roland Dreier
2008-10-30 11:40 ` [PATCH 01/10] sound/ice1712: indentation & braces disagree - add braces Takashi Iwai
2008-10-30 11:47 ` [PATCH 10/10] arcmsr: add missing braces to multistatement if block Ilpo Järvinen
2008-10-30 11:56 ` [PATCH 06/10] usbtmc: indent & braces disagree, something else is desired Ilpo Järvinen
2008-11-12 20:25   ` gregkh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12265215094096@kroah.org \
    --to=gregkh@suse.de \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: patch usb-usbtmc-indent-braces-disagree-something-else-is-desired.patch added to gregkh-2.6 tree' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).