[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a3J_V3L_xyR8cRDHaYk1DLjoFaesQ-v+jW6hHk=NHncgA@mail.gmail.com>
Date: Mon, 22 Jun 2020 10:42:45 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Stephen Boyd <sboyd@...nel.org>
Cc: kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nel.org>
Subject: Re: drivers/clk/clk-divider.c:39:17: sparse: sparse: incorrect type
in argument 1 (different base types)
On Mon, Jun 22, 2020 at 10:36 AM Stephen Boyd <sboyd@...nel.org> wrote:
>
> Quoting kernel test robot (2020-06-21 02:05:20)
> > Hi Stephen,
> >
> > First bad commit (maybe != root cause):
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 64677779e8962c20b580b471790fe42367750599
> > commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
> > date: 7 weeks ago
> > config: alpha-randconfig-s032-20200621 (attached as .config)
> > compiler: alpha-linux-gcc (GCC) 9.3.0
> > reproduce:
> > # apt-get install sparse
> > # sparse version: v0.6.2-rc2-13-gc59158c8-dirty
> > git checkout bbd7ffdbef6888459f301c5889f3b14ada38b913
> > # save the attached .config to linux build tree
> > make W=1 C=1 ARCH=alpha CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@...el.com>
> >
>
> Ok. I guess we'll need to force cast the pointer to be __be32 in this
> case. Before it wasn't in generic code so the architecture was masking
> the issue.
I'm fairly sure the problem not in your code, but in the alpha implementation
if ioread32be:
#define ioread16be(p) be16_to_cpu(ioread16(p))
#define ioread32be(p) be32_to_cpu(ioread32(p))
#define iowrite16be(v,p) iowrite16(cpu_to_be16(v), (p))
#define iowrite32be(v,p) iowrite32(cpu_to_be32(v), (p))
This must produce a warning for any call to ioread32be(), you just got the
email because additional warnings showed up now that this code can be
built on alpha as well.
Arnd
Powered by blists - more mailing lists