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]
Message-ID: <65b8f7e4-358f-4943-8ce0-c28e4c947016@web.de>
Date: Tue, 20 Aug 2024 07:56:04 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Stuart Hayhurst <stuart.a.hayhurst@...il.com>,
 linux-input@...r.kernel.org, kernel-janitors@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
 Benjamin Tissoires <bentiss@...nel.org>, Jiri Kosina <jikos@...nel.org>
Subject: Re: [v2] HID: corsair-void: Add Corsair Void headset family driver

>> * Would you like to reduce scopes for such local variables?
>
> I thought the kernel programming style put the local variables at the
> start of the function?

This was the case for a while.

Increasing applications of scope-based resource management provide
further opportunities for smaller scopes according to some local variables,
don't they?


>> Can such a size determination be explained better?
>
> Well it allocates 3 bytes and immediately fills them, so I'm not sure
> what I'd write except stating the obvious.
> Unless you mean why it has to be allocated rather than just using the stack?

How do you think about to collaborate with other data structures
than character arrays?

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.11-rc4#n953


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ