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] [day] [month] [year] [list]
Message-ID: <20231123141812.GG1243364@google.com>
Date:   Thu, 23 Nov 2023 14:18:12 +0000
From:   Lee Jones <lee@...nel.org>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     patches@...nsource.cirrus.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: cs42l43: Correct SoundWire port list

On Thu, 23 Nov 2023, Charles Keepax wrote:

> On Thu, Nov 23, 2023 at 11:30:55AM +0000, Lee Jones wrote:
> > On Mon, 13 Nov 2023, Charles Keepax wrote:
> > >  enum cs42l43_sdw_ports {
> > > -	CS42L43_DMIC_DEC_ASP_PORT = 1,
> > > -	CS42L43_SPK_TX_PORT,
> > > -	CS42L43_SPDIF_HP_PORT,
> > > -	CS42L43_SPK_RX_PORT,
> > > -	CS42L43_ASP_PORT,
> > > +	CS42L43_DP1 = 1,
> > > +	CS42L43_DP2,
> > > +	CS42L43_DP3,
> > > +	CS42L43_DP4,
> > > +	CS42L43_DP5,
> > > +	CS42L43_DP6,
> > > +	CS42L43_DP7,
> > >  };
> > 
> > This is starting to look a little redundant now.
> > 
> > I'm not sure if this is better, but it sure takes up less room:
> > 
> > #define CS42L43_SDW_PORT(port) port
> > 
> 
> Sure, I think that is better. Will respin the patch. I mean I
> guess I could also just drop the enum/define entirely and just
> use the port numbers. But will assume you prefer the define
> unless I hear otherwise.

Yes, I like magic numbers even less.  Thanks.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ