* [patch 1/3] hci_usb: do not initialize static variables to 0
@ 2008-04-18 20:46 akpm
2008-04-18 21:04 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2008-04-18 20:46 UTC (permalink / raw)
To: marcel; +Cc: hidave.darkstar, linux-bluetooth, netdev, akpm, pavel, pavel
From: Pavel Machek <pavel@ucw.cz>
hci_usb: do not initialize static variables to 0.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/bluetooth/hci_usb.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff -puN drivers/bluetooth/hci_usb.c~hci_usb-do-not-initialize-static-variables-to-0 drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c~hci_usb-do-not-initialize-static-variables-to-0
+++ a/drivers/bluetooth/hci_usb.c
@@ -62,13 +62,13 @@
#define URB_ZERO_PACKET 0
#endif
-static int ignore = 0;
-static int ignore_dga = 0;
-static int ignore_csr = 0;
-static int ignore_sniffer = 0;
-static int disable_scofix = 0;
-static int force_scofix = 0;
-static int reset = 0;
+static int ignore;
+static int ignore_dga;
+static int ignore_csr;
+static int ignore_sniffer;
+static int disable_scofix;
+static int force_scofix;
+static int reset;
#ifdef CONFIG_BT_HCIUSB_SCO
static int isoc = 2;
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/3] hci_usb: do not initialize static variables to 0
2008-04-18 20:46 [patch 1/3] hci_usb: do not initialize static variables to 0 akpm
@ 2008-04-18 21:04 ` Marcel Holtmann
2008-04-19 16:12 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2008-04-18 21:04 UTC (permalink / raw)
To: akpm; +Cc: hidave.darkstar, linux-bluetooth, netdev, pavel, pavel
Hi Andrew,
> hci_usb: do not initialize static variables to 0.
>
> Signed-off-by: Pavel Machek <pavel@suse.cz>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Dave Young <hidave.darkstar@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/bluetooth/hci_usb.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff -puN drivers/bluetooth/hci_usb.c~hci_usb-do-not-initialize-
> static-variables-to-0 drivers/bluetooth/hci_usb.c
> --- a/drivers/bluetooth/hci_usb.c~hci_usb-do-not-initialize-static-
> variables-to-0
> +++ a/drivers/bluetooth/hci_usb.c
> @@ -62,13 +62,13 @@
> #define URB_ZERO_PACKET 0
> #endif
>
> -static int ignore = 0;
> -static int ignore_dga = 0;
> -static int ignore_csr = 0;
> -static int ignore_sniffer = 0;
> -static int disable_scofix = 0;
> -static int force_scofix = 0;
> -static int reset = 0;
> +static int ignore;
> +static int ignore_dga;
> +static int ignore_csr;
> +static int ignore_sniffer;
> +static int disable_scofix;
> +static int force_scofix;
> +static int reset;
I know that some people don't like to do it and I agree, but in case
of module parameters, I prefer to have them clearly indicate what the
default value is. It is a lot easier to read for other people looking
at the code. So that one is a NAK from my side.
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/3] hci_usb: do not initialize static variables to 0
2008-04-18 21:04 ` Marcel Holtmann
@ 2008-04-19 16:12 ` Pavel Machek
[not found] ` <20080419161245.GA1577-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2008-04-19 16:12 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: akpm, hidave.darkstar, linux-bluetooth, netdev
On Fri 2008-04-18 23:04:57, Marcel Holtmann wrote:
> Hi Andrew,
>
>> hci_usb: do not initialize static variables to 0.
>>
>> Signed-off-by: Pavel Machek <pavel@suse.cz>
>> Cc: Marcel Holtmann <marcel@holtmann.org>
>> Cc: Dave Young <hidave.darkstar@gmail.com>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>> ---
>>
>> drivers/bluetooth/hci_usb.c | 14 +++++++-------
>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff -puN
>> drivers/bluetooth/hci_usb.c~hci_usb-do-not-initialize-static-variables-to-0
>> drivers/bluetooth/hci_usb.c
>> ---
>> a/drivers/bluetooth/hci_usb.c~hci_usb-do-not-initialize-static-variables-to-0
>> +++ a/drivers/bluetooth/hci_usb.c
>> @@ -62,13 +62,13 @@
>> #define URB_ZERO_PACKET 0
>> #endif
>>
>> -static int ignore = 0;
>> -static int ignore_dga = 0;
>> -static int ignore_csr = 0;
>> -static int ignore_sniffer = 0;
>> -static int disable_scofix = 0;
>> -static int force_scofix = 0;
>> -static int reset = 0;
>> +static int ignore;
>> +static int ignore_dga;
>> +static int ignore_csr;
>> +static int ignore_sniffer;
>> +static int disable_scofix;
>> +static int force_scofix;
>> +static int reset;
>
> I know that some people don't like to do it and I agree, but in case of
> module parameters, I prefer to have them clearly indicate what the default
> value is. It is a lot easier to read for other people looking at the code.
> So that one is a NAK from my side.
According to you noone should read this one, anyway :-)... and this
wastes space in vmlinux.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/3] hci_usb: do not initialize static variables to 0
[not found] ` <20080419161245.GA1577-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2008-04-20 1:14 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-04-20 1:14 UTC (permalink / raw)
To: pavel-+ZI9xUNit7I
Cc: marcel-kz+m5ild9QBg9hUCZPvPmw,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
hidave.darkstar-Re5JQEeQqe8AvxtiuMwx3w,
linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
Date: Sat, 19 Apr 2008 18:12:45 +0200
> According to you noone should read this one, anyway :-)... and this
> wastes space in vmlinux.
This is getting rediculious :-)
I've applied this patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-20 1:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 20:46 [patch 1/3] hci_usb: do not initialize static variables to 0 akpm
2008-04-18 21:04 ` Marcel Holtmann
2008-04-19 16:12 ` Pavel Machek
[not found] ` <20080419161245.GA1577-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2008-04-20 1:14 ` David Miller
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).