From: Cezary Rojewski <cezary.rojewski@intel.com>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v2 1/1] ASoC: Intel: catpt: remove duplicating driver data retrieval
Date: Tue, 5 Jul 2022 14:42:31 +0200 [thread overview]
Message-ID: <fa905bab-e8bf-feaf-aa20-d4ce967a3d36@intel.com> (raw)
In-Reply-To: <YsMTXVYv/ks+nyqu@smile.fi.intel.com>
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
prev parent reply other threads:[~2022-07-05 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-03 14:51 [PATCH v2 1/1] ASoC: Intel: catpt: remove duplicating driver data retrieval Andy Shevchenko
2022-07-04 7:36 ` Péter Ujfalusi
2022-07-04 16:20 ` Andy Shevchenko
2022-07-05 12:42 ` Cezary Rojewski [this message]
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=fa905bab-e8bf-feaf-aa20-d4ce967a3d36@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/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