From: kernel test robot <lkp@intel.com>
To: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>
Subject: arch/mips/include/asm/addrspace.h:88:37: warning: passing argument 1 of 'kfree' makes pointer from integer without a cast
Date: Fri, 16 Oct 2020 18:04:29 +0800 [thread overview]
Message-ID: <202010161852.CGdSDJx5-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5392 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ff9b0d392ea08090cd1780fb196f36dbb586529
commit: 3af5f0f5c74ecbaf757ef06c3f80d56751277637 net: korina: fix kfree of rx/tx descriptor array
date: 4 days ago
config: mips-rb532_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3af5f0f5c74ecbaf757ef06c3f80d56751277637
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3af5f0f5c74ecbaf757ef06c3f80d56751277637
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/mips/include/asm/barrier.h:11,
from arch/mips/include/asm/bitops.h:19,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/net/ethernet/korina.c:36:
drivers/net/ethernet/korina.c: In function 'korina_probe':
>> arch/mips/include/asm/addrspace.h:88:37: warning: passing argument 1 of 'kfree' makes pointer from integer without a cast [-Wint-conversion]
88 | #define KSEG0ADDR(a) (CPHYSADDR(a) | KSEG0)
| ~~~~~~~~~~~~~~^~~~~~~~
| |
| unsigned int
drivers/net/ethernet/korina.c:1116:8: note: in expansion of macro 'KSEG0ADDR'
1116 | kfree(KSEG0ADDR(lp->td_ring));
| ^~~~~~~~~
In file included from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:13,
from arch/mips/include/asm/hardirq.h:16,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from drivers/net/ethernet/korina.c:42:
include/linux/slab.h:185:12: note: expected 'const void *' but argument is of type 'unsigned int'
185 | void kfree(const void *);
| ^~~~~~~~~~~~
In file included from arch/mips/include/asm/barrier.h:11,
from arch/mips/include/asm/bitops.h:19,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/net/ethernet/korina.c:36:
drivers/net/ethernet/korina.c: In function 'korina_remove':
>> arch/mips/include/asm/addrspace.h:88:37: warning: passing argument 1 of 'kfree' makes pointer from integer without a cast [-Wint-conversion]
88 | #define KSEG0ADDR(a) (CPHYSADDR(a) | KSEG0)
| ~~~~~~~~~~~~~~^~~~~~~~
| |
| unsigned int
drivers/net/ethernet/korina.c:1136:8: note: in expansion of macro 'KSEG0ADDR'
1136 | kfree(KSEG0ADDR(lp->td_ring));
| ^~~~~~~~~
In file included from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:13,
from arch/mips/include/asm/hardirq.h:16,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from drivers/net/ethernet/korina.c:42:
include/linux/slab.h:185:12: note: expected 'const void *' but argument is of type 'unsigned int'
185 | void kfree(const void *);
| ^~~~~~~~~~~~
vim +/kfree +88 arch/mips/include/asm/addrspace.h
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 84
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 85 /*
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 86 * Map an address to a certain kernel segment
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 87 */
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 @88 #define KSEG0ADDR(a) (CPHYSADDR(a) | KSEG0)
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 89 #define KSEG1ADDR(a) (CPHYSADDR(a) | KSEG1)
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 90 #define KSEG2ADDR(a) (CPHYSADDR(a) | KSEG2)
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 91 #define KSEG3ADDR(a) (CPHYSADDR(a) | KSEG3)
^1da177e4c3f415 include/asm-mips/addrspace.h Linus Torvalds 2005-04-16 92
:::::: The code at line 88 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 16026 bytes --]
next reply other threads:[~2020-10-16 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 10:04 kernel test robot [this message]
2020-10-16 15:02 ` Jakub Kicinski
2020-10-16 19:46 ` Valentin Vidić
2020-10-18 18:42 ` [PATCH] net: korina: cast KSEG0 address to pointer in kfree Valentin Vidic
2020-10-20 0:04 ` Jakub Kicinski
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=202010161852.CGdSDJx5-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vvidic@valentin-vidic.from.hr \
/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
Powered by JetHome