* sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
@ 2020-10-22 7:25 ` kernel test robot
0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-10-22 7:25 UTC (permalink / raw)
To: Cezary Rojewski; +Cc: kbuild-all, linux-kernel, Mark Brown, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 3572 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f804b3159482eedbb4250b1e9248c308fb63b805
commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
date: 3 weeks ago
config: i386-randconfig-s002-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
vim +359 sound/soc/intel/catpt/dsp.c
ba202a7bc3da05 Cezary Rojewski 2020-09-29 343
ba202a7bc3da05 Cezary Rojewski 2020-09-29 344 int lpt_dsp_power_down(struct catpt_dev *cdev)
ba202a7bc3da05 Cezary Rojewski 2020-09-29 345 {
ba202a7bc3da05 Cezary Rojewski 2020-09-29 346 catpt_dsp_reset(cdev, true);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 347
ba202a7bc3da05 Cezary Rojewski 2020-09-29 348 /* set 24Mhz clock for both SSPs */
ba202a7bc3da05 Cezary Rojewski 2020-09-29 349 catpt_updatel_shim(cdev, CS1, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
ba202a7bc3da05 Cezary Rojewski 2020-09-29 350 CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1));
ba202a7bc3da05 Cezary Rojewski 2020-09-29 351 catpt_dsp_select_lpclock(cdev, true, false);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 352
ba202a7bc3da05 Cezary Rojewski 2020-09-29 353 /* DRAM power gating all */
ba202a7bc3da05 Cezary Rojewski 2020-09-29 354 catpt_dsp_set_srampge(cdev, &cdev->dram, cdev->spec->dram_mask,
ba202a7bc3da05 Cezary Rojewski 2020-09-29 355 cdev->spec->dram_mask);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 356 catpt_dsp_set_srampge(cdev, &cdev->iram, cdev->spec->iram_mask,
ba202a7bc3da05 Cezary Rojewski 2020-09-29 357 cdev->spec->iram_mask);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 358
ba202a7bc3da05 Cezary Rojewski 2020-09-29 @359 catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, PCI_D3hot);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 360 /* give hw time to drop off */
ba202a7bc3da05 Cezary Rojewski 2020-09-29 361 udelay(50);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 362
ba202a7bc3da05 Cezary Rojewski 2020-09-29 363 return 0;
ba202a7bc3da05 Cezary Rojewski 2020-09-29 364 }
ba202a7bc3da05 Cezary Rojewski 2020-09-29 365
:::::: The code at line 359 was first introduced by commit
:::::: ba202a7bc3da05ca4548c7247f9be769b4e8c9fa ASoC: Intel: catpt: Define DSP operations
:::::: TO: Cezary Rojewski <cezary.rojewski@intel.com>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36289 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
@ 2020-10-22 7:25 ` kernel test robot
0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-10-22 7:25 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3635 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f804b3159482eedbb4250b1e9248c308fb63b805
commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
date: 3 weeks ago
config: i386-randconfig-s002-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
vim +359 sound/soc/intel/catpt/dsp.c
ba202a7bc3da05 Cezary Rojewski 2020-09-29 343
ba202a7bc3da05 Cezary Rojewski 2020-09-29 344 int lpt_dsp_power_down(struct catpt_dev *cdev)
ba202a7bc3da05 Cezary Rojewski 2020-09-29 345 {
ba202a7bc3da05 Cezary Rojewski 2020-09-29 346 catpt_dsp_reset(cdev, true);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 347
ba202a7bc3da05 Cezary Rojewski 2020-09-29 348 /* set 24Mhz clock for both SSPs */
ba202a7bc3da05 Cezary Rojewski 2020-09-29 349 catpt_updatel_shim(cdev, CS1, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
ba202a7bc3da05 Cezary Rojewski 2020-09-29 350 CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1));
ba202a7bc3da05 Cezary Rojewski 2020-09-29 351 catpt_dsp_select_lpclock(cdev, true, false);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 352
ba202a7bc3da05 Cezary Rojewski 2020-09-29 353 /* DRAM power gating all */
ba202a7bc3da05 Cezary Rojewski 2020-09-29 354 catpt_dsp_set_srampge(cdev, &cdev->dram, cdev->spec->dram_mask,
ba202a7bc3da05 Cezary Rojewski 2020-09-29 355 cdev->spec->dram_mask);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 356 catpt_dsp_set_srampge(cdev, &cdev->iram, cdev->spec->iram_mask,
ba202a7bc3da05 Cezary Rojewski 2020-09-29 357 cdev->spec->iram_mask);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 358
ba202a7bc3da05 Cezary Rojewski 2020-09-29 @359 catpt_updatel_pci(cdev, PMCS, PCI_PM_CTRL_STATE_MASK, PCI_D3hot);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 360 /* give hw time to drop off */
ba202a7bc3da05 Cezary Rojewski 2020-09-29 361 udelay(50);
ba202a7bc3da05 Cezary Rojewski 2020-09-29 362
ba202a7bc3da05 Cezary Rojewski 2020-09-29 363 return 0;
ba202a7bc3da05 Cezary Rojewski 2020-09-29 364 }
ba202a7bc3da05 Cezary Rojewski 2020-09-29 365
:::::: The code at line 359 was first introduced by commit
:::::: ba202a7bc3da05ca4548c7247f9be769b4e8c9fa ASoC: Intel: catpt: Define DSP operations
:::::: TO: Cezary Rojewski <cezary.rojewski@intel.com>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36289 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
2020-10-22 7:25 ` kernel test robot
@ 2020-10-22 13:52 ` Andy Shevchenko
-1 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-10-22 13:52 UTC (permalink / raw)
To: kernel test robot, Bjorn Helgaas
Cc: Cezary Rojewski, kbuild-all, linux-kernel, Mark Brown
+Cc: Bjorn
On Thu, Oct 22, 2020 at 03:25:49PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: f804b3159482eedbb4250b1e9248c308fb63b805
> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
> date: 3 weeks ago
> config: i386-randconfig-s002-20201022 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.3-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> # save the attached .config to linux build tree
> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> "sparse warnings: (new ones prefixed by >>)"
> >> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
> sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
> sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
> sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
I dunno who and why created that specific bitwise type. I met not the first
time the same Sparse complain.
In some places I have fixed that by forcing the lvalue type, i.e.
(__force int)PCI_D3hot
or so.
Also there are two other approaches
- leave as is (ignore this warning)
- create a helper that will convert PCI power type to an integer, like
switch (pci_pwr) {
default:
return -EINVAL;
case PCI_D3hot:
return 3;
...
}
But I consider the second one is a bit silly. Dunno if PCI core has this already.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
@ 2020-10-22 13:52 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-10-22 13:52 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2183 bytes --]
+Cc: Bjorn
On Thu, Oct 22, 2020 at 03:25:49PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: f804b3159482eedbb4250b1e9248c308fb63b805
> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
> date: 3 weeks ago
> config: i386-randconfig-s002-20201022 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.3-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> # save the attached .config to linux build tree
> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> "sparse warnings: (new ones prefixed by >>)"
> >> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
> sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
> sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
> sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
I dunno who and why created that specific bitwise type. I met not the first
time the same Sparse complain.
In some places I have fixed that by forcing the lvalue type, i.e.
(__force int)PCI_D3hot
or so.
Also there are two other approaches
- leave as is (ignore this warning)
- create a helper that will convert PCI power type to an integer, like
switch (pci_pwr) {
default:
return -EINVAL;
case PCI_D3hot:
return 3;
...
}
But I consider the second one is a bit silly. Dunno if PCI core has this already.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
2020-10-22 13:52 ` Andy Shevchenko
@ 2020-10-22 14:09 ` Bjorn Helgaas
-1 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2020-10-22 14:09 UTC (permalink / raw)
To: Andy Shevchenko
Cc: kernel test robot, Cezary Rojewski, kbuild-all, linux-kernel, Mark Brown
On Thu, Oct 22, 2020 at 04:52:29PM +0300, Andy Shevchenko wrote:
> +Cc: Bjorn
>
> On Thu, Oct 22, 2020 at 03:25:49PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: f804b3159482eedbb4250b1e9248c308fb63b805
> > commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
> > date: 3 weeks ago
> > config: i386-randconfig-s002-20201022 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> > reproduce:
> > # apt-get install sparse
> > # sparse version: v0.6.3-dirty
> > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > git fetch --no-tags linus master
> > git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> > # save the attached .config to linux build tree
> > make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> >
> > "sparse warnings: (new ones prefixed by >>)"
> > >> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
> > sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
> > sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
> > sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
>
> I dunno who and why created that specific bitwise type. I met not the first
> time the same Sparse complain.
Thanks for the cc. Yeah, I hate that too. It's one of the few
remaining warnings in drivers/pci/. It's my goal to eradicate it for
v5.11.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
@ 2020-10-22 14:09 ` Bjorn Helgaas
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2020-10-22 14:09 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1976 bytes --]
On Thu, Oct 22, 2020 at 04:52:29PM +0300, Andy Shevchenko wrote:
> +Cc: Bjorn
>
> On Thu, Oct 22, 2020 at 03:25:49PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: f804b3159482eedbb4250b1e9248c308fb63b805
> > commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
> > date: 3 weeks ago
> > config: i386-randconfig-s002-20201022 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> > reproduce:
> > # apt-get install sparse
> > # sparse version: v0.6.3-dirty
> > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > git fetch --no-tags linus master
> > git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
> > # save the attached .config to linux build tree
> > make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> >
> > "sparse warnings: (new ones prefixed by >>)"
> > >> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
> > sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
> > sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
> > sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
>
> I dunno who and why created that specific bitwise type. I met not the first
> time the same Sparse complain.
Thanks for the cc. Yeah, I hate that too. It's one of the few
remaining warnings in drivers/pci/. It's my goal to eradicate it for
v5.11.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
2020-10-22 14:09 ` Bjorn Helgaas
@ 2020-10-22 14:33 ` Rojewski, Cezary
-1 siblings, 0 replies; 8+ messages in thread
From: Rojewski, Cezary @ 2020-10-22 14:33 UTC (permalink / raw)
To: Bjorn Helgaas, Andy Shevchenko; +Cc: lkp, kbuild-all, linux-kernel, Mark Brown
On 2020-10-22 4:09 PM, Bjorn Helgaas wrote:
> On Thu, Oct 22, 2020 at 04:52:29PM +0300, Andy Shevchenko wrote:
>> +Cc: Bjorn
>>
>> On Thu, Oct 22, 2020 at 03:25:49PM +0800, kernel test robot wrote:
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: f804b3159482eedbb4250b1e9248c308fb63b805
>>> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
>>> date: 3 weeks ago
>>> config: i386-randconfig-s002-20201022 (attached as .config)
>>> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>>> reproduce:
>>> # apt-get install sparse
>>> # sparse version: v0.6.3-dirty
>>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> git fetch --no-tags linus master
>>> git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
>>> # save the attached .config to linux build tree
>>> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>>
>>> "sparse warnings: (new ones prefixed by >>)"
>>>>> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
>>> sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
>>> sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
>>> sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
>>
>> I dunno who and why created that specific bitwise type. I met not the first
>> time the same Sparse complain.
>
> Thanks for the cc. Yeah, I hate that too. It's one of the few
> remaining warnings in drivers/pci/. It's my goal to eradicate it for
> v5.11.
>
I've ignored that warning when upstreaming catpt ASoC driver as I
believe code is more readable when constants are not prepended with
explicit cast in this very case.
Should the warning be ignored (leave code as is) -or- do you want me to
prepend all PCI_Dx usages with explicit cast regardless of my initial
intentions?
Regards,
Czarek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
@ 2020-10-22 14:33 ` Rojewski, Cezary
0 siblings, 0 replies; 8+ messages in thread
From: Rojewski, Cezary @ 2020-10-22 14:33 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]
On 2020-10-22 4:09 PM, Bjorn Helgaas wrote:
> On Thu, Oct 22, 2020 at 04:52:29PM +0300, Andy Shevchenko wrote:
>> +Cc: Bjorn
>>
>> On Thu, Oct 22, 2020 at 03:25:49PM +0800, kernel test robot wrote:
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: f804b3159482eedbb4250b1e9248c308fb63b805
>>> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
>>> date: 3 weeks ago
>>> config: i386-randconfig-s002-20201022 (attached as .config)
>>> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>>> reproduce:
>>> # apt-get install sparse
>>> # sparse version: v0.6.3-dirty
>>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> git fetch --no-tags linus master
>>> git checkout 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1
>>> # save the attached .config to linux build tree
>>> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>>
>>> "sparse warnings: (new ones prefixed by >>)"
>>>>> sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer
>>> sound/soc/intel/catpt/dsp.c:372:9: sparse: sparse: restricted pci_power_t degrades to integer
>>> sound/soc/intel/catpt/dsp.c:423:9: sparse: sparse: restricted pci_power_t degrades to integer
>>> sound/soc/intel/catpt/dsp.c:447:9: sparse: sparse: restricted pci_power_t degrades to integer
>>
>> I dunno who and why created that specific bitwise type. I met not the first
>> time the same Sparse complain.
>
> Thanks for the cc. Yeah, I hate that too. It's one of the few
> remaining warnings in drivers/pci/. It's my goal to eradicate it for
> v5.11.
>
I've ignored that warning when upstreaming catpt ASoC driver as I
believe code is more readable when constants are not prepended with
explicit cast in this very case.
Should the warning be ignored (leave code as is) -or- do you want me to
prepend all PCI_Dx usages with explicit cast regardless of my initial
intentions?
Regards,
Czarek
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-10-22 14:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 7:25 sound/soc/intel/catpt/dsp.c:359:9: sparse: sparse: restricted pci_power_t degrades to integer kernel test robot
2020-10-22 7:25 ` kernel test robot
2020-10-22 13:52 ` Andy Shevchenko
2020-10-22 13:52 ` Andy Shevchenko
2020-10-22 14:09 ` Bjorn Helgaas
2020-10-22 14:09 ` Bjorn Helgaas
2020-10-22 14:33 ` Rojewski, Cezary
2020-10-22 14:33 ` Rojewski, Cezary
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.