lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Oct 2014 09:28:30 +0100
From:	Frans Klaver <fransklaver@...il.com>
To:	Darren Hart <dvhart@...radead.org>
Cc:	Corentin Chary <corentin.chary@...il.com>,
	acpi4asus-user <acpi4asus-user@...ts.sourceforge.net>,
	platform-driver-x86 <platform-driver-x86@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/8] eeepc-laptop: define rfkill notifier nodes only once

On Tue, Oct 28, 2014 at 6:12 AM, Darren Hart <dvhart@...radead.org> wrote:
> On Wed, Oct 22, 2014 at 09:12:38PM +0200, Frans Klaver wrote:
>> The rfkill notifier node names are used in three different places. As a
>> matter of style, it is better to store them somewhere and have the
>> compiler warn us about typos in the function arguments.
>>
>> Signed-off-by: Frans Klaver <fransklaver@...il.com>
>> ---
>>  drivers/platform/x86/eeepc-laptop.c | 22 +++++++++++++---------
>>  1 file changed, 13 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
>> index 6e3be01..e92ea41 100644
>> --- a/drivers/platform/x86/eeepc-laptop.c
>> +++ b/drivers/platform/x86/eeepc-laptop.c
>> @@ -819,11 +819,15 @@ static int eeepc_new_rfkill(struct eeepc_laptop *eeepc,
>>       return 0;
>>  }
>>
>> +static char EEEPC_RFKILL_NODE_1[] = "\\_SB.PCI0.P0P5";
>> +static char EEEPC_RFKILL_NODE_2[] = "\\_SB.PCI0.P0P6";
>> +static char EEEPC_RFKILL_NODE_3[] = "\\_SB.PCI0.P0P7";
>
> So, out of curiosity, any particular reason for static char[] instead of
> #define? I see both used frequently and didn't see any advice in CodingStyle.

My expectation is that this is more likely to produce a smaller
binary, but I have no measurements on that to back me up.

I was a bit annoyed by the fact that the acpi functions take a char*
instead of a const char*. I would have preferred static const char[]
in any case.

Thanks,
Frans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ