Re: [PATCH 2/3] leds: add debugfs to device trigger

From: kbuild test robot
Date: Mon Sep 28 2015 - 23:42:47 EST


Hi Maciek,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/leds/trigger/ledtrig-device.c:214:22: sparse: incorrect type in argument 1 (different address spaces)
drivers/leds/trigger/ledtrig-device.c:214:22: expected char const *<noident>
drivers/leds/trigger/ledtrig-device.c:214:22: got char const [noderef] <asn:1>*buf

vim +214 drivers/leds/trigger/ledtrig-device.c

198 .read = seq_read,
199 .llseek = seq_lseek,
200 .release = single_release
201 };
202
203 static int get_dev_from_user(const char __user *buf, size_t size,
204 dev_t *dev)
205 {
206 unsigned int major;
207 unsigned int minor;
208 int ret;
209
210 WARN_ON(dev == NULL);
211 if (dev == NULL)
212 return -EINVAL;
213
> 214 ret = sscanf(buf, "%u:%u", &major, &minor);
215 if (ret < 2)
216 return -EINVAL;
217
218 *dev = MKDEV(major, minor);
219 return 0;
220 }
221
222 static ssize_t ledtrig_dev_register_write(struct file *filp,

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/