lkml.org 
[lkml]   [2020]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: 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@kernel.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@intel.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

\
 
 \ /
  Last update: 2020-06-22 10:44    [W:0.373 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site