linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Kalle Valo' <kvalo@kernel.org>,
	Larry Finger <Larry.Finger@lwfinger.net>
Cc: "Benjamin Stürz" <benni@stuerz.xyz>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"sebastian.hesselbarth@gmail.com"
	<sebastian.hesselbarth@gmail.com>,
	"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"linux@simtec.co.uk" <linux@simtec.co.uk>,
	"krzk@kernel.org" <krzk@kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"robert.moore@intel.com" <robert.moore@intel.com>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"3chas3@gmail.com" <3chas3@gmail.com>,
	"laforge@gnumonks.org" <laforge@gnumonks.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"tony.luck@intel.com" <tony.luck@intel.com>,
	"james.morse@arm.com" <james.morse@arm.com>,
	"rric@kernel.org" <rric@kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"brgl@bgdev.pl" <brgl@bgdev.pl>,
	"mike.marciniszyn@cornelisnetworks.com"
	<mike.marciniszyn@cornelisnetworks.com>,
	"dennis.dalessandro@cornelisnetworks.com"
	<dennis.dalessandro@cornelisnetworks.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"pali@kernel.org" <pali@kernel.org>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"isdn@linux-pingi.de" <isdn@linux-pingi.de>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"fbarrat@linux.ibm.com" <fbarrat@linux.ibm.com>,
	"ajd@linux.ibm.com" <ajd@linux.ibm.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"nico@fluxnic.net" <nico@fluxnic.net>,
	"loic.poulain@linaro.org" <loic.poulain@linaro.org>,
	"pkshih@realtek.com" <pkshih@realtek.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"devel@acpica.org" <devel@acpica.org>,
	"linux-atm-general@lists.sourceforge.net"
	<linux-atm-general@lists.sourceforge.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"wcn36xx@lists.infradead.org" <wcn36xx@lists.infradead.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: RE: [PATCH 21/22] rtw89: Replace comments with C99 initializers
Date: Mon, 28 Mar 2022 12:21:04 +0000	[thread overview]
Message-ID: <6082d343f18a40229df83e3102e7dc38@AcuMS.aculab.com> (raw)
In-Reply-To: <87k0cezarl.fsf@kernel.org>

From: Kalle Valo
> Sent: 28 March 2022 10:29
> 
> Larry Finger <Larry.Finger@lwfinger.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@stuerz.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)

  reply	other threads:[~2022-03-28 12:21 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26 16:58 [PATCH 01/22] orion5x: Replace comments with C99 initializers Benjamin Stürz
2022-03-26 16:58 ` [PATCH 02/22] s3c: " Benjamin Stürz
2022-03-26 19:44   ` Joe Perches
2022-03-28 13:37   ` Daniel Thompson
2022-03-26 16:58 ` [PATCH 03/22] ia64: " Benjamin Stürz
2022-03-26 16:58 ` [PATCH 04/22] x86: " Benjamin Stürz
2022-03-28 23:08   ` Thomas Gleixner
2022-03-26 16:58 ` [PATCH 05/22] acpica: " Benjamin Stürz
2022-03-27 19:59   ` Andy Shevchenko
2022-03-31 19:27     ` Moore, Robert
2022-04-01  5:09       ` Christoph Hellwig
2022-04-01  5:10     ` Christoph Hellwig
2022-03-28 12:33   ` Rafael J. Wysocki
2022-03-26 16:58 ` [PATCH 06/22] idt77252: " Benjamin Stürz
2022-03-26 16:58 ` [PATCH 07/22] cm4000: " Benjamin Stürz
2022-03-26 16:58 ` [PATCH 08/22] i5100: " Benjamin Stürz
2022-03-26 16:58 ` [PATCH 09/22] gpio-winbond: Use " Benjamin Stürz
2022-03-27 12:03   ` Linus Walleij
2022-03-29 12:30   ` Bartosz Golaszewski
2022-03-26 16:58 ` [PATCH 10/22] hfi1: Replace comments with " Benjamin Stürz
2022-03-26 16:58 ` [PATCH 11/22] rdmavt: " Benjamin Stürz
2022-03-27  7:04   ` Leon Romanovsky
2022-03-31 17:41     ` Dennis Dalessandro
2022-03-26 16:58 ` [PATCH 12/22] alps: " Benjamin Stürz
2022-03-26 16:59 ` [PATCH 13/22] capi: " Benjamin Stürz
2022-03-26 16:59 ` [PATCH 14/22] mISDN: " Benjamin Stürz
2022-03-26 16:59 ` [PATCH 15/22] macintosh: " Benjamin Stürz
2022-03-26 16:59 ` [PATCH 16/22] dvb-usb: " Benjamin Stürz
2022-03-26 18:24   ` Mauro Carvalho Chehab
2022-03-26 18:27     ` Mauro Carvalho Chehab
2022-03-26 19:51       ` Joe Perches
2022-03-26 20:11         ` Larry Finger
2022-03-26 21:08           ` Mauro Carvalho Chehab
2022-03-26 16:59 ` [PATCH 17/22] cxl: " Benjamin Stürz
2022-03-26 16:59 ` [PATCH 18/22] smsc: " Benjamin Stürz
2022-03-26 16:59 ` [PATCH 19/22] wnc36xx: " Benjamin Stürz
2022-03-28 16:17   ` Jeff Johnson
2022-03-26 16:59 ` [PATCH 20/22] wireless: " Benjamin Stürz
2022-03-28 12:06   ` Kalle Valo
2022-03-26 16:59 ` [PATCH 21/22] rtw89: " Benjamin Stürz
2022-03-26 18:55   ` Larry Finger
2022-03-28  9:28     ` Kalle Valo
2022-03-28 12:21       ` David Laight [this message]
2022-03-26 16:59 ` [PATCH 22/22] pci: " Benjamin Stürz
2022-03-26 18:20 ` [PATCH 01/22] orion5x: " Mauro Carvalho Chehab
2022-03-26 19:23 ` Arnd Bergmann
2022-03-28 13:19   ` Segher Boessenkool
2022-03-27 12:46 ` [PATCH 00/22] " Benjamin Stürz
2022-03-28  9:33   ` Kalle Valo
2022-03-28 11:51     ` Benjamin Stürz
2022-03-28 12:31       ` Kalle Valo
2022-03-28 20:20       ` Jakub Kicinski
2022-03-28 13:47   ` Daniel Thompson
2022-03-28 13:17 ` [PATCH 01/22] orion5x: " Daniel Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6082d343f18a40229df83e3102e7dc38@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=3chas3@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=ajd@linux.ibm.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=benni@stuerz.xyz \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=brgl@bgdev.pl \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=devel@acpica.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fbarrat@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=hpa@zytor.com \
    --cc=isdn@linux-pingi.de \
    --cc=james.morse@arm.com \
    --cc=jgg@ziepe.ca \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=laforge@gnumonks.org \
    --cc=lenb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@simtec.co.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loic.poulain@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=mike.marciniszyn@cornelisnetworks.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=pabeni@redhat.com \
    --cc=pali@kernel.org \
    --cc=pkshih@realtek.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=rric@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=wcn36xx@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).