Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: twl4030-irq: Fix style warnings relating to pr_warn() and sizeof()

This is part of an effort to clean-up the MFD subsystem.

WARNING: Prefer pr_warn(... to pr_warning(...
+ pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret);

WARNING: sizeof buf should be sizeof(buf)
+ memset(buf, 0xff, sizeof buf);

WARNING: sizeof *agent should be sizeof(*agent)
+ agent = kzalloc(sizeof *agent, GFP_KERNEL);

Signed-off-by: Lee Jones <lee.jones@linaro.org>

Lee Jones 04aa4438 52149ad2

+3 -3
+3 -3
drivers/mfd/twl4030-irq.c
··· 297 297 ret = twl_i2c_read_u8(TWL_MODULE_PIH, &pih_isr, 298 298 REG_PIH_ISR_P1); 299 299 if (ret) { 300 - pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret); 300 + pr_warn("twl4030: I2C error %d reading PIH ISR\n", ret); 301 301 return IRQ_NONE; 302 302 } 303 303 ··· 338 338 irq_line = line; 339 339 340 340 /* disable all interrupts on our line */ 341 - memset(buf, 0xff, sizeof buf); 341 + memset(buf, 0xff, sizeof(buf)); 342 342 sih = sih_modules; 343 343 for (i = 0; i < nr_sih_modules; i++, sih++) { 344 344 /* skip USB -- it's funky */ ··· 646 646 if (status < 0) 647 647 return status; 648 648 649 - agent = kzalloc(sizeof *agent, GFP_KERNEL); 649 + agent = kzalloc(sizeof(*agent), GFP_KERNEL); 650 650 if (!agent) 651 651 return -ENOMEM; 652 652