From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Hongchen Zhang <zhanghongchen@loongson.cn>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 1613/1613] drivers/char/ipmi/ipmi_si_ls2k500.c:92:5: sparse: sparse: symbol 'ipmi_si_sim_setup' was not declared. Should it be static?
Date: Wed, 18 Dec 2024 00:20:32 +0800 [thread overview]
Message-ID: <202412180056.213DG4nb-lkp@intel.com> (raw)
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@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241218/202412180056.213DG4nb-lkp@intel.com/reproduce)
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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-12-17 16:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202412180056.213DG4nb-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=zhanghongchen@loongson.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.