WARNING: please write a paragraph that describes the config symbol fully
#31: FILE: drivers/leds/Kconfig:397:
+config LEDS_LM3556
ERROR: "foo * bar" should be "foo *bar"
#201: FILE: drivers/leds/leds-lm3556.c:143:
+int lm3556_read_reg(struct i2c_client *client, u8 reg, u8 * val)
WARNING: simple_strtoul is obsolete, use kstrtoul instead
#380: FILE: drivers/leds/leds-lm3556.c:322:
+ unsigned long state = simple_strtoul(buf, &after, 10);
total: 1 errors, 2 warnings, 727 lines checked
./patches/leds-add-led-driver-for-lm3556-chip.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Cc: Axel Lin <axel.lin@gmail.com>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Cc: Geon Si Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
};
/* i2c access*/
-int lm3556_read_reg(struct i2c_client *client, u8 reg, u8 * val)
+int lm3556_read_reg(struct i2c_client *client, u8 reg, u8 *val)
{
int ret;
struct lm3556_chip_data *chip = i2c_get_clientdata(client);
const char *buf, size_t size)
{
char *after;
- ssize_t ret = -EINVAL;
+ ssize_t ret;
struct i2c_client *client = container_of(dev->parent,
struct i2c_client, dev);
- unsigned long state = simple_strtoul(buf, &after, 10);
+ unsigned long state;
size_t count = after - buf;
+ ret = kstrtoul(buf, 10, &state);
+ if (ret)
+ goto out;
if (isspace(*after))
count++;
lm3556_write_reg(client, REG_INDIC_PERIOD,
indicator_pattern[state].period_cnt);
}
+out:
return ret;
}