[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201511052319.RyS06HB3%fengguang.wu@intel.com>
Date: Thu, 5 Nov 2015 23:14:01 +0800
From: kbuild test robot <lkp@...el.com>
To: yalin wang <yalin.wang2010@...il.com>
Cc: kbuild-all@...org, ralf@...ux-mips.org, chenhc@...ote.com,
yalin.wang2010@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig: fix missing symbol error
Hi yalin,
[auto build test WARNING on: v4.3-rc7]
[also build test WARNING on: next-20151105]
url: https://github.com/0day-ci/linux/commits/yalin-wang/kconfig-fix-missing-symbol-error/20151105-204811
config: mips-allmodconfig (attached as .config)
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
# save the attached .config to linux build tree
make.cross ARCH=mips
All warnings (new ones prefixed by >>):
In file included from arch/mips/include/asm/div64.h:12:0,
from include/linux/kernel.h:136,
from include/asm-generic/bug.h:13,
from arch/mips/include/asm/bug.h:41,
from include/linux/bug.h:4,
from include/linux/io.h:23,
from drivers/staging/goldfish/goldfish_nand.c:19:
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_erase':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
>> drivers/staging/goldfish/goldfish_nand.c:106:8: note: in expansion of macro 'do_div'
rem = do_div(ofs, mtd->writesize);
^
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_read_oob':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/staging/goldfish/goldfish_nand.c:144:8: note: in expansion of macro 'do_div'
rem = do_div(ofs, mtd->writesize);
^
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_write_oob':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/staging/goldfish/goldfish_nand.c:176:8: note: in expansion of macro 'do_div'
rem = do_div(ofs, mtd->writesize);
^
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_read':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/staging/goldfish/goldfish_nand.c:204:8: note: in expansion of macro 'do_div'
rem = do_div(from, mtd->writesize);
^
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_write':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/staging/goldfish/goldfish_nand.c:226:8: note: in expansion of macro 'do_div'
rem = do_div(to, mtd->writesize);
^
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_block_isbad':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/staging/goldfish/goldfish_nand.c:247:8: note: in expansion of macro 'do_div'
rem = do_div(ofs, mtd->erasesize);
^
drivers/staging/goldfish/goldfish_nand.c: In function 'goldfish_nand_block_markbad':
include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/staging/goldfish/goldfish_nand.c:268:8: note: in expansion of macro 'do_div'
rem = do_div(ofs, mtd->erasesize);
^
vim +/do_div +106 drivers/staging/goldfish/goldfish_nand.c
8e404fff Arve Hjønnevåg 2013-01-24 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8e404fff Arve Hjønnevåg 2013-01-24 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8e404fff Arve Hjønnevåg 2013-01-24 15 * GNU General Public License for more details.
8e404fff Arve Hjønnevåg 2013-01-24 16 *
8e404fff Arve Hjønnevåg 2013-01-24 17 */
8e404fff Arve Hjønnevåg 2013-01-24 18
8e404fff Arve Hjønnevåg 2013-01-24 @19 #include <linux/io.h>
8e404fff Arve Hjønnevåg 2013-01-24 20 #include <linux/device.h>
8e404fff Arve Hjønnevåg 2013-01-24 21 #include <linux/module.h>
8e404fff Arve Hjønnevåg 2013-01-24 22 #include <linux/slab.h>
8e404fff Arve Hjønnevåg 2013-01-24 23 #include <linux/ioport.h>
8e404fff Arve Hjønnevåg 2013-01-24 24 #include <linux/vmalloc.h>
8e404fff Arve Hjønnevåg 2013-01-24 25 #include <linux/mtd/mtd.h>
8e404fff Arve Hjønnevåg 2013-01-24 26 #include <linux/platform_device.h>
67c20cfb Kristina Martšenko 2014-03-25 27 #include <linux/mutex.h>
f6279717 Alan 2014-05-12 28 #include <linux/goldfish.h>
8e404fff Arve Hjønnevåg 2013-01-24 29 #include <asm/div64.h>
8e404fff Arve Hjønnevåg 2013-01-24 30
8e404fff Arve Hjønnevåg 2013-01-24 31 #include "goldfish_nand_reg.h"
8e404fff Arve Hjønnevåg 2013-01-24 32
8e404fff Arve Hjønnevåg 2013-01-24 33 struct goldfish_nand {
2c507415 Loic Pefferkorn 2014-09-03 34 /* lock protects access to the device registers */
67c20cfb Kristina Martšenko 2014-03-25 35 struct mutex lock;
8e404fff Arve Hjønnevåg 2013-01-24 36 unsigned char __iomem *base;
8e404fff Arve Hjønnevåg 2013-01-24 37 struct cmd_params *cmd_params;
8e404fff Arve Hjønnevåg 2013-01-24 38 size_t mtd_count;
8e404fff Arve Hjønnevåg 2013-01-24 39 struct mtd_info mtd[0];
8e404fff Arve Hjønnevåg 2013-01-24 40 };
8e404fff Arve Hjønnevåg 2013-01-24 41
8e404fff Arve Hjønnevåg 2013-01-24 42 static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd,
8e404fff Arve Hjønnevåg 2013-01-24 43 enum nand_cmd cmd, u64 addr, u32 len,
8e404fff Arve Hjønnevåg 2013-01-24 44 void *ptr, u32 *rv)
8e404fff Arve Hjønnevåg 2013-01-24 45 {
8e404fff Arve Hjønnevåg 2013-01-24 46 u32 cmdp;
8e404fff Arve Hjønnevåg 2013-01-24 47 struct goldfish_nand *nand = mtd->priv;
8e404fff Arve Hjønnevåg 2013-01-24 48 struct cmd_params *cps = nand->cmd_params;
8e404fff Arve Hjønnevåg 2013-01-24 49 unsigned char __iomem *base = nand->base;
8e404fff Arve Hjønnevåg 2013-01-24 50
8e404fff Arve Hjønnevåg 2013-01-24 51 if (cps == NULL)
8e404fff Arve Hjønnevåg 2013-01-24 52 return -1;
8e404fff Arve Hjønnevåg 2013-01-24 53
8e404fff Arve Hjønnevåg 2013-01-24 54 switch (cmd) {
8e404fff Arve Hjønnevåg 2013-01-24 55 case NAND_CMD_ERASE:
8e404fff Arve Hjønnevåg 2013-01-24 56 cmdp = NAND_CMD_ERASE_WITH_PARAMS;
8e404fff Arve Hjønnevåg 2013-01-24 57 break;
8e404fff Arve Hjønnevåg 2013-01-24 58 case NAND_CMD_READ:
8e404fff Arve Hjønnevåg 2013-01-24 59 cmdp = NAND_CMD_READ_WITH_PARAMS;
8e404fff Arve Hjønnevåg 2013-01-24 60 break;
8e404fff Arve Hjønnevåg 2013-01-24 61 case NAND_CMD_WRITE:
8e404fff Arve Hjønnevåg 2013-01-24 62 cmdp = NAND_CMD_WRITE_WITH_PARAMS;
8e404fff Arve Hjønnevåg 2013-01-24 63 break;
8e404fff Arve Hjønnevåg 2013-01-24 64 default:
8e404fff Arve Hjønnevåg 2013-01-24 65 return -1;
8e404fff Arve Hjønnevåg 2013-01-24 66 }
8e404fff Arve Hjønnevåg 2013-01-24 67 cps->dev = mtd - nand->mtd;
8e404fff Arve Hjønnevåg 2013-01-24 68 cps->addr_high = (u32)(addr >> 32);
8e404fff Arve Hjønnevåg 2013-01-24 69 cps->addr_low = (u32)addr;
8e404fff Arve Hjønnevåg 2013-01-24 70 cps->transfer_size = len;
7f09d4a0 Jun Tian 2014-04-28 71 cps->data = (unsigned long)ptr;
8e404fff Arve Hjønnevåg 2013-01-24 72 writel(cmdp, base + NAND_COMMAND);
8e404fff Arve Hjønnevåg 2013-01-24 73 *rv = cps->result;
8e404fff Arve Hjønnevåg 2013-01-24 74 return 0;
8e404fff Arve Hjønnevåg 2013-01-24 75 }
8e404fff Arve Hjønnevåg 2013-01-24 76
8e404fff Arve Hjønnevåg 2013-01-24 77 static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd,
8e404fff Arve Hjønnevåg 2013-01-24 78 u64 addr, u32 len, void *ptr)
8e404fff Arve Hjønnevåg 2013-01-24 79 {
8e404fff Arve Hjønnevåg 2013-01-24 80 struct goldfish_nand *nand = mtd->priv;
8e404fff Arve Hjønnevåg 2013-01-24 81 u32 rv;
8e404fff Arve Hjønnevåg 2013-01-24 82 unsigned char __iomem *base = nand->base;
8e404fff Arve Hjønnevåg 2013-01-24 83
67c20cfb Kristina Martšenko 2014-03-25 84 mutex_lock(&nand->lock);
8e404fff Arve Hjønnevåg 2013-01-24 85 if (goldfish_nand_cmd_with_params(mtd, cmd, addr, len, ptr, &rv)) {
8e404fff Arve Hjønnevåg 2013-01-24 86 writel(mtd - nand->mtd, base + NAND_DEV);
8e404fff Arve Hjønnevåg 2013-01-24 87 writel((u32)(addr >> 32), base + NAND_ADDR_HIGH);
8e404fff Arve Hjønnevåg 2013-01-24 88 writel((u32)addr, base + NAND_ADDR_LOW);
8e404fff Arve Hjønnevåg 2013-01-24 89 writel(len, base + NAND_TRANSFER_SIZE);
07d783fd Peter Senna Tschudin 2015-05-19 90 gf_write_ptr(ptr, base + NAND_DATA, base + NAND_DATA_HIGH);
8e404fff Arve Hjønnevåg 2013-01-24 91 writel(cmd, base + NAND_COMMAND);
8e404fff Arve Hjønnevåg 2013-01-24 92 rv = readl(base + NAND_RESULT);
8e404fff Arve Hjønnevåg 2013-01-24 93 }
67c20cfb Kristina Martšenko 2014-03-25 94 mutex_unlock(&nand->lock);
8e404fff Arve Hjønnevåg 2013-01-24 95 return rv;
8e404fff Arve Hjønnevåg 2013-01-24 96 }
8e404fff Arve Hjønnevåg 2013-01-24 97
8e404fff Arve Hjønnevåg 2013-01-24 98 static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr)
8e404fff Arve Hjønnevåg 2013-01-24 99 {
8e404fff Arve Hjønnevåg 2013-01-24 100 loff_t ofs = instr->addr;
8e404fff Arve Hjønnevåg 2013-01-24 101 u32 len = instr->len;
8e404fff Arve Hjønnevåg 2013-01-24 102 u32 rem;
8e404fff Arve Hjønnevåg 2013-01-24 103
8e404fff Arve Hjønnevåg 2013-01-24 104 if (ofs + len > mtd->size)
8e404fff Arve Hjønnevåg 2013-01-24 105 goto invalid_arg;
8e404fff Arve Hjønnevåg 2013-01-24 @106 rem = do_div(ofs, mtd->writesize);
8e404fff Arve Hjønnevåg 2013-01-24 107 if (rem)
8e404fff Arve Hjønnevåg 2013-01-24 108 goto invalid_arg;
8e404fff Arve Hjønnevåg 2013-01-24 109 ofs *= (mtd->writesize + mtd->oobsize);
:::::: The code at line 106 was first introduced by commit
:::::: 8e404fffeac7d3985b193edbf860d9d73dec5b6a goldfish: NAND flash driver
:::::: TO: Arve Hjønnevåg <arve@...gle.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/octet-stream" (38993 bytes)
Powered by blists - more mailing lists