diff mbox

[1/2] Fix checkpatch warnings in goldfish_events.c

Message ID 20180531233707.80702-1-rkir@google.com (mailing list archive)
State Accepted
Headers show

Commit Message

Roman Kiryanov May 31, 2018, 11:37 p.m. UTC
From: Roman Kiryanov <rkir@google.com>

Address issues pointed by checkpatch.pl

Signed-off-by: Roman Kiryanov <rkir@google.com>
---
 drivers/input/keyboard/goldfish_events.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Dmitry Torokhov June 1, 2018, 12:04 a.m. UTC | #1
On Thu, May 31, 2018 at 04:37:06PM -0700, rkir@google.com wrote:
> From: Roman Kiryanov <rkir@google.com>
> 
> Address issues pointed by checkpatch.pl
> 
> Signed-off-by: Roman Kiryanov <rkir@google.com>

Applied, thank you.

> ---
>  drivers/input/keyboard/goldfish_events.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c
> index f6e643b589b6..e8dae6195b30 100644
> --- a/drivers/input/keyboard/goldfish_events.c
> +++ b/drivers/input/keyboard/goldfish_events.c
> @@ -45,7 +45,7 @@ struct event_dev {
>  static irqreturn_t events_interrupt(int irq, void *dev_id)
>  {
>  	struct event_dev *edev = dev_id;
> -	unsigned type, code, value;
> +	unsigned int type, code, value;
>  
>  	type = __raw_readl(edev->addr + REG_READ);
>  	code = __raw_readl(edev->addr + REG_READ);
> @@ -57,7 +57,7 @@ static irqreturn_t events_interrupt(int irq, void *dev_id)
>  }
>  
>  static void events_import_bits(struct event_dev *edev,
> -			unsigned long bits[], unsigned type, size_t count)
> +			unsigned long bits[], unsigned int type, size_t count)
>  {
>  	void __iomem *addr = edev->addr;
>  	int i, j;
> @@ -99,6 +99,7 @@ static void events_import_abs_params(struct event_dev *edev)
>  
>  		for (j = 0; j < ARRAY_SIZE(val); j++) {
>  			int offset = (i * ARRAY_SIZE(val) + j) * sizeof(u32);
> +
>  			val[j] = __raw_readl(edev->addr + REG_DATA + offset);
>  		}
>  
> @@ -112,7 +113,7 @@ static int events_probe(struct platform_device *pdev)
>  	struct input_dev *input_dev;
>  	struct event_dev *edev;
>  	struct resource *res;
> -	unsigned keymapnamelen;
> +	unsigned int keymapnamelen;
>  	void __iomem *addr;
>  	int irq;
>  	int i;
> @@ -150,7 +151,7 @@ static int events_probe(struct platform_device *pdev)
>  	for (i = 0; i < keymapnamelen; i++)
>  		edev->name[i] = __raw_readb(edev->addr + REG_DATA + i);
>  
> -	pr_debug("events_probe() keymap=%s\n", edev->name);
> +	pr_debug("%s: keymap=%s\n", __func__, edev->name);
>  
>  	input_dev->name = edev->name;
>  	input_dev->id.bustype = BUS_HOST;
> -- 
> 2.17.0.921.gf22659ad46-goog
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c
index f6e643b589b6..e8dae6195b30 100644
--- a/drivers/input/keyboard/goldfish_events.c
+++ b/drivers/input/keyboard/goldfish_events.c
@@ -45,7 +45,7 @@  struct event_dev {
 static irqreturn_t events_interrupt(int irq, void *dev_id)
 {
 	struct event_dev *edev = dev_id;
-	unsigned type, code, value;
+	unsigned int type, code, value;
 
 	type = __raw_readl(edev->addr + REG_READ);
 	code = __raw_readl(edev->addr + REG_READ);
@@ -57,7 +57,7 @@  static irqreturn_t events_interrupt(int irq, void *dev_id)
 }
 
 static void events_import_bits(struct event_dev *edev,
-			unsigned long bits[], unsigned type, size_t count)
+			unsigned long bits[], unsigned int type, size_t count)
 {
 	void __iomem *addr = edev->addr;
 	int i, j;
@@ -99,6 +99,7 @@  static void events_import_abs_params(struct event_dev *edev)
 
 		for (j = 0; j < ARRAY_SIZE(val); j++) {
 			int offset = (i * ARRAY_SIZE(val) + j) * sizeof(u32);
+
 			val[j] = __raw_readl(edev->addr + REG_DATA + offset);
 		}
 
@@ -112,7 +113,7 @@  static int events_probe(struct platform_device *pdev)
 	struct input_dev *input_dev;
 	struct event_dev *edev;
 	struct resource *res;
-	unsigned keymapnamelen;
+	unsigned int keymapnamelen;
 	void __iomem *addr;
 	int irq;
 	int i;
@@ -150,7 +151,7 @@  static int events_probe(struct platform_device *pdev)
 	for (i = 0; i < keymapnamelen; i++)
 		edev->name[i] = __raw_readb(edev->addr + REG_DATA + i);
 
-	pr_debug("events_probe() keymap=%s\n", edev->name);
+	pr_debug("%s: keymap=%s\n", __func__, edev->name);
 
 	input_dev->name = edev->name;
 	input_dev->id.bustype = BUS_HOST;