lkml.org 
[lkml]   [2018]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver
Hi Christophe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/nand/next]
[also build test WARNING on v4.19-rc4 next-20180913]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/christophe-kerello-st-com/mtd-rawnand-add-STM32-FMC2-NAND-flash-controller-driver/20180918-000016
base: git://git.infradead.org/linux-mtd.git nand/next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64

All warnings (new ones prefixed by >>):

In file included from include/linux/clk.h:16,
from drivers/mtd/nand/raw/stm32_fmc2_nand.c:7:
drivers/mtd/nand/raw/stm32_fmc2_nand.c: In function 'stm32_fmc2_read_data':
>> drivers/mtd/nand/raw/stm32_fmc2_nand.c:838:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (IS_ALIGNED((u32)buf, sizeof(u32)) && IS_ALIGNED(len, sizeof(u32))) {
^
include/linux/kernel.h:62:30: note: in definition of macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
>> drivers/mtd/nand/raw/stm32_fmc2_nand.c:838:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (IS_ALIGNED((u32)buf, sizeof(u32)) && IS_ALIGNED(len, sizeof(u32))) {
^
include/linux/kernel.h:62:44: note: in definition of macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
drivers/mtd/nand/raw/stm32_fmc2_nand.c: In function 'stm32_fmc2_write_data':
drivers/mtd/nand/raw/stm32_fmc2_nand.c:872:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (IS_ALIGNED((u32)buf, sizeof(u32)) && IS_ALIGNED(len, sizeof(u32))) {
^
include/linux/kernel.h:62:30: note: in definition of macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
drivers/mtd/nand/raw/stm32_fmc2_nand.c:872:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (IS_ALIGNED((u32)buf, sizeof(u32)) && IS_ALIGNED(len, sizeof(u32))) {
^
include/linux/kernel.h:62:44: note: in definition of macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
In file included from include/linux/module.h:18,
from drivers/mtd/nand/raw/stm32_fmc2_nand.c:13:
drivers/mtd/nand/raw/stm32_fmc2_nand.c: At top level:
drivers/mtd/nand/raw/stm32_fmc2_nand.c:1726:26: error: expected ',' or ';' before 'DRIVER_NAME'
MODULE_ALIAS("platform:" DRIVER_NAME);
^~~~~~~~~~~
include/linux/moduleparam.h:24:26: note: in definition of macro '__MODULE_INFO'
= __stringify(tag) "=" info
^~~~
include/linux/module.h:164:30: note: in expansion of macro 'MODULE_INFO'
#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
^~~~~~~~~~~
drivers/mtd/nand/raw/stm32_fmc2_nand.c:1726:1: note: in expansion of macro 'MODULE_ALIAS'
MODULE_ALIAS("platform:" DRIVER_NAME);
^~~~~~~~~~~~

vim +838 drivers/mtd/nand/raw/stm32_fmc2_nand.c

826
827 void stm32_fmc2_read_data(struct nand_chip *chip, void *buf,
828 unsigned int len, bool force_8bit)
829 {
830 struct stm32_fmc2 *fmc2 = nand_get_controller_data(chip);
831 void __iomem *io_addr_r = fmc2->data_base[fmc2->cs_sel];
832 u8 *p = buf;
833 unsigned int i;
834
835 if (force_8bit)
836 goto read_8bit;
837
> 838 if (IS_ALIGNED((u32)buf, sizeof(u32)) && IS_ALIGNED(len, sizeof(u32))) {
839 u32 *p = buf;
840
841 len >>= 2;
842 for (i = 0; i < len; i++)
843 p[i] = readl_relaxed(io_addr_r);
844 return;
845 }
846
847 if (chip->options & NAND_BUSWIDTH_16) {
848 u16 *p = buf;
849
850 len >>= 1;
851 for (i = 0; i < len; i++)
852 p[i] = readw_relaxed(io_addr_r);
853 return;
854 }
855
856 read_8bit:
857 for (i = 0; i < len; i++)
858 p[i] = readb_relaxed(io_addr_r);
859 }
860

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-09-17 19:34    [W:0.152 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site