public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y
@ 2020-10-20  7:42 kernel test robot
  2020-10-20  7:49 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-10-20  7:42 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3855 bytes --]

Hi Geert,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   270315b8235e3d10c2e360cff56c2f9e0915a252
commit: 077365a941166f3a7f5894017f9d26d17cdec00e pinctrl: Rename sh-pfc to renesas
date:   5 weeks ago
config: x86_64-randconfig-s032-20201020 (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=077365a941166f3a7f5894017f9d26d17cdec00e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 077365a941166f3a7f5894017f9d26d17cdec00e
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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 >>)"
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y
   drivers/pinctrl/renesas/pinctrl-rzn1.c:189:52: sparse: sparse: dubious: x | !y

vim +183 drivers/pinctrl/renesas/pinctrl-rzn1.c

4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  174  
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  175  static void rzn1_hw_set_lock(struct rzn1_pinctrl *ipctl, u8 lock, u8 value)
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  176  {
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  177  	/*
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  178  	 * The pinmux configuration is locked by writing the physical address of
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  179  	 * the status_protect register to itself. It is unlocked by writing the
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  180  	 * address | 1.
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  181  	 */
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  182  	if (lock & LOCK_LEVEL1) {
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26 @183  		u32 val = ipctl->lev1_protect_phys | !(value & LOCK_LEVEL1);
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  184  
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  185  		writel(val, &ipctl->lev1->status_protect);
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  186  	}
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  187  
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  188  	if (lock & LOCK_LEVEL2) {
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  189  		u32 val = ipctl->lev2_protect_phys | !(value & LOCK_LEVEL2);
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  190  
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  191  		writel(val, &ipctl->lev2->status_protect);
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  192  	}
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  193  }
4e53b5004745ef2 drivers/pinctrl/pinctrl-rzn1.c Phil Edworthy 2018-09-26  194  

:::::: The code at line 183 was first introduced by commit
:::::: 4e53b5004745ef26a37bca4933b2d3ea71313f2a pinctrl: renesas: Renesas RZ/N1 pinctrl driver

:::::: TO: Phil Edworthy <phil.edworthy@renesas.com>
:::::: CC: Geert Uytterhoeven <geert+renesas@glider.be>

---
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: 46522 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y
  2020-10-20  7:42 drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y kernel test robot
@ 2020-10-20  7:49 ` Geert Uytterhoeven
  2020-10-20  8:55   ` [kbuild-all] " Rong Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-10-20  7:49 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, Linux Kernel Mailing List

Hi Kernel Test Robot,

On Tue, Oct 20, 2020 at 9:42 AM kernel test robot <lkp@intel.com> wrote:
> First bad commit (maybe != root cause):
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   270315b8235e3d10c2e360cff56c2f9e0915a252
> commit: 077365a941166f3a7f5894017f9d26d17cdec00e pinctrl: Rename sh-pfc to renesas
> date:   5 weeks ago
> config: x86_64-randconfig-s032-20201020 (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=077365a941166f3a7f5894017f9d26d17cdec00e
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 077365a941166f3a7f5894017f9d26d17cdec00e
>         # save the attached .config to linux build tree
>         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
>
> 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 >>)"
> >> drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y
>    drivers/pinctrl/renesas/pinctrl-rzn1.c:189:52: sparse: sparse: dubious: x | !y

This is a false positive, cfr.
https://lore.kernel.org/linux-renesas-soc/CAMuHMdV=aWj9ePL9gAa-vsmLLUZkY4ip2337am8A7ktxg7Yniw@mail.gmail.com/

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kbuild-all] Re: drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y
  2020-10-20  7:49 ` Geert Uytterhoeven
@ 2020-10-20  8:55   ` Rong Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Rong Chen @ 2020-10-20  8:55 UTC (permalink / raw)
  To: Geert Uytterhoeven, kernel test robot
  Cc: kbuild-all, Linux Kernel Mailing List



On 10/20/20 3:49 PM, Geert Uytterhoeven wrote:
> Hi Kernel Test Robot,
>
> On Tue, Oct 20, 2020 at 9:42 AM kernel test robot <lkp@intel.com> wrote:
>> First bad commit (maybe != root cause):
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   270315b8235e3d10c2e360cff56c2f9e0915a252
>> commit: 077365a941166f3a7f5894017f9d26d17cdec00e pinctrl: Rename sh-pfc to renesas
>> date:   5 weeks ago
>> config: x86_64-randconfig-s032-20201020 (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=077365a941166f3a7f5894017f9d26d17cdec00e
>>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>          git fetch --no-tags linus master
>>          git checkout 077365a941166f3a7f5894017f9d26d17cdec00e
>>          # save the attached .config to linux build tree
>>          make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
>>
>> 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 >>)"
>>>> drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y
>>     drivers/pinctrl/renesas/pinctrl-rzn1.c:189:52: sparse: sparse: dubious: x | !y
> This is a false positive, cfr.
> https://lore.kernel.org/linux-renesas-soc/CAMuHMdV=aWj9ePL9gAa-vsmLLUZkY4ip2337am8A7ktxg7Yniw@mail.gmail.com/

Hi Geert,

Thanks for the information, we'll double check such warning in the future.

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-20  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20  7:42 drivers/pinctrl/renesas/pinctrl-rzn1.c:183:52: sparse: sparse: dubious: x | !y kernel test robot
2020-10-20  7:49 ` Geert Uytterhoeven
2020-10-20  8:55   ` [kbuild-all] " Rong Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox