linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Syed Nayyar Waris <syednwaris@gmail.com>
Cc: kernel test robot <lkp@intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	kbuild-all@lists.01.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	William Breathitt Gray <vilhelm.gray@gmail.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Michal Simek <michal.simek@xilinx.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro
Date: Fri, 19 Jun 2020 11:38:59 +0300	[thread overview]
Message-ID: <CAHp75Ve_=LwV6fO3ESgbCOVDVr=C5wrnAJX9od9evFvHU5-Krw@mail.gmail.com> (raw)
In-Reply-To: <CACG_h5qUZsR7Zd9a+BQJqyuJZBrv-en+gC-sgcV+xV+A5ZOBhA@mail.gmail.com>

On Fri, Jun 19, 2020 at 10:02 AM Syed Nayyar Waris <syednwaris@gmail.com> wrote:

...

> > config: sparc64-randconfig-s032-20200615 (attached as .config)
> > compiler: sparc64-linux-gcc (GCC) 9.3.0
> > reproduce:
> >         # apt-get install sparse
> >         # sparse version: v0.6.2-rc1-3-g55607964-dirty
> >         # save the attached .config to linux build tree
> >         make W=1 C=1 ARCH=sparc64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

...

> > sparse warnings: (new ones prefixed by >>)
> >
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> >    include/linux/bitmap.h:594:63: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:638:17: sparse: sparse: invalid access past the end of 'old' (8 8)

> It seems to me that to reproduce this warning, I have to use the
> sparc64 compiler. I have installed 'sparc64-linux-gnu-gcc' on my
> computer.

Sparse is not a compiler.

> I have to specify that this compiler needs to be used for build
> process. How/ Where do I specify this?
>
> I have downloaded the config.gz (has config file) and placed it at the
> root of the linux kernel project tree. But the Makefile STILL has
> 'gcc' as the compiler. When I build, it is the 'gcc' compiler being
> used and not 'sparc64-linux-gnu-gcc'. I know I can manually change the
> Makefile to use sparc64 compiler, but I think there must be some more
> elegant way to do this, perhaps using make menuconfig?

If you wish to run a compilation, download a compiler from [1], and,
after adding its bin/ folder to PATH, run
make CROSS_COMPILE=sparc64-linux- ARCH=sparc64 ... # first generate .config

> Kindly illuminate as to how shall I reproduce the compiler warning.

> > 803024b6c8a375 Syed Nayyar Waris      2020-06-15 @638           map[index + 1] &= ~BITMAP_LAST_WORD_MASK(start + nbits);
> > 803024b6c8a375 Syed Nayyar Waris      2020-06-15 @639           map[index + 1] |= (value >> space);

Hmm... I think I sent a reply [2] where I explained how space can be
64. Do you agree with analysis?

[1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/
[2]: https://lore.kernel.org/lkml/20200616081428.GP2428291@smile.fi.intel.com/

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2020-06-19  8:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 12:50 [PATCH v8 0/4] Introduce the for_each_set_clump macro Syed Nayyar Waris
2020-06-15 12:53 ` [PATCH v8 3/4] gpio: thunderx: Utilize " Syed Nayyar Waris
2020-06-15 12:54 ` [PATCH v8 4/4] gpio: xilinx: " Syed Nayyar Waris
2020-06-15 20:09   ` kernel test robot
2020-06-16  5:57     ` Syed Nayyar Waris
2020-06-19 14:26       ` Luc Van Oostenryck
2020-06-19  7:00     ` Syed Nayyar Waris
2020-06-19  8:38       ` Andy Shevchenko [this message]
2020-06-19  9:05         ` Andy Shevchenko
2020-06-19 19:17   ` Robin Murphy

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='CAHp75Ve_=LwV6fO3ESgbCOVDVr=C5wrnAJX9od9evFvHU5-Krw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=michal.simek@xilinx.com \
    --cc=syednwaris@gmail.com \
    --cc=vilhelm.gray@gmail.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;
as well as URLs for NNTP newsgroup(s).