From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
<alsa-devel@alsa-project.org>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@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 v1 1/1] ASoC: Intel: catpt: Carefully use PCI bitwise constants
Date: Thu, 7 Mar 2024 17:41:53 +0100 [thread overview]
Message-ID: <439695e8-d94a-4057-84b9-0bd86f7ec84c@intel.com> (raw)
In-Reply-To: <20240307163734.3852754-1-andriy.shevchenko@linux.intel.com>
On 2024-03-07 5:37 PM, Andy Shevchenko wrote:
> PM constants for PCI devices are defined with bitwise annotation.
> When used as is, sparse complains about that:
>
> .../catpt/dsp.c:390:9: warning: restricted pci_power_t degrades to integer
> .../catpt/dsp.c:414:9: warning: restricted pci_power_t degrades to integer
>
> Force them to be u32 in the driver.
Thank you for this input, Andy.
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> sound/soc/intel/catpt/dsp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/catpt/dsp.c b/sound/soc/intel/catpt/dsp.c
> index 346bec000306..5454c6d9ab5b 100644
> --- a/sound/soc/intel/catpt/dsp.c
> +++ b/sound/soc/intel/catpt/dsp.c
> @@ -387,7 +387,7 @@ int catpt_dsp_power_down(struct catpt_dev *cdev)
> mask = cdev->spec->d3srampgd_bit | cdev->spec->d3pgd_bit;
> catpt_updatel_pci(cdev, VDRTCTL0, mask, cdev->spec->d3pgd_bit);
>
> - catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, PCI_D3hot);
> + catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, (__force u32)PCI_D3hot);
> /* give hw time to drop off */
> udelay(50);
>
> @@ -411,7 +411,7 @@ int catpt_dsp_power_up(struct catpt_dev *cdev)
> val = mask & (~CATPT_VDRTCTL2_DTCGE);
> catpt_updatel_pci(cdev, VDRTCTL2, mask, val);
>
> - catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, PCI_D0);
> + catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, (__force u32)PCI_D0);
>
> /* SRAM power gating none */
> mask = cdev->spec->d3srampgd_bit | cdev->spec->d3pgd_bit;
next prev parent reply other threads:[~2024-03-07 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 16:37 [PATCH v1 1/1] ASoC: Intel: catpt: Carefully use PCI bitwise constants Andy Shevchenko
2024-03-07 16:41 ` Cezary Rojewski [this message]
2024-03-07 17:54 ` Mark Brown
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=439695e8-d94a-4057-84b9-0bd86f7ec84c@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=linux-sound@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