Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754724AbYKLU0Y (ORCPT ); Wed, 12 Nov 2008 15:26:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752939AbYKLU0O (ORCPT ); Wed, 12 Nov 2008 15:26:14 -0500 Received: from kroah.org ([198.145.64.141]:53186 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752924AbYKLU0N (ORCPT ); Wed, 12 Nov 2008 15:26:13 -0500 Subject: patch usb-usbtmc-indent-braces-disagree-something-else-is-desired.patch added to gregkh-2.6 tree To: ilpo.jarvinen@helsinki.fi, gregkh@suse.de, linux-kernel@vger.kernel.org From: Date: Wed, 12 Nov 2008 12:25:09 -0800 In-Reply-To: Message-ID: <12265215094096@kroah.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2448 Lines: 77 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" Date: Thu, 30 Oct 2008 13:56:47 +0200 (EET) Subject: USB: usbtmc: indent & braces disagree, something else is desired To: Greg Kroah-Hartman Cc: LKML Message-ID: 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 Signed-off-by: Greg Kroah-Hartman --- 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 #include +#include #include #include #include @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/