* [next:master 6752/6952] drivers/hwmon/lm85.c:194:16: sparse: incorrect type in initializer (different modifiers)
@ 2015-03-25 10:15 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2015-03-25 10:15 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: kbuild-all, Andrew Morton, Linux Memory Management List
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b2dfdab2f61ed5eb57317136d6efbb973f79210e
commit: 07502c794be12a1d42445169f70585f215d10f8c [6752/6952] hwmon: (lm85) use find_closest() in x_TO_REG() functions
reproduce:
# apt-get install sparse
git checkout 07502c794be12a1d42445169f70585f215d10f8c
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/hwmon/lm85.c:194:16: sparse: incorrect type in initializer (different modifiers)
drivers/hwmon/lm85.c:194:16: expected int *__fc_a
drivers/hwmon/lm85.c:194:16: got int static const [toplevel] *<noident>
>> drivers/hwmon/lm85.c:210:16: sparse: incorrect type in initializer (different modifiers)
drivers/hwmon/lm85.c:210:16: expected int *__fc_a
drivers/hwmon/lm85.c:210:16: got int const *map
vim +194 drivers/hwmon/lm85.c
188 2000, 2500, 3300, 4000, 5000, 6600, 8000, 10000,
189 13300, 16000, 20000, 26600, 32000, 40000, 53300, 80000
190 };
191
192 static int RANGE_TO_REG(long range)
193 {
> 194 return find_closest(range, lm85_range_map, ARRAY_SIZE(lm85_range_map));
195 }
196 #define RANGE_FROM_REG(val) lm85_range_map[(val) & 0x0f]
197
198 /* These are the PWM frequency encodings */
199 static const int lm85_freq_map[8] = { /* 1 Hz */
200 10, 15, 23, 30, 38, 47, 61, 94
201 };
202 static const int adm1027_freq_map[8] = { /* 1 Hz */
203 11, 15, 22, 29, 35, 44, 59, 88
204 };
205 #define FREQ_MAP_LEN 8
206
207 static int FREQ_TO_REG(const int *map,
208 unsigned int map_size, unsigned long freq)
209 {
> 210 return find_closest(freq, map, map_size);
211 }
212
213 static int FREQ_FROM_REG(const int *map, u8 reg)
---
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-25 10:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 10:15 [next:master 6752/6952] drivers/hwmon/lm85.c:194:16: sparse: incorrect type in initializer (different modifiers) kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox