Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1486168

[PATCH 0/2] cris: fix a couple of incompatible pointer types

From Daniel Wagner <wagi@monom.org>
Newsgroups linux.kernel
Subject [PATCH 0/2] cris: fix a couple of incompatible pointer types
Date 2016-09-19 08:30 +0200
Message-ID <sj0fv-1Rv-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Daniel Wagner <daniel.wagner@bmw-carit.de>

Hi,

I got a love letter from kbuild about incompatible pointer types. I
added the new compiler flag [1] so it seems I am in charge cleaning up.

kbuild tells me:

All errors (new ones prefixed by >>):

   arch/cris/arch-v32/mm/intmem.c: In function 'crisv32_intmem_free':
   arch/cris/arch-v32/mm/intmem.c:116:14: warning: comparison of distinct pointer types lacks a cast
       if ((prev != &intmem_allocations) &&
                 ^~
   arch/cris/arch-v32/mm/intmem.c:123:14: warning: comparison of distinct pointer types lacks a cast
       if ((next != &intmem_allocations) &&
                 ^~
   In file included from include/linux/printk.h:5:0,
                    from include/linux/kernel.h:13,
                    from include/linux/list.h:8,
                    from arch/cris/arch-v32/mm/intmem.c:7:
   arch/cris/arch-v32/mm/intmem.c: At top level:
>> arch/cris/arch-v32/mm/intmem.c:148:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    device_initcall(crisv32_intmem_init);
                    ^
   include/linux/init.h:184:58: note: in definition of macro '__define_initcall'
     __attribute__((__section__(".initcall" #id ".init"))) = fn; \
                                                             ^~
   arch/cris/arch-v32/mm/intmem.c:148:1: note: in expansion of macro 'device_initcall'
    device_initcall(crisv32_intmem_init);
    ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

cheers,
daniel

[1] ea8daa7b9784 ("kbuild: Add option to turn incompatible pointer check
into error")

Daniel Wagner (2):
  cris: don't compare incompatible pointer type
  cris: use correct device_init() function signature

 arch/cris/arch-v32/mm/intmem.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
2.7.4

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] cris: fix a couple of incompatible pointer types Daniel Wagner <wagi@monom.org> - 2016-09-19 08:30 +0200
  [PATCH 2/2] cris: use correct device_init() function signature Daniel Wagner <wagi@monom.org> - 2016-09-19 08:30 +0200
  [PATCH 1/2] cris: don't compare incompatible pointer type Daniel Wagner <wagi@monom.org> - 2016-09-19 08:30 +0200
  Re: [PATCH 0/2] cris: fix a couple of incompatible pointer types Daniel Wagner <wagi@monom.org> - 2016-09-19 09:10 +0200
  Re: [PATCH 0/2] cris: fix a couple of incompatible pointer types Niklas Cassel <nks.gnu@gmail.com> - 2016-09-19 09:10 +0200

csiph-web