[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa905bab-e8bf-feaf-aa20-d4ce967a3d36@intel.com>
Date: Tue, 5 Jul 2022 14:42:31 +0200
From: Cezary Rojewski <cezary.rojewski@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>
CC: <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
"Jaroslav Kysela" <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Subject: Re: [PATCH v2 1/1] ASoC: Intel: catpt: remove duplicating driver data
retrieval
On 2022-07-04 6:20 PM, Andy Shevchenko wrote:
> On Mon, Jul 04, 2022 at 10:36:33AM +0300, Péter Ujfalusi wrote:
>> On 03/07/2022 17:51, Andy Shevchenko wrote:
...
>> We could just pass the "(const struct catpt_spec *)id->driver_data" in
>> place of spec to catpt_dev_init() and we can get rid of the local
>> temporary pointer?
>
> I would not go this way for non-POD types.
Agree with Andy here.
>> If not, then I would cast out the spec before it's use:
>> spec = (const struct catpt_spec *)id->driver_data;
>> catpt_dev_init(cdev, dev, spec);
>
> This I can do (as well as in the other patch).
Agree with Peter's suggestion here too.
Thank you both for taking time in improving driver's quality!
Regards,
Czarek
Powered by blists - more mailing lists