From: kbuild test robot <fengguang.wu@intel.com>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [next:master 6751/6952] drivers/hwmon/ina2xx.c:162:20: sparse: incorrect type in initializer (different modifiers)
Date: Wed, 25 Mar 2015 18:07:08 +0800 [thread overview]
Message-ID: <201503251807.4D1zfPoV%fengguang.wu@intel.com> (raw)
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b2dfdab2f61ed5eb57317136d6efbb973f79210e
commit: ef8e16b2c026a285a306ffb307810eecfc02f93c [6751/6952] hwmon: (ina2xx) replace ina226_avg_bits() with find_closest()
reproduce:
# apt-get install sparse
git checkout ef8e16b2c026a285a306ffb307810eecfc02f93c
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/hwmon/ina2xx.c:162:20: sparse: incorrect type in initializer (different modifiers)
drivers/hwmon/ina2xx.c:162:20: expected int *__fc_a
drivers/hwmon/ina2xx.c:162:20: got int static const [toplevel] *<noident>
vim +162 drivers/hwmon/ina2xx.c
146 {
147 int avg = ina226_avg_tab[INA226_READ_AVG(config)];
148
149 /*
150 * Multiply the total conversion time by the number of averages.
151 * Return the result in milliseconds.
152 */
153 return DIV_ROUND_CLOSEST(avg * INA226_TOTAL_CONV_TIME_DEFAULT, 1000);
154 }
155
156 static u16 ina226_interval_to_reg(int interval, u16 config)
157 {
158 int avg, avg_bits;
159
160 avg = DIV_ROUND_CLOSEST(interval * 1000,
161 INA226_TOTAL_CONV_TIME_DEFAULT);
> 162 avg_bits = find_closest(avg, ina226_avg_tab,
163 ARRAY_SIZE(ina226_avg_tab));
164
165 return (config & ~INA226_AVG_RD_MASK) | INA226_SHIFT_AVG(avg_bits);
166 }
167
168 static void ina226_set_update_interval(struct ina2xx_data *data)
169 {
170 int ms;
---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2015-03-25 10:07 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=201503251807.4D1zfPoV%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox