[next:master 6752/6952] drivers/hwmon/lm85.c:194:16: sparse: incorrect type in initializer (different modifiers)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]