linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [next:master 6751/6952] drivers/hwmon/ina2xx.c:162:20: sparse: incorrect type in initializer (different modifiers)
@ 2015-03-25 10:07 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2015-03-25 10:07 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: 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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-25 10:07 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:07 [next:master 6751/6952] drivers/hwmon/ina2xx.c:162:20: 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