tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 46064348cc445799cf9e8fd030323a0426fbb5e4 commit: 4fbeaa84ef36adce930088074f8c088e5dd780c0 [1613/1613] ipmi: add ls2k500 bmc ipmi support. config: loongarch-randconfig-r111-20241210 (https://download.01.org/0day-ci/archive/20241218/202412180056.213DG4nb-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241218/202412180056.213DG4nb-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202412180056.213DG4nb-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/char/ipmi/ipmi_si_ls2k500.c:92:5: sparse: sparse: symbol 'ipmi_si_sim_setup' was not declared. Should it be static? drivers/char/ipmi/ipmi_si_ls2k500.c:116:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[addressable] [assigned] addr_source_data @@ got void [noderef] __iomem * @@
drivers/char/ipmi/ipmi_si_ls2k500.c:116:29: sparse: expected void *[addressable] [assigned] addr_source_data drivers/char/ipmi/ipmi_si_ls2k500.c:116:29: sparse: got void [noderef] __iomem *
drivers/char/ipmi/ipmi_si_ls2k500.c:148:24: sparse: sparse: symbol 'ipmi_ls2k500_platform_driver' was not declared. Should it be static?
drivers/char/ipmi/ipmi_si_ls2k500.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
vim +/ipmi_si_sim_setup +92 drivers/char/ipmi/ipmi_si_ls2k500.c
91
92 int ipmi_si_sim_setup(struct si_sm_io *io)
93 { 94 io->inputb = intf_sim_inb; 95 io->outputb = intf_sim_outb; 96 io->io_cleanup = ipmi_ls2k500_cleanup; 97 return 0; 98 } 99 100 #define platform_resource_start(dev, bar) ((dev)->resource[(bar)].start) 101 #define platform_resource_end(dev, bar) ((dev)->resource[(bar)].end) 102 static int of_ipmi_ls2k500_probe(struct platform_device *pdev) 103 { 104 int rv; 105 struct si_sm_io io; 106 void **kcs_data; 107 108 memset(&io, 0, sizeof(io)); 109 io.addr_source = SI_PLATFORM; 110 dev_info(&pdev->dev, "probing via ls2k500 platform"); 111 io.si_type = SI_KCS; 112 113 io.addr_space = IPMI_MEM_ADDR_SPACE; 114 io.io_setup = ipmi_si_sim_setup; 115 io.addr_data = pdev->resource[0].start;
116 io.addr_source_data = ioremap(pdev->resource[0].start,
117 pdev->resource[0].end - 118 pdev->resource[0].start + 1); 119 kcs_data = dev_get_platdata(&pdev->dev); 120 event_jiffies = kcs_data[0]; 121 mscycles = kcs_data[1]; 122 io.dev = &pdev->dev; 123 io.regspacing = 4; 124 io.regsize = DEFAULT_REGSIZE; 125 io.regshift = 0; 126 io.irq = 0; 127 if (io.irq) 128 io.irq_setup = ipmi_std_irq_setup; 129 130 dev_info(&pdev->dev, "%pR regsize %d spacing %d irq %d\n", 131 &pdev->resource[0], io.regsize, io.regspacing, io.irq); 132 133 rv = ipmi_si_add_smi(&io); 134 if (rv) 135 ipmi_si_remove_by_dev(&pdev->dev); 136 137 return rv; 138 } 139 140 static int ipmi_ls2k500_remove(struct platform_device *pdev) 141 { 142 ipmi_si_remove_by_dev(&pdev->dev); 143 144 return 0; 145 } 146 147 #define LS2K500_SI_DEVICE_NAME "ipmi_ls2k500_si"
148 struct platform_driver ipmi_ls2k500_platform_driver = {
149 .driver = { 150 .name = LS2K500_SI_DEVICE_NAME, 151 }, 152 .probe = of_ipmi_ls2k500_probe, 153 .remove = ipmi_ls2k500_remove, 154 }; 155