* [lee-mfd:for-mfd-next 41/41] drivers/mfd/intel_quark_i2c_gpio.c:161:32: sparse: sparse: incorrect type in initializer (different modifiers)
@ 2021-03-27 1:01 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-27 1:01 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3142 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: 43e72121b5f667b10ba5adae96880e388dda55d1
commit: 43e72121b5f667b10ba5adae96880e388dda55d1 [41/41] mfd: intel_quark_i2c_gpio: Don't play dirty trick with const
config: i386-randconfig-s002-20210326 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?id=43e72121b5f667b10ba5adae96880e388dda55d1
git remote add lee-mfd https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
git fetch --no-tags lee-mfd for-mfd-next
git checkout 43e72121b5f667b10ba5adae96880e388dda55d1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/mfd/intel_quark_i2c_gpio.c:161:32: sparse: sparse: incorrect type in initializer (different modifiers) @@ expected struct resource *res @@ got struct resource const * @@
drivers/mfd/intel_quark_i2c_gpio.c:161:32: sparse: expected struct resource *res
drivers/mfd/intel_quark_i2c_gpio.c:161:32: sparse: got struct resource const *
drivers/mfd/intel_quark_i2c_gpio.c:192:32: sparse: sparse: incorrect type in initializer (different modifiers) @@ expected struct resource *res @@ got struct resource const * @@
drivers/mfd/intel_quark_i2c_gpio.c:192:32: sparse: expected struct resource *res
drivers/mfd/intel_quark_i2c_gpio.c:192:32: sparse: got struct resource const *
vim +161 drivers/mfd/intel_quark_i2c_gpio.c
157
158 static int intel_quark_i2c_setup(struct pci_dev *pdev)
159 {
160 struct mfd_cell *cell = &intel_quark_mfd_cells[MFD_I2C_BAR];
> 161 struct resource *res = intel_quark_i2c_res;
162 const struct dmi_system_id *dmi_id;
163 struct dw_i2c_platform_data *pdata;
164 struct device *dev = &pdev->dev;
165
166 res[INTEL_QUARK_IORES_MEM].start = pci_resource_start(pdev, MFD_I2C_BAR);
167 res[INTEL_QUARK_IORES_MEM].end = pci_resource_end(pdev, MFD_I2C_BAR);
168
169 res[INTEL_QUARK_IORES_IRQ].start = pci_irq_vector(pdev, 0);
170 res[INTEL_QUARK_IORES_IRQ].end = pci_irq_vector(pdev, 0);
171
172 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
173 if (!pdata)
174 return -ENOMEM;
175
176 /* Normal mode by default */
177 pdata->i2c_scl_freq = I2C_MAX_STANDARD_MODE_FREQ;
178
179 dmi_id = dmi_first_match(dmi_platform_info);
180 if (dmi_id)
181 pdata->i2c_scl_freq = (uintptr_t)dmi_id->driver_data;
182
183 cell->platform_data = pdata;
184 cell->pdata_size = sizeof(*pdata);
185
186 return 0;
187 }
188
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32415 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-27 1:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-27 1:01 [lee-mfd:for-mfd-next 41/41] drivers/mfd/intel_quark_i2c_gpio.c:161:32: sparse: sparse: incorrect type in initializer (different modifiers) kernel test robot
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.