* sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
@ 2020-11-21 19:52 kernel test robot
2020-11-23 10:53 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-11-21 19:52 UTC (permalink / raw)
To: Cezary Rojewski; +Cc: kbuild-all, linux-kernel, Mark Brown, Andy Shevchenko
[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 27bba9c532a8d21050b94224ffd310ad0058c353
commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
date: 7 weeks ago
config: x86_64-randconfig-m001-20201122 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
vim +654 sound/soc/intel/catpt/loader.c
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 637
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 638 int catpt_first_boot_firmware(struct catpt_dev *cdev)
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 639 {
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 640 struct resource *res;
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 641 int ret;
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 642
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 643 ret = catpt_boot_firmware(cdev, false);
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 644 if (ret) {
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 645 dev_err(cdev->dev, "basefw boot failed: %d\n", ret);
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 646 return ret;
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 647 }
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 648
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 649 /* restrict FW Core dump area */
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 650 __request_region(&cdev->dram, 0, 0x200, NULL, 0);
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 651 /* restrict entire area following BASE_FW - highest offset in DRAM */
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 652 for (res = cdev->dram.child; res->sibling; res = res->sibling)
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 653 ;
a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 @654 __request_region(&cdev->dram, res->end + 1,
:::::: The code at line 654 was first introduced by commit
:::::: a9aa6fb3eb6c7e0e7e117b3f2dfafef8c45b9ea6 ASoC: Intel: catpt: Firmware loading and context restore
:::::: 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: 36022 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
2020-11-21 19:52 sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here kernel test robot
@ 2020-11-23 10:53 ` Andy Shevchenko
2020-11-23 11:41 ` Rojewski, Cezary
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2020-11-23 10:53 UTC (permalink / raw)
To: kernel test robot; +Cc: Cezary Rojewski, kbuild-all, linux-kernel, Mark Brown
On Sun, Nov 22, 2020 at 03:52:27AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 27bba9c532a8d21050b94224ffd310ad0058c353
> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
> date: 7 weeks ago
> config: x86_64-randconfig-m001-20201122 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> smatch warnings:
> sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
...
> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 652 for (res = cdev->dram.child; res->sibling; res = res->sibling)
> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 653 ;
> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 @654 __request_region(&cdev->dram, res->end + 1,
This sounds like false positive. From where it gets the idea of resource_size()
for the *start* offset?!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
2020-11-23 10:53 ` Andy Shevchenko
@ 2020-11-23 11:41 ` Rojewski, Cezary
2020-11-24 8:00 ` [kbuild-all] " Rong Chen
0 siblings, 1 reply; 6+ messages in thread
From: Rojewski, Cezary @ 2020-11-23 11:41 UTC (permalink / raw)
To: Andy Shevchenko, lkp; +Cc: kbuild-all, linux-kernel, Mark Brown
On 2020-11-23 11:53 AM, Andy Shevchenko wrote:
> On Sun, Nov 22, 2020 at 03:52:27AM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 27bba9c532a8d21050b94224ffd310ad0058c353
>> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
>> date: 7 weeks ago
>> config: x86_64-randconfig-m001-20201122 (attached as .config)
>> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> smatch warnings:
>> sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
>
> ...
>
>> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 652 for (res = cdev->dram.child; res->sibling; res = res->sibling)
>> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 653 ;
>> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 @654 __request_region(&cdev->dram, res->end + 1,
>
>
> This sounds like false positive. From where it gets the idea of resource_size()
> for the *start* offset?!
>
Indeed it is false positive. I've already explained this in:
RE: [bug report] ASoC: Intel: catpt: Firmware loading and context restore
https://www.spinics.net/lists/alsa-devel/msg117145.html
Regards,
Czarek
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kbuild-all] Re: sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
2020-11-23 11:41 ` Rojewski, Cezary
@ 2020-11-24 8:00 ` Rong Chen
2020-11-24 9:13 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: Rong Chen @ 2020-11-24 8:00 UTC (permalink / raw)
To: Rojewski, Cezary, Andy Shevchenko, lkp
Cc: kbuild-all, linux-kernel, Mark Brown
On 11/23/20 7:41 PM, Rojewski, Cezary wrote:
> On 2020-11-23 11:53 AM, Andy Shevchenko wrote:
>> On Sun, Nov 22, 2020 at 03:52:27AM +0800, kernel test robot wrote:
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: 27bba9c532a8d21050b94224ffd310ad0058c353
>>> commit: 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 ASoC: Intel: Select catpt and deprecate haswell
>>> date: 7 weeks ago
>>> config: x86_64-randconfig-m001-20201122 (attached as .config)
>>> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> smatch warnings:
>>> sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
>> ...
>>
>>> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 652 for (res = cdev->dram.child; res->sibling; res = res->sibling)
>>> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 653 ;
>>> a9aa6fb3eb6c7e Cezary Rojewski 2020-09-29 @654 __request_region(&cdev->dram, res->end + 1,
>>
>> This sounds like false positive. From where it gets the idea of resource_size()
>> for the *start* offset?!
>>
> Indeed it is false positive. I've already explained this in:
>
> RE: [bug report] ASoC: Intel: catpt: Firmware loading and context restore
> https://www.spinics.net/lists/alsa-devel/msg117145.html
Hi all,
Thanks a lot, we'll ignore the warning next time.
Best Regards,
Rong Chen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kbuild-all] Re: sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
2020-11-24 8:00 ` [kbuild-all] " Rong Chen
@ 2020-11-24 9:13 ` Andy Shevchenko
2020-11-24 9:23 ` Rong Chen
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2020-11-24 9:13 UTC (permalink / raw)
To: Rong Chen
Cc: Rojewski, Cezary, Andy Shevchenko, lkp, kbuild-all, linux-kernel,
Mark Brown
On Tue, Nov 24, 2020 at 10:06 AM Rong Chen <rong.a.chen@intel.com> wrote:
> On 11/23/20 7:41 PM, Rojewski, Cezary wrote:
> > On 2020-11-23 11:53 AM, Andy Shevchenko wrote:
> >> On Sun, Nov 22, 2020 at 03:52:27AM +0800, kernel test robot wrote:
...
> >> This sounds like false positive. From where it gets the idea of resource_size()
> >> for the *start* offset?!
> >>
> > Indeed it is false positive. I've already explained this in:
> >
> > RE: [bug report] ASoC: Intel: catpt: Firmware loading and context restore
> > https://www.spinics.net/lists/alsa-devel/msg117145.html
> Thanks a lot, we'll ignore the warning next time.
I think the proper solution here is to notify smatch upstream to fix the tool.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kbuild-all] Re: sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here
2020-11-24 9:13 ` Andy Shevchenko
@ 2020-11-24 9:23 ` Rong Chen
0 siblings, 0 replies; 6+ messages in thread
From: Rong Chen @ 2020-11-24 9:23 UTC (permalink / raw)
To: Andy Shevchenko, Dan Carpenter
Cc: Rojewski, Cezary, Andy Shevchenko, lkp, kbuild-all, linux-kernel,
Mark Brown
On 11/24/20 5:13 PM, Andy Shevchenko wrote:
> On Tue, Nov 24, 2020 at 10:06 AM Rong Chen <rong.a.chen@intel.com> wrote:
>> On 11/23/20 7:41 PM, Rojewski, Cezary wrote:
>>> On 2020-11-23 11:53 AM, Andy Shevchenko wrote:
>>>> On Sun, Nov 22, 2020 at 03:52:27AM +0800, kernel test robot wrote:
> ...
>
>>>> This sounds like false positive. From where it gets the idea of resource_size()
>>>> for the *start* offset?!
>>>>
>>> Indeed it is false positive. I've already explained this in:
>>>
>>> RE: [bug report] ASoC: Intel: catpt: Firmware loading and context restore
>>> https://www.spinics.net/lists/alsa-devel/msg117145.html
>> Thanks a lot, we'll ignore the warning next time.
> I think the proper solution here is to notify smatch upstream to fix the tool.
>
+Dan Carpenter
Hi Dan,
Could you take a look at this? the original report is at
https://lore.kernel.org/lkml/202011220325.oB7oeTEq-lkp@intel.com/
Best Regards,
Rong Chen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-11-24 9:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 19:52 sound/soc/intel/catpt/loader.c:654 catpt_first_boot_firmware() warn: consider using resource_size() here kernel test robot
2020-11-23 10:53 ` Andy Shevchenko
2020-11-23 11:41 ` Rojewski, Cezary
2020-11-24 8:00 ` [kbuild-all] " Rong Chen
2020-11-24 9:13 ` Andy Shevchenko
2020-11-24 9:23 ` Rong Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).