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: <66a4381b-1a35-495f-a74a-1da0af1334c1@sirena.org.uk>
Date:   Wed, 13 Sep 2023 13:58:26 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Amadeusz Sławiński 
        <amadeuszx.slawinski@...ux.intel.com>
Cc:     Richard Fitzgerald <rf@...nsource.cirrus.com>,
        pierre-louis.bossart@...ux.intel.com,
        yung-chuan.liao@...ux.intel.com, kai.vehmanen@...ux.intel.com,
        peter.ujfalusi@...ux.intel.com, alsa-devel@...a-project.org,
        patches@...nsource.cirrus.com, linux-kernel@...r.kernel.org,
        Cezary Rojewski <cezary.rojewski@...el.com>
Subject: Re: [PATCH 1/4] ASoC: soc-card: Add storage for PCI SSID

On Wed, Sep 13, 2023 at 12:56:03PM +0200, Amadeusz Sławiński wrote:
> On 9/12/2023 6:32 PM, Richard Fitzgerald wrote:

> > +#ifdef CONFIG_PCI
> > +	/*
> > +	 * PCI does not define 0 as invalid, so pci_subsystem_set indicates
> > +	 * whether a value has been written to these fields.
> > +	 */
> > +	unsigned short pci_subsystem_vendor;
> > +	unsigned short pci_subsystem_device;
> > +	bool pci_subsystem_set;
> > +#endif /* CONFIG_PCI */
> > +
> >   	char topology_shortname[32];
> >   	struct device *dev;

> This looks bit weird to me, snd_soc_card is _generic_ struct which is not
> device specific in any way, and now you add fields for PCI, can't this
> somehow be done using drvdata or something?

You're right that it's a bit messy but if we use driver data then it
becomes specific to a particular driver and there's a goal here to share
with subfunction drivers.  I was thinking we could refactor to a union
or otherwise extend if we find other users with a similar need.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ