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: <6082d343f18a40229df83e3102e7dc38@AcuMS.aculab.com>
Date:   Mon, 28 Mar 2022 12:21:04 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Kalle Valo' <kvalo@...nel.org>,
        Larry Finger <Larry.Finger@...inger.net>
CC:     Benjamin Stürz <benni@...erz.xyz>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "sebastian.hesselbarth@...il.com" <sebastian.hesselbarth@...il.com>,
        "gregory.clement@...tlin.com" <gregory.clement@...tlin.com>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "linux@...tec.co.uk" <linux@...tec.co.uk>,
        "krzk@...nel.org" <krzk@...nel.org>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "robert.moore@...el.com" <robert.moore@...el.com>,
        "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
        "lenb@...nel.org" <lenb@...nel.org>,
        "3chas3@...il.com" <3chas3@...il.com>,
        "laforge@...monks.org" <laforge@...monks.org>,
        "arnd@...db.de" <arnd@...db.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "james.morse@....com" <james.morse@....com>,
        "rric@...nel.org" <rric@...nel.org>,
        "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
        "brgl@...ev.pl" <brgl@...ev.pl>,
        "mike.marciniszyn@...nelisnetworks.com" 
        <mike.marciniszyn@...nelisnetworks.com>,
        "dennis.dalessandro@...nelisnetworks.com" 
        <dennis.dalessandro@...nelisnetworks.com>,
        "jgg@...pe.ca" <jgg@...pe.ca>, "pali@...nel.org" <pali@...nel.org>,
        "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
        "isdn@...ux-pingi.de" <isdn@...ux-pingi.de>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "fbarrat@...ux.ibm.com" <fbarrat@...ux.ibm.com>,
        "ajd@...ux.ibm.com" <ajd@...ux.ibm.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "nico@...xnic.net" <nico@...xnic.net>,
        "loic.poulain@...aro.org" <loic.poulain@...aro.org>,
        "pkshih@...ltek.com" <pkshih@...ltek.com>,
        "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-samsung-soc@...r.kernel.org" 
        <linux-samsung-soc@...r.kernel.org>,
        "linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "devel@...ica.org" <devel@...ica.org>,
        "linux-atm-general@...ts.sourceforge.net" 
        <linux-atm-general@...ts.sourceforge.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "wcn36xx@...ts.infradead.org" <wcn36xx@...ts.infradead.org>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>
Subject: RE: [PATCH 21/22] rtw89: Replace comments with C99 initializers

From: Kalle Valo
> Sent: 28 March 2022 10:29
> 
> Larry Finger <Larry.Finger@...inger.net> writes:
> 
> > On 3/26/22 11:59, Benjamin Stürz wrote:
> >> This replaces comments with C99's designated
> >> initializers because the kernel supports them now.
> >>
> >> Signed-off-by: Benjamin Stürz <benni@...erz.xyz>
> >> ---
> >>   drivers/net/wireless/realtek/rtw89/coex.c | 40 +++++++++++------------
> >>   1 file changed, 20 insertions(+), 20 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
> >> index 684583955511..3c83a0bfb120 100644
> >> --- a/drivers/net/wireless/realtek/rtw89/coex.c
> >> +++ b/drivers/net/wireless/realtek/rtw89/coex.c
> >> @@ -97,26 +97,26 @@ static const struct rtw89_btc_fbtc_slot s_def[] = {
> >>   };
> >>     static const u32 cxtbl[] = {
> >> -	0xffffffff, /* 0 */
> >> -	0xaaaaaaaa, /* 1 */
> >> -	0x55555555, /* 2 */
> >> -	0x66555555, /* 3 */
> >> -	0x66556655, /* 4 */
> >> -	0x5a5a5a5a, /* 5 */
> >> -	0x5a5a5aaa, /* 6 */
> >> -	0xaa5a5a5a, /* 7 */
> >> -	0x6a5a5a5a, /* 8 */
> >> -	0x6a5a5aaa, /* 9 */
> >> -	0x6a5a6a5a, /* 10 */
> >> -	0x6a5a6aaa, /* 11 */
> >> -	0x6afa5afa, /* 12 */
> >> -	0xaaaa5aaa, /* 13 */
> >> -	0xaaffffaa, /* 14 */
> >> -	0xaa5555aa, /* 15 */
> >> -	0xfafafafa, /* 16 */
> >> -	0xffffddff, /* 17 */
> >> -	0xdaffdaff, /* 18 */
> >> -	0xfafadafa  /* 19 */
> >> +	[0]  = 0xffffffff,
> >> +	[1]  = 0xaaaaaaaa,
> >> +	[2]  = 0x55555555,
> >> +	[3]  = 0x66555555,
> >> +	[4]  = 0x66556655,
> >> +	[5]  = 0x5a5a5a5a,
> >> +	[6]  = 0x5a5a5aaa,
> >> +	[7]  = 0xaa5a5a5a,
> >> +	[8]  = 0x6a5a5a5a,
> >> +	[9]  = 0x6a5a5aaa,
> >> +	[10] = 0x6a5a6a5a,
> >> +	[11] = 0x6a5a6aaa,
> >> +	[12] = 0x6afa5afa,
> >> +	[13] = 0xaaaa5aaa,
> >> +	[14] = 0xaaffffaa,
> >> +	[15] = 0xaa5555aa,
> >> +	[16] = 0xfafafafa,
> >> +	[17] = 0xffffddff,
> >> +	[18] = 0xdaffdaff,
> >> +	[19] = 0xfafadafa
> >>   };
> >>     struct rtw89_btc_btf_tlv {
> >
> >
> > Is this change really necessary? Yes, the entries must be ordered;
> > however, the comment carries that information at very few extra
> > characters. To me, this patch looks like unneeded source churn.
> 
> One small benefit I see is to avoid the comment index being wrong and
> there would be no way to catch that. But otherwise I don't have any
> opinion about this.

If the [nn] are wrong the effect is probably worse.
You really don't want a gap!

Doesn't seem worth using C99 initialisers unless they are
#defines or enum values.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ