All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Nilsson <jesper.nilsson@axis.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Daniel Wagner <daniel.wagner@bmw-carit.de>,
	kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Michal Marek <mmarek@suse.com>
Subject: Re: arch/cris/arch-v32/mm/intmem.c:148:17: error: initialization from incompatible pointer type
Date: Fri, 23 Sep 2016 11:14:31 +0200	[thread overview]
Message-ID: <20160923091431.GO5583@axis.com> (raw)
In-Reply-To: <201609222127.UljQlWSP%fengguang.wu@intel.com>

Hi,

There should be some fixes in linux-next today for this.

/Jesper

On Thu, Sep 22, 2016 at 09:15:38PM +0800, kbuild test robot wrote:
> Hi Daniel,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   7d1e042314619115153a0f6f06e4552c09a50e13
> commit: ea8daa7b97842aab8507b5b5b1e3226cf2d514a6 kbuild: Add option to turn incompatible pointer check into error
> date:   6 months ago
> config: cris-etraxfs_defconfig (attached as .config)
> compiler: cris-linux-gcc (GCC) 6.2.0
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout ea8daa7b97842aab8507b5b5b1e3226cf2d514a6
>         # save the attached .config to linux build tree
>         make.cross ARCH=cris 
> 
> 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
> 
> vim +148 arch/cris/arch-v32/mm/intmem.c
> 
> 108ecfbc Jesper Nilsson 2008-01-25  117  					(prev->status == STATUS_FREE)) {
> 51533b61 Mikael Starvik 2005-07-27  118  				prev->size += allocation->size;
> 51533b61 Mikael Starvik 2005-07-27  119  				list_del(&allocation->entry);
> 51533b61 Mikael Starvik 2005-07-27  120  				kfree(allocation);
> 51533b61 Mikael Starvik 2005-07-27  121  				allocation = prev;
> 51533b61 Mikael Starvik 2005-07-27  122  			}
> 108ecfbc Jesper Nilsson 2008-01-25 @123  			if ((next != &intmem_allocations) &&
> 108ecfbc Jesper Nilsson 2008-01-25  124  					(next->status == STATUS_FREE)) {
> 51533b61 Mikael Starvik 2005-07-27  125  				allocation->size += next->size;
> 51533b61 Mikael Starvik 2005-07-27  126  				list_del(&next->entry);
> 51533b61 Mikael Starvik 2005-07-27  127  				kfree(next);
> 51533b61 Mikael Starvik 2005-07-27  128  			}
> 51533b61 Mikael Starvik 2005-07-27  129  			preempt_enable();
> 51533b61 Mikael Starvik 2005-07-27  130  			return;
> 51533b61 Mikael Starvik 2005-07-27  131  		}
> 51533b61 Mikael Starvik 2005-07-27  132  	}
> 51533b61 Mikael Starvik 2005-07-27  133  	preempt_enable();
> 51533b61 Mikael Starvik 2005-07-27  134  }
> 51533b61 Mikael Starvik 2005-07-27  135  
> 51533b61 Mikael Starvik 2005-07-27  136  void* crisv32_intmem_phys_to_virt(unsigned long addr)
> 51533b61 Mikael Starvik 2005-07-27  137  {
> 108ecfbc Jesper Nilsson 2008-01-25  138  	return (void *)(addr - (MEM_INTMEM_START + RESERVED_SIZE) +
> 51533b61 Mikael Starvik 2005-07-27  139  		(unsigned long)intmem_virtual);
> 51533b61 Mikael Starvik 2005-07-27  140  }
> 51533b61 Mikael Starvik 2005-07-27  141  
> 51533b61 Mikael Starvik 2005-07-27  142  unsigned long crisv32_intmem_virt_to_phys(void* addr)
> 51533b61 Mikael Starvik 2005-07-27  143  {
> 51533b61 Mikael Starvik 2005-07-27  144  	return (unsigned long)((unsigned long )addr -
> 108ecfbc Jesper Nilsson 2008-01-25  145  		(unsigned long)intmem_virtual + MEM_INTMEM_START +
> 108ecfbc Jesper Nilsson 2008-01-25  146  		RESERVED_SIZE);
> 51533b61 Mikael Starvik 2005-07-27  147  }
> 73de14e8 Paul Gortmaker 2015-05-01 @148  device_initcall(crisv32_intmem_init);
> 51533b61 Mikael Starvik 2005-07-27  149  
> 
> :::::: The code at line 148 was first introduced by commit
> :::::: 73de14e8cdc733bbc8eda006f813d5aa51511139 cris: don't use module_init for non-modular core intmem.c code
> 
> :::::: TO: Paul Gortmaker <paul.gortmaker@windriver.com>
> :::::: CC: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@axis.com

  reply	other threads:[~2016-09-23  9:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 13:15 arch/cris/arch-v32/mm/intmem.c:148:17: error: initialization from incompatible pointer type kbuild test robot
2016-09-23  9:14 ` Jesper Nilsson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-09-17 16:04 kbuild test robot

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=20160923091431.GO5583@axis.com \
    --to=jesper.nilsson@axis.com \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.