* [PATCH v1 1/1] ASoC: Intel: catpt: Carefully use PCI bitwise constants
@ 2024-03-07 16:37 Andy Shevchenko
2024-03-07 16:41 ` Cezary Rojewski
2024-03-07 17:54 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-03-07 16:37 UTC (permalink / raw)
To: Andy Shevchenko, alsa-devel, linux-sound, linux-kernel
Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
Mark Brown, Jaroslav Kysela, Takashi Iwai
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.
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;
--
2.43.0.rc1.1.gbec44491f096
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] ASoC: Intel: catpt: Carefully use PCI bitwise constants
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
2024-03-07 17:54 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Cezary Rojewski @ 2024-03-07 16:41 UTC (permalink / raw)
To: Andy Shevchenko, alsa-devel, linux-sound, linux-kernel
Cc: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Mark Brown, Jaroslav Kysela,
Takashi Iwai
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] ASoC: Intel: catpt: Carefully use PCI bitwise constants
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
@ 2024-03-07 17:54 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-03-07 17:54 UTC (permalink / raw)
To: alsa-devel, linux-sound, linux-kernel, Andy Shevchenko
Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
Jaroslav Kysela, Takashi Iwai
On Thu, 07 Mar 2024 18:37:34 +0200, 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: catpt: Carefully use PCI bitwise constants
commit: 6c023ad32b192dea51a4f842cc6ecf89bb6238c9
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-07 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-03-07 17:54 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox