[linux-iv:topic/v1_acpi_cpu_capacity 2/2] arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined
by kernel test robot
tree: https://git.gitlab.arm.com/linux-arm/linux-iv.git topic/v1_acpi_cpu_capacity
head: eece74e8aaac3da75e29d0d24730d90c85c7b0ea
commit: eece74e8aaac3da75e29d0d24730d90c85c7b0ea [2/2] arch_topology: obtain cpu capacity using information from CPPC
config: x86_64-randconfig-a015-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add linux-iv https://git.gitlab.arm.com/linux-arm/linux-iv.git
git fetch --no-tags linux-iv topic/v1_acpi_cpu_capacity
git checkout eece74e8aaac3da75e29d0d24730d90c85c7b0ea
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/asm-offsets.c:9:
In file included from include/linux/crypto.h:20:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
1 warning generated.
--
In file included from drivers/media/i2c/adv7604.c:20:
In file included from include/linux/hdmi.h:28:
In file included from include/linux/device.h:16:
In file included from include/linux/energy_model.h:7:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
drivers/media/i2c/adv7604.c:401:19: warning: unused function 'avlink_read' [-Wunused-function]
static inline int avlink_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7604.c:408:19: warning: unused function 'avlink_write' [-Wunused-function]
static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7604.c:442:19: warning: unused function 'infoframe_write' [-Wunused-function]
static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7604.c:449:19: warning: unused function 'afe_read' [-Wunused-function]
static inline int afe_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7604.c:482:19: warning: unused function 'edid_read' [-Wunused-function]
static inline int edid_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7604.c:489:19: warning: unused function 'edid_write' [-Wunused-function]
static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7604.c:573:19: warning: unused function 'test_write' [-Wunused-function]
static inline int test_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7604.c:604:19: warning: unused function 'vdp_read' [-Wunused-function]
static inline int vdp_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7604.c:611:19: warning: unused function 'vdp_write' [-Wunused-function]
static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
10 warnings generated.
--
In file included from drivers/media/i2c/adv7842.c:21:
In file included from include/linux/module.h:16:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
drivers/media/i2c/adv7842.c:259:24: warning: unused function 'hblanking' [-Wunused-function]
static inline unsigned hblanking(const struct v4l2_bt_timings *t)
^
drivers/media/i2c/adv7842.c:269:24: warning: unused function 'vblanking' [-Wunused-function]
static inline unsigned vblanking(const struct v4l2_bt_timings *t)
^
drivers/media/i2c/adv7842.c:375:19: warning: unused function 'avlink_read' [-Wunused-function]
static inline int avlink_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7842.c:382:19: warning: unused function 'avlink_write' [-Wunused-function]
static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7842.c:415:19: warning: unused function 'infoframe_write' [-Wunused-function]
static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7842.c:498:19: warning: unused function 'edid_read' [-Wunused-function]
static inline int edid_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7842.c:505:19: warning: unused function 'edid_write' [-Wunused-function]
static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
drivers/media/i2c/adv7842.c:550:19: warning: unused function 'vdp_read' [-Wunused-function]
static inline int vdp_read(struct v4l2_subdev *sd, u8 reg)
^
drivers/media/i2c/adv7842.c:557:19: warning: unused function 'vdp_write' [-Wunused-function]
static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
^
10 warnings generated.
--
In file included from drivers/media/i2c/cs3308.c:12:
In file included from include/linux/module.h:16:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
drivers/media/i2c/cs3308.c:30:19: warning: unused function 'cs3308_read' [-Wunused-function]
static inline int cs3308_read(struct v4l2_subdev *sd, u8 reg)
^
2 warnings generated.
--
In file included from drivers/media/i2c/imx290.c:14:
In file included from include/linux/i2c.h:13:
In file included from include/linux/acpi.h:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:13:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
drivers/media/i2c/imx290.c:366:19: warning: unused function 'imx290_read_reg' [-Wunused-function]
static inline int imx290_read_reg(struct imx290 *imx290, u16 addr, u8 *value)
^
2 warnings generated.
--
In file included from drivers/media/i2c/cx25840/cx25840-ir.c:10:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
drivers/media/i2c/cx25840/cx25840-ir.c:139:19: warning: unused function 'ns_to_clock_divider' [-Wunused-function]
static inline u16 ns_to_clock_divider(unsigned int ns)
^
drivers/media/i2c/cx25840/cx25840-ir.c:145:28: warning: unused function 'clock_divider_to_ns' [-Wunused-function]
static inline unsigned int clock_divider_to_ns(unsigned int divider)
^
drivers/media/i2c/cx25840/cx25840-ir.c:163:19: warning: unused function 'freq_to_clock_divider' [-Wunused-function]
static inline u16 freq_to_clock_divider(unsigned int freq,
^
4 warnings generated.
--
In file included from arch/x86/kernel/asm-offsets.c:9:
In file included from include/linux/crypto.h:20:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
In file included from include/linux/topology.h:36:
>> arch/x86/include/asm/topology.h:223:9: warning: 'arch_init_invariance_cppc' macro redefined [-Wmacro-redefined]
#define arch_init_invariance_cppc init_freq_invariance_cppc
^
include/linux/arch_topology.h:16:9: note: previous definition is here
#define arch_init_invariance_cppc init_cpu_capacity_cppc
^
1 warning generated.
vim +/arch_init_invariance_cppc +223 arch/x86/include/asm/topology.h
1567c3e3467cdd Giovanni Gherdovich 2020-01-22 220
41ea667227bad5 Nathan Fontenot 2020-11-12 221 #ifdef CONFIG_ACPI_CPPC_LIB
41ea667227bad5 Nathan Fontenot 2020-11-12 222 void init_freq_invariance_cppc(void);
3efe78be8d652a Ionela Voinescu 2021-03-18 @223 #define arch_init_invariance_cppc init_freq_invariance_cppc
41ea667227bad5 Nathan Fontenot 2020-11-12 224 #endif
41ea667227bad5 Nathan Fontenot 2020-11-12 225
:::::: The code at line 223 was first introduced by commit
:::::: 3efe78be8d652a157bd19b6dbd371a2762f953d2 x86, ACPI: rename init_freq_invariance_cppc to arch_init_invariance_cppc
:::::: TO: Ionela Voinescu <ionela.voinescu(a)arm.com>
:::::: CC: Ionela Voinescu <ionela.voinescu(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/ptp/ptp_idt82p33.c:1008:12: warning: stack frame size of 9088 bytes in function 'idt82p33_probe'
by kernel test robot
Hi Min,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 88b06399c9c766c283e070b022b5ceafa4f63f19
commit: e4c6eb68343fb1cfe4bffc6802180e91826f76af ptp: idt82p33: use i2c_master_send for bus write
date: 6 months ago
config: riscv-randconfig-r022-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e4c6eb68343fb1cfe4bffc6802180e91826f76af
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp_idt82p33.c:1008:12: warning: stack frame size of 9088 bytes in function 'idt82p33_probe' [-Wframe-larger-than=]
static int idt82p33_probe(struct i2c_client *client,
^
1 warning generated.
vim +/idt82p33_probe +1008 drivers/ptp/ptp_idt82p33.c
57a10d8c112306 Min Li 2020-02-21 1006
57a10d8c112306 Min Li 2020-02-21 1007
57a10d8c112306 Min Li 2020-02-21 @1008 static int idt82p33_probe(struct i2c_client *client,
57a10d8c112306 Min Li 2020-02-21 1009 const struct i2c_device_id *id)
57a10d8c112306 Min Li 2020-02-21 1010 {
57a10d8c112306 Min Li 2020-02-21 1011 struct idt82p33 *idt82p33;
57a10d8c112306 Min Li 2020-02-21 1012 int err;
57a10d8c112306 Min Li 2020-02-21 1013 u8 i;
57a10d8c112306 Min Li 2020-02-21 1014
57a10d8c112306 Min Li 2020-02-21 1015 (void)id;
57a10d8c112306 Min Li 2020-02-21 1016
57a10d8c112306 Min Li 2020-02-21 1017 idt82p33 = devm_kzalloc(&client->dev,
57a10d8c112306 Min Li 2020-02-21 1018 sizeof(struct idt82p33), GFP_KERNEL);
57a10d8c112306 Min Li 2020-02-21 1019 if (!idt82p33)
57a10d8c112306 Min Li 2020-02-21 1020 return -ENOMEM;
57a10d8c112306 Min Li 2020-02-21 1021
57a10d8c112306 Min Li 2020-02-21 1022 mutex_init(&idt82p33->reg_lock);
57a10d8c112306 Min Li 2020-02-21 1023
57a10d8c112306 Min Li 2020-02-21 1024 idt82p33->client = client;
57a10d8c112306 Min Li 2020-02-21 1025 idt82p33->page_offset = 0xff;
57a10d8c112306 Min Li 2020-02-21 1026 idt82p33->tod_write_overhead_ns = 0;
57a10d8c112306 Min Li 2020-02-21 1027 idt82p33->calculate_overhead_flag = 0;
57a10d8c112306 Min Li 2020-02-21 1028 idt82p33->pll_mask = DEFAULT_PLL_MASK;
57a10d8c112306 Min Li 2020-02-21 1029 idt82p33->channel[0].output_mask = DEFAULT_OUTPUT_MASK_PLL0;
57a10d8c112306 Min Li 2020-02-21 1030 idt82p33->channel[1].output_mask = DEFAULT_OUTPUT_MASK_PLL1;
57a10d8c112306 Min Li 2020-02-21 1031
57a10d8c112306 Min Li 2020-02-21 1032 mutex_lock(&idt82p33->reg_lock);
57a10d8c112306 Min Li 2020-02-21 1033
57a10d8c112306 Min Li 2020-02-21 1034 err = idt82p33_load_firmware(idt82p33);
57a10d8c112306 Min Li 2020-02-21 1035
57a10d8c112306 Min Li 2020-02-21 1036 if (err)
57a10d8c112306 Min Li 2020-02-21 1037 dev_warn(&idt82p33->client->dev,
57a10d8c112306 Min Li 2020-02-21 1038 "loading firmware failed with %d\n", err);
57a10d8c112306 Min Li 2020-02-21 1039
57a10d8c112306 Min Li 2020-02-21 1040 if (idt82p33->pll_mask) {
57a10d8c112306 Min Li 2020-02-21 1041 for (i = 0; i < MAX_PHC_PLL; i++) {
57a10d8c112306 Min Li 2020-02-21 1042 if (idt82p33->pll_mask & (1 << i)) {
57a10d8c112306 Min Li 2020-02-21 1043 err = idt82p33_enable_channel(idt82p33, i);
e014ae39493f6d Min Li 2020-11-05 1044 if (err) {
e014ae39493f6d Min Li 2020-11-05 1045 dev_err(&idt82p33->client->dev,
e014ae39493f6d Min Li 2020-11-05 1046 "Failed in %s with err %d!\n",
e014ae39493f6d Min Li 2020-11-05 1047 __func__, err);
57a10d8c112306 Min Li 2020-02-21 1048 break;
57a10d8c112306 Min Li 2020-02-21 1049 }
57a10d8c112306 Min Li 2020-02-21 1050 }
e014ae39493f6d Min Li 2020-11-05 1051 }
57a10d8c112306 Min Li 2020-02-21 1052 } else {
57a10d8c112306 Min Li 2020-02-21 1053 dev_err(&idt82p33->client->dev,
57a10d8c112306 Min Li 2020-02-21 1054 "no PLLs flagged as PHCs, nothing to do\n");
57a10d8c112306 Min Li 2020-02-21 1055 err = -ENODEV;
57a10d8c112306 Min Li 2020-02-21 1056 }
57a10d8c112306 Min Li 2020-02-21 1057
57a10d8c112306 Min Li 2020-02-21 1058 mutex_unlock(&idt82p33->reg_lock);
57a10d8c112306 Min Li 2020-02-21 1059
57a10d8c112306 Min Li 2020-02-21 1060 if (err) {
57a10d8c112306 Min Li 2020-02-21 1061 idt82p33_ptp_clock_unregister_all(idt82p33);
57a10d8c112306 Min Li 2020-02-21 1062 return err;
57a10d8c112306 Min Li 2020-02-21 1063 }
57a10d8c112306 Min Li 2020-02-21 1064
57a10d8c112306 Min Li 2020-02-21 1065 i2c_set_clientdata(client, idt82p33);
57a10d8c112306 Min Li 2020-02-21 1066
57a10d8c112306 Min Li 2020-02-21 1067 return 0;
57a10d8c112306 Min Li 2020-02-21 1068 }
57a10d8c112306 Min Li 2020-02-21 1069
:::::: The code at line 1008 was first introduced by commit
:::::: 57a10d8c1123068e3cb06434fbc9634f945d3062 ptp: Add a ptp clock driver for IDT 82P33 SMU.
:::::: TO: Min Li <min.li.xe(a)renesas.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 2090/2633] include/linux/mm.h:171:10: warning: no case matching constant switch condition '128'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ec85c95b0c90a17413901b018e8ade7b9eae7cad
commit: 07f9193834d0574e4b0ff93b6d3b674c9534bf7d [2090/2633] mm/thp: make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS
config: x86_64-randconfig-a013-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 07f9193834d0574e4b0ff93b6d3b674c9534bf7d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/asm-offsets.c:13:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
In file included from include/linux/bpf.h:20:
In file included from include/linux/kallsyms.h:12:
>> include/linux/mm.h:171:10: warning: no case matching constant switch condition '128'
switch (sizeof(struct page)) {
^~~~~~~~~~~~~~~~~~~
1 warning generated.
--
In file included from arch/x86/entry/vdso/vma.c:7:
>> include/linux/mm.h:171:10: warning: no case matching constant switch condition '128'
switch (sizeof(struct page)) {
^~~~~~~~~~~~~~~~~~~
arch/x86/entry/vdso/vma.c:35:19: warning: no previous prototype for function 'arch_get_vdso_data' [-Wmissing-prototypes]
struct vdso_data *arch_get_vdso_data(void *vvar_page)
^
arch/x86/entry/vdso/vma.c:35:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct vdso_data *arch_get_vdso_data(void *vvar_page)
^
static
2 warnings generated.
--
In file included from arch/x86/kernel/asm-offsets.c:13:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:28:
In file included from include/linux/cgroup-defs.h:22:
In file included from include/linux/bpf-cgroup.h:5:
In file included from include/linux/bpf.h:20:
In file included from include/linux/kallsyms.h:12:
>> include/linux/mm.h:171:10: warning: no case matching constant switch condition '128'
switch (sizeof(struct page)) {
^~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +/128 +171 include/linux/mm.h
593befa6ab74a8 Dominik Dingel 2014-10-23 147
a4a3ede2132ae0 Pavel Tatashin 2017-11-15 148 /*
a4a3ede2132ae0 Pavel Tatashin 2017-11-15 149 * On some architectures it is expensive to call memset() for small sizes.
5470dea49f5382 Alexander Duyck 2019-05-13 150 * If an architecture decides to implement their own version of
5470dea49f5382 Alexander Duyck 2019-05-13 151 * mm_zero_struct_page they should wrap the defines below in a #ifndef and
5470dea49f5382 Alexander Duyck 2019-05-13 152 * define their own version of this macro in <asm/pgtable.h>
a4a3ede2132ae0 Pavel Tatashin 2017-11-15 153 */
5470dea49f5382 Alexander Duyck 2019-05-13 154 #if BITS_PER_LONG == 64
5470dea49f5382 Alexander Duyck 2019-05-13 155 /* This function must be updated when the size of struct page grows above 80
5470dea49f5382 Alexander Duyck 2019-05-13 156 * or reduces below 56. The idea that compiler optimizes out switch()
5470dea49f5382 Alexander Duyck 2019-05-13 157 * statement, and only leaves move/store instructions. Also the compiler can
5470dea49f5382 Alexander Duyck 2019-05-13 158 * combine write statments if they are both assignments and can be reordered,
5470dea49f5382 Alexander Duyck 2019-05-13 159 * this can result in several of the writes here being dropped.
5470dea49f5382 Alexander Duyck 2019-05-13 160 */
5470dea49f5382 Alexander Duyck 2019-05-13 161 #define mm_zero_struct_page(pp) __mm_zero_struct_page(pp)
5470dea49f5382 Alexander Duyck 2019-05-13 162 static inline void __mm_zero_struct_page(struct page *page)
5470dea49f5382 Alexander Duyck 2019-05-13 163 {
5470dea49f5382 Alexander Duyck 2019-05-13 164 unsigned long *_pp = (void *)page;
5470dea49f5382 Alexander Duyck 2019-05-13 165
5470dea49f5382 Alexander Duyck 2019-05-13 166 /* Check that struct page is either 56, 64, 72, or 80 bytes */
5470dea49f5382 Alexander Duyck 2019-05-13 167 BUILD_BUG_ON(sizeof(struct page) & 7);
5470dea49f5382 Alexander Duyck 2019-05-13 168 BUILD_BUG_ON(sizeof(struct page) < 56);
5470dea49f5382 Alexander Duyck 2019-05-13 169 BUILD_BUG_ON(sizeof(struct page) > 80);
5470dea49f5382 Alexander Duyck 2019-05-13 170
5470dea49f5382 Alexander Duyck 2019-05-13 @171 switch (sizeof(struct page)) {
5470dea49f5382 Alexander Duyck 2019-05-13 172 case 80:
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 173 _pp[9] = 0;
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 174 fallthrough;
5470dea49f5382 Alexander Duyck 2019-05-13 175 case 72:
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 176 _pp[8] = 0;
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 177 fallthrough;
5470dea49f5382 Alexander Duyck 2019-05-13 178 case 64:
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 179 _pp[7] = 0;
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 180 fallthrough;
5470dea49f5382 Alexander Duyck 2019-05-13 181 case 56:
5470dea49f5382 Alexander Duyck 2019-05-13 182 _pp[6] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 183 _pp[5] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 184 _pp[4] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 185 _pp[3] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 186 _pp[2] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 187 _pp[1] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 188 _pp[0] = 0;
5470dea49f5382 Alexander Duyck 2019-05-13 189 }
5470dea49f5382 Alexander Duyck 2019-05-13 190 }
5470dea49f5382 Alexander Duyck 2019-05-13 191 #else
a4a3ede2132ae0 Pavel Tatashin 2017-11-15 192 #define mm_zero_struct_page(pp) ((void)memset((pp), 0, sizeof(struct page)))
a4a3ede2132ae0 Pavel Tatashin 2017-11-15 193 #endif
a4a3ede2132ae0 Pavel Tatashin 2017-11-15 194
:::::: The code at line 171 was first introduced by commit
:::::: 5470dea49f5382257c242ac617d908267727f1a8 mm: use mm_zero_struct_page from SPARC on all 64b architectures
:::::: TO: Alexander Duyck <alexander.h.duyck(a)linux.intel.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 2036/2633] fs/binfmt_aout.c:225:43: error: expected ')' before ';' token
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ec85c95b0c90a17413901b018e8ade7b9eae7cad
commit: 953f99327748a7ed47f6fdce8ec2df85e53c672c [2036/2633] binfmt: remove in-tree usage of MAP_EXECUTABLE
config: alpha-randconfig-r023-20210512 (attached as .config)
compiler: alpha-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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 953f99327748a7ed47f6fdce8ec2df85e53c672c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/binfmt_aout.c: In function 'load_aout_binary':
>> fs/binfmt_aout.c:225:43: error: expected ')' before ';' token
225 | MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE;
| ^
>> fs/binfmt_aout.c:223:11: error: too few arguments to function 'vm_mmap'
223 | error = vm_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
| ^~~~~~~
In file included from fs/binfmt_aout.c:12:
include/linux/mm.h:2631:35: note: declared here
2631 | extern unsigned long __must_check vm_mmap(struct file *, unsigned long,
| ^~~~~~~
fs/binfmt_aout.c:233:44: error: expected ')' before ';' token
233 | MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE;
| ^
fs/binfmt_aout.c:231:11: error: too few arguments to function 'vm_mmap'
231 | error = vm_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
| ^~~~~~~
In file included from fs/binfmt_aout.c:12:
include/linux/mm.h:2631:35: note: declared here
2631 | extern unsigned long __must_check vm_mmap(struct file *, unsigned long,
| ^~~~~~~
vim +225 fs/binfmt_aout.c
111
112 /*
113 * These are the functions used to load a.out style executables and shared
114 * libraries. There is no binary dependent code anywhere else.
115 */
116
117 static int load_aout_binary(struct linux_binprm * bprm)
118 {
119 struct pt_regs *regs = current_pt_regs();
120 struct exec ex;
121 unsigned long error;
122 unsigned long fd_offset;
123 unsigned long rlim;
124 int retval;
125
126 ex = *((struct exec *) bprm->buf); /* exec-header */
127 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
128 N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) ||
129 N_TRSIZE(ex) || N_DRSIZE(ex) ||
130 i_size_read(file_inode(bprm->file)) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
131 return -ENOEXEC;
132 }
133
134 /*
135 * Requires a mmap handler. This prevents people from using a.out
136 * as part of an exploit attack against /proc-related vulnerabilities.
137 */
138 if (!bprm->file->f_op->mmap)
139 return -ENOEXEC;
140
141 fd_offset = N_TXTOFF(ex);
142
143 /* Check initial limits. This avoids letting people circumvent
144 * size limits imposed on them by creating programs with large
145 * arrays in the data or bss.
146 */
147 rlim = rlimit(RLIMIT_DATA);
148 if (rlim >= RLIM_INFINITY)
149 rlim = ~0;
150 if (ex.a_data + ex.a_bss > rlim)
151 return -ENOMEM;
152
153 /* Flush all traces of the currently running executable */
154 retval = begin_new_exec(bprm);
155 if (retval)
156 return retval;
157
158 /* OK, This is the point of no return */
159 #ifdef __alpha__
160 SET_AOUT_PERSONALITY(bprm, ex);
161 #else
162 set_personality(PER_LINUX);
163 #endif
164 setup_new_exec(bprm);
165
166 current->mm->end_code = ex.a_text +
167 (current->mm->start_code = N_TXTADDR(ex));
168 current->mm->end_data = ex.a_data +
169 (current->mm->start_data = N_DATADDR(ex));
170 current->mm->brk = ex.a_bss +
171 (current->mm->start_brk = N_BSSADDR(ex));
172
173 retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
174 if (retval < 0)
175 return retval;
176
177
178 if (N_MAGIC(ex) == OMAGIC) {
179 unsigned long text_addr, map_size;
180 loff_t pos;
181
182 text_addr = N_TXTADDR(ex);
183
184 #ifdef __alpha__
185 pos = fd_offset;
186 map_size = ex.a_text+ex.a_data + PAGE_SIZE - 1;
187 #else
188 pos = 32;
189 map_size = ex.a_text+ex.a_data;
190 #endif
191 error = vm_brk(text_addr & PAGE_MASK, map_size);
192 if (error)
193 return error;
194
195 error = read_code(bprm->file, text_addr, pos,
196 ex.a_text+ex.a_data);
197 if ((signed long)error < 0)
198 return error;
199 } else {
200 if ((ex.a_text & 0xfff || ex.a_data & 0xfff) &&
201 (N_MAGIC(ex) != NMAGIC) && printk_ratelimit())
202 {
203 printk(KERN_NOTICE "executable not page aligned\n");
204 }
205
206 if ((fd_offset & ~PAGE_MASK) != 0 && printk_ratelimit())
207 {
208 printk(KERN_WARNING
209 "fd_offset is not page aligned. Please convert program: %pD\n",
210 bprm->file);
211 }
212
213 if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
214 error = vm_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
215 if (error)
216 return error;
217
218 read_code(bprm->file, N_TXTADDR(ex), fd_offset,
219 ex.a_text + ex.a_data);
220 goto beyond_if;
221 }
222
> 223 error = vm_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
224 PROT_READ | PROT_EXEC,
> 225 MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE;
226 fd_offset);
227
228 if (error != N_TXTADDR(ex))
229 return error;
230
231 error = vm_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
232 PROT_READ | PROT_WRITE | PROT_EXEC,
233 MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE;
234 fd_offset + ex.a_text);
235 if (error != N_DATADDR(ex))
236 return error;
237 }
238 beyond_if:
239 set_binfmt(&aout_format);
240
241 retval = set_brk(current->mm->start_brk, current->mm->brk);
242 if (retval < 0)
243 return retval;
244
245 current->mm->start_stack =
246 (unsigned long) create_aout_tables((char __user *) bprm->p, bprm);
247 #ifdef __alpha__
248 regs->gp = ex.a_gpvalue;
249 #endif
250 finalize_exec(bprm);
251 start_thread(regs, ex.a_entry, current->mm->start_stack);
252 return 0;
253 }
254
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH] nvmet: Reset ns->file when open fails
by kernel test robot
Hi Daniel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on hch-configfs/for-next linus/master v5.13-rc1 next-20210512]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Daniel-Wagner/nvmet-Reset-ns-fil...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: microblaze-randconfig-r024-20210512 (attached as .config)
compiler: microblaze-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://github.com/0day-ci/linux/commit/406c65a33980a0f58f21c897d9283d9ff...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Wagner/nvmet-Reset-ns-file-when-open-fails/20210512-181435
git checkout 406c65a33980a0f58f21c897d9283d9fff9a4eb5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/nvme/target/io-cmd-file.c: In function 'nvmet_file_ns_enable':
>> drivers/nvme/target/io-cmd-file.c:54:7: warning: assignment to 'int' from 'struct file *' makes integer from pointer without a cast [-Wint-conversion]
54 | ret = ns->file;
| ^
>> drivers/nvme/target/io-cmd-file.c:56:18: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion]
56 | return PTR_ERR(ret);
| ^~~
| |
| int
In file included from include/linux/kernfs.h:10,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from include/linux/dma-mapping.h:7,
from drivers/nvme/target/nvmet.h:9,
from drivers/nvme/target/io-cmd-file.c:11:
include/linux/err.h:29:61: note: expected 'const void *' but argument is of type 'int'
29 | static inline long __must_check PTR_ERR(__force const void *ptr)
| ~~~~~~~~~~~~^~~
vim +54 drivers/nvme/target/io-cmd-file.c
41
42 int nvmet_file_ns_enable(struct nvmet_ns *ns)
43 {
44 int flags = O_RDWR | O_LARGEFILE;
45 int ret;
46
47 if (!ns->buffered_io)
48 flags |= O_DIRECT;
49
50 ns->file = filp_open(ns->device_path, flags, 0);
51 if (IS_ERR(ns->file)) {
52 pr_err("failed to open file %s: (%ld)\n",
53 ns->device_path, PTR_ERR(ns->file));
> 54 ret = ns->file;
55 ns->file = NULL;
> 56 return PTR_ERR(ret);
57 }
58
59 ret = nvmet_file_ns_revalidate(ns);
60 if (ret)
61 goto err;
62
63 /*
64 * i_blkbits can be greater than the universally accepted upper bound,
65 * so make sure we export a sane namespace lba_shift.
66 */
67 ns->blksize_shift = min_t(u8,
68 file_inode(ns->file)->i_blkbits, 12);
69
70 ns->bvec_cache = kmem_cache_create("nvmet-bvec",
71 NVMET_MAX_MPOOL_BVEC * sizeof(struct bio_vec),
72 0, SLAB_HWCACHE_ALIGN, NULL);
73 if (!ns->bvec_cache) {
74 ret = -ENOMEM;
75 goto err;
76 }
77
78 ns->bvec_pool = mempool_create(NVMET_MIN_MPOOL_OBJ, mempool_alloc_slab,
79 mempool_free_slab, ns->bvec_cache);
80
81 if (!ns->bvec_pool) {
82 ret = -ENOMEM;
83 goto err;
84 }
85
86 return ret;
87 err:
88 ns->size = 0;
89 ns->blksize_shift = 0;
90 nvmet_file_ns_disable(ns);
91 return ret;
92 }
93
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH v1 1/1] gpiolib: Introduce for_each_gpio_desc() macro
by kernel test robot
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on gpio/for-next]
[also build test WARNING on v5.13-rc1 next-20210512]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/gpiolib-Introduc...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: m68k-randconfig-s032-20210512 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/ceaf41face19ca3a36b81b3b866c1708a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/gpiolib-Introduce-for_each_gpio_desc-macro/20210511-035305
git checkout ceaf41face19ca3a36b81b3b866c1708a90cb4e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpio/gpiolib-of.c:718:50: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned long const volatile *vaddr @@ got unsigned long flags @@
drivers/gpio/gpiolib-of.c:718:50: sparse: expected unsigned long const volatile *vaddr
drivers/gpio/gpiolib-of.c:718:50: sparse: got unsigned long flags
vim +718 drivers/gpio/gpiolib-of.c
704
705 #ifdef CONFIG_OF_DYNAMIC
706 /**
707 * of_gpiochip_remove_hog - Remove all hogs in a hog device node
708 * @chip: gpio chip to act on
709 * @hog: device node describing the hogs
710 */
711 static void of_gpiochip_remove_hog(struct gpio_chip *chip,
712 struct device_node *hog)
713 {
714 struct gpio_desc *desc;
715 unsigned int i;
716
717 for_each_gpio_desc(i, chip, desc) {
> 718 if (test_bit(FLAG_IS_HOGGED, desc->flags) && desc->hog == hog)
719 gpiochip_free_own_desc(desc);
720 }
721 }
722
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[tip:sched/core 15/29] kernel/sched/core.c:5190:20: warning: unused function 'sched_core_cpu_starting'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: 9f26990074931bbf797373e53104216059b300b1
commit: 9edeaea1bc452372718837ed2ba775811baf1ba1 [15/29] sched: Core-wide rq->lock
config: mips-randconfig-r032-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=9e...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout 9edeaea1bc452372718837ed2ba775811baf1ba1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/core.c:3080:20: warning: unused function 'rq_has_pinned_tasks'
static inline bool rq_has_pinned_tasks(struct rq
^
kernel/sched/core.c:4941:20: warning: unused function 'sched_tick_start'
static inline void sched_tick_start(int cpu) { }
^
kernel/sched/core.c:4942:20: warning: unused function 'sched_tick_stop'
static inline void sched_tick_stop(int cpu) { }
^
>> kernel/sched/core.c:5190:20: warning: unused function 'sched_core_cpu_starting'
static inline void sched_core_cpu_starting(unsigned int cpu) {}
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set noat
.set push
.set arch=r4000
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2 # __cmpxchg_asm
bne $0, ${3:z}, 2f
.set pop
move $$1, ${4:z}
.set arch=r4000
sc $$1, $1
beqz $$1, 1b
.set pop
2: .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project a0fed635fe1701470062495a6ffee1c608f3f1bc)
Target: mips-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-a0fed635fe/bin
clang-13: note: diagnostic msg:
Makefile arch include kernel scripts source usr
vim +/sched_core_cpu_starting +5190 kernel/sched/core.c
5189
> 5190 static inline void sched_core_cpu_starting(unsigned int cpu) {}
5191
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH] nvmet: Reset ns->file when open fails
by kernel test robot
Hi Daniel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on hch-configfs/for-next linus/master v5.13-rc1 next-20210512]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Daniel-Wagner/nvmet-Reset-ns-fil...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: i386-randconfig-s002-20210512 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/406c65a33980a0f58f21c897d9283d9ff...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Wagner/nvmet-Reset-ns-file-when-open-fails/20210512-181435
git checkout 406c65a33980a0f58f21c897d9283d9fff9a4eb5
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/target/io-cmd-file.c:54:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected int ret @@ got struct file *file @@
drivers/nvme/target/io-cmd-file.c:54:21: sparse: expected int ret
drivers/nvme/target/io-cmd-file.c:54:21: sparse: got struct file *file
vim +54 drivers/nvme/target/io-cmd-file.c
41
42 int nvmet_file_ns_enable(struct nvmet_ns *ns)
43 {
44 int flags = O_RDWR | O_LARGEFILE;
45 int ret;
46
47 if (!ns->buffered_io)
48 flags |= O_DIRECT;
49
50 ns->file = filp_open(ns->device_path, flags, 0);
51 if (IS_ERR(ns->file)) {
52 pr_err("failed to open file %s: (%ld)\n",
53 ns->device_path, PTR_ERR(ns->file));
> 54 ret = ns->file;
55 ns->file = NULL;
56 return PTR_ERR(ret);
57 }
58
59 ret = nvmet_file_ns_revalidate(ns);
60 if (ret)
61 goto err;
62
63 /*
64 * i_blkbits can be greater than the universally accepted upper bound,
65 * so make sure we export a sane namespace lba_shift.
66 */
67 ns->blksize_shift = min_t(u8,
68 file_inode(ns->file)->i_blkbits, 12);
69
70 ns->bvec_cache = kmem_cache_create("nvmet-bvec",
71 NVMET_MAX_MPOOL_BVEC * sizeof(struct bio_vec),
72 0, SLAB_HWCACHE_ALIGN, NULL);
73 if (!ns->bvec_cache) {
74 ret = -ENOMEM;
75 goto err;
76 }
77
78 ns->bvec_pool = mempool_create(NVMET_MIN_MPOOL_OBJ, mempool_alloc_slab,
79 mempool_free_slab, ns->bvec_cache);
80
81 if (!ns->bvec_pool) {
82 ret = -ENOMEM;
83 goto err;
84 }
85
86 return ret;
87 err:
88 ns->size = 0;
89 ns->blksize_shift = 0;
90 nvmet_file_ns_disable(ns);
91 return ret;
92 }
93
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/pci/controller/pci-ftpci100.c:37: warning: "PCI_IOSIZE" redefined
by kernel test robot
Hi Jiaxun,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 88b06399c9c766c283e070b022b5ceafa4f63f19
commit: 482cd90cd781c9b5607ed9c9f8641dc95a9d4cce MIPS: Loongson64: Define PCI_IOBASE
date: 12 months ago
config: mips-randconfig-r013-20210512 (attached as .config)
compiler: mips64el-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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 482cd90cd781c9b5607ed9c9f8641dc95a9d4cce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/pci-ftpci100.c:37: warning: "PCI_IOSIZE" redefined
37 | #define PCI_IOSIZE 0x00
|
In file included from arch/mips/include/asm/addrspace.h:13,
from arch/mips/include/asm/barrier.h:11,
from include/linux/compiler.h:256,
from include/linux/init.h:5,
from drivers/pci/controller/pci-ftpci100.c:14:
arch/mips/include/asm/mach-loongson64/spaces.h:11: note: this is the location of the previous definition
11 | #define PCI_IOSIZE SZ_16M
|
vim +/PCI_IOSIZE +37 drivers/pci/controller/pci-ftpci100.c
9e2aee80c78d50 drivers/pci/host/pci-ftpci100.c Rob Herring 2018-05-11 32
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 33 /*
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 34 * Special configuration registers directly in the first few words
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 35 * in I/O space.
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 36 */
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 @37 #define PCI_IOSIZE 0x00
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 38 #define PCI_PROT 0x04 /* AHB protection */
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 39 #define PCI_CTRL 0x08 /* PCI control signal */
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 40 #define PCI_SOFTRST 0x10 /* Soft reset counter and response error enable */
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 41 #define PCI_CONFIG 0x28 /* PCI configuration command register */
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 42 #define PCI_DATA 0x2C
d3c68e0a7e34af drivers/pci/host/pci-ftpci100.c Linus Walleij 2017-03-12 43
:::::: The code at line 37 was first introduced by commit
:::::: d3c68e0a7e34af2b86f5408c4d6e794a38bbd9e1 PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver
:::::: TO: Linus Walleij <linus.walleij(a)linaro.org>
:::::: CC: Bjorn Helgaas <bhelgaas(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months