From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [lee-mfd:for-mfd-next 41/41] drivers/mfd/intel_quark_i2c_gpio.c:161:32: sparse: sparse: incorrect type in initializer (different modifiers)
Date: Sat, 27 Mar 2021 09:01:09 +0800 [thread overview]
Message-ID: <202103270931.nVEDFuKu-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2021-03-27 1:01 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=202103270931.nVEDFuKu-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.