* [PATCH] staging:nvec: Fix several coding style warnings
@ 2014-07-07 22:31 Guillaume Clement
2014-07-07 22:31 ` [PATCH 1/5] staging:nvec: Fix "unnecessary else" coding style warning Guillaume Clement
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Guillaume Clement @ 2014-07-07 22:31 UTC (permalink / raw)
To: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman
Cc: ac100, linux-tegra, devel, linux-kernel
This fixes several warnings in the nvec staging driver.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] staging:nvec: Fix "unnecessary else" coding style warning.
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
@ 2014-07-07 22:31 ` Guillaume Clement
2014-07-07 22:31 ` [PATCH 2/5] staging:nvec: Remove unnessary out of memory message Guillaume Clement
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Guillaume Clement @ 2014-07-07 22:31 UTC (permalink / raw)
To: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman
Cc: ac100, linux-tegra, devel, linux-kernel, Guillaume Clement
The last else is unnessary as all the if statements end with a return.
Signed-off-by: Guillaume Clément <gclement@baobob.org>
---
drivers/staging/nvec/nvec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 90f1c4d..8a3dd47 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -232,8 +232,7 @@ static size_t nvec_msg_size(struct nvec_msg *msg)
return 2;
else if (event_length == NVEC_3BYTES)
return 3;
- else
- return 0;
+ return 0;
}
/**
--
1.8.5.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] staging:nvec: Remove unnessary out of memory message.
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
2014-07-07 22:31 ` [PATCH 1/5] staging:nvec: Fix "unnecessary else" coding style warning Guillaume Clement
@ 2014-07-07 22:31 ` Guillaume Clement
2014-07-07 22:31 ` [PATCH 3/5] staging:nvec: Add missing blank line after declarations Guillaume Clement
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Guillaume Clement @ 2014-07-07 22:31 UTC (permalink / raw)
To: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman
Cc: ac100, linux-tegra, devel, linux-kernel, Guillaume Clement
Logging messages that show some type of "out of memory" error
are generally unnecessary as there is a generic message and
a stack dump done by the memory subsystem.
Signed-off-by: Guillaume Clément <gclement@baobob.org>
---
drivers/staging/nvec/nvec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 8a3dd47..d325048 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -806,10 +806,9 @@ static int tegra_nvec_probe(struct platform_device *pdev)
}
nvec = devm_kzalloc(&pdev->dev, sizeof(struct nvec_chip), GFP_KERNEL);
- if (nvec == NULL) {
- dev_err(&pdev->dev, "failed to reserve memory\n");
+ if (nvec == NULL)
return -ENOMEM;
- }
+
platform_set_drvdata(pdev, nvec);
nvec->dev = &pdev->dev;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] staging:nvec: Add missing blank line after declarations.
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
2014-07-07 22:31 ` [PATCH 1/5] staging:nvec: Fix "unnecessary else" coding style warning Guillaume Clement
2014-07-07 22:31 ` [PATCH 2/5] staging:nvec: Remove unnessary out of memory message Guillaume Clement
@ 2014-07-07 22:31 ` Guillaume Clement
2014-07-07 22:31 ` [PATCH 4/5] " Guillaume Clement
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Guillaume Clement @ 2014-07-07 22:31 UTC (permalink / raw)
To: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman
Cc: ac100, linux-tegra, devel, linux-kernel, Guillaume Clement
Signed-off-by: Guillaume Clément <gclement@baobob.org>
---
drivers/staging/nvec/nvec_paz00.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/nvec/nvec_paz00.c b/drivers/staging/nvec/nvec_paz00.c
index 934b796..e2e675a 100644
--- a/drivers/staging/nvec/nvec_paz00.c
+++ b/drivers/staging/nvec/nvec_paz00.c
@@ -35,6 +35,7 @@ static void nvec_led_brightness_set(struct led_classdev *led_cdev,
{
struct nvec_led *led = to_nvec_led(led_cdev);
unsigned char buf[] = NVEC_LED_REQ;
+
buf[4] = value;
nvec_write_async(led->nvec, buf, sizeof(buf));
--
1.8.5.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] staging:nvec: Add missing blank line after declarations.
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
` (2 preceding siblings ...)
2014-07-07 22:31 ` [PATCH 3/5] staging:nvec: Add missing blank line after declarations Guillaume Clement
@ 2014-07-07 22:31 ` Guillaume Clement
2014-07-07 22:31 ` [PATCH 5/5] " Guillaume Clement
2014-07-08 10:14 ` [PATCH] staging:nvec: Fix several coding style warnings Marc Dietrich
5 siblings, 0 replies; 8+ messages in thread
From: Guillaume Clement @ 2014-07-07 22:31 UTC (permalink / raw)
To: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman
Cc: ac100, linux-tegra, devel, linux-kernel, Guillaume Clement
Signed-off-by: Guillaume Clément <gclement@baobob.org>
---
drivers/staging/nvec/nvec_power.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/nvec/nvec_power.c b/drivers/staging/nvec/nvec_power.c
index aacfcd6..6446e15 100644
--- a/drivers/staging/nvec/nvec_power.c
+++ b/drivers/staging/nvec/nvec_power.c
@@ -226,6 +226,7 @@ static int nvec_power_get_property(struct power_supply *psy,
union power_supply_propval *val)
{
struct nvec_power *power = dev_get_drvdata(psy->dev->parent);
+
switch (psp) {
case POWER_SUPPLY_PROP_ONLINE:
val->intval = power->on;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] staging:nvec: Add missing blank line after declarations.
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
` (3 preceding siblings ...)
2014-07-07 22:31 ` [PATCH 4/5] " Guillaume Clement
@ 2014-07-07 22:31 ` Guillaume Clement
2014-07-08 8:26 ` Dan Carpenter
2014-07-08 10:14 ` [PATCH] staging:nvec: Fix several coding style warnings Marc Dietrich
5 siblings, 1 reply; 8+ messages in thread
From: Guillaume Clement @ 2014-07-07 22:31 UTC (permalink / raw)
To: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman
Cc: ac100, linux-tegra, devel, linux-kernel, Guillaume Clement
Signed-off-by: Guillaume Clément <gclement@baobob.org>
---
drivers/staging/nvec/nvec_ps2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 45b2f13..f56f1db 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -53,12 +53,14 @@ static struct nvec_ps2 ps2_dev;
static int ps2_startstreaming(struct serio *ser_dev)
{
unsigned char buf[] = { NVEC_PS2, AUTO_RECEIVE_N, PACKET_SIZE };
+
return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
}
static void ps2_stopstreaming(struct serio *ser_dev)
{
unsigned char buf[] = { NVEC_PS2, CANCEL_AUTO_RECEIVE };
+
nvec_write_async(ps2_dev.nvec, buf, sizeof(buf));
}
--
1.8.5.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 5/5] staging:nvec: Add missing blank line after declarations.
2014-07-07 22:31 ` [PATCH 5/5] " Guillaume Clement
@ 2014-07-08 8:26 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2014-07-08 8:26 UTC (permalink / raw)
To: Guillaume Clement
Cc: Julian Andres Klode, Marc Dietrich, Greg Kroah-Hartman,
linux-tegra, devel, linux-kernel, ac100
Looks ok. If you wanted it probably would have been better to fold
patches 3, 4, and 5 together but this is ok too.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging:nvec: Fix several coding style warnings
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
` (4 preceding siblings ...)
2014-07-07 22:31 ` [PATCH 5/5] " Guillaume Clement
@ 2014-07-08 10:14 ` Marc Dietrich
5 siblings, 0 replies; 8+ messages in thread
From: Marc Dietrich @ 2014-07-08 10:14 UTC (permalink / raw)
To: Guillaume Clement
Cc: Julian Andres Klode, Greg Kroah-Hartman, ac100, linux-tegra,
devel, linux-kernel
Hi Guillaume,
On Tue, 8 Jul 2014 00:31:32 +0200
Guillaume Clement <gclement@baobob.org> wrote:
> This fixes several warnings in the nvec staging driver.
Pawel Lebioda already sent a patch series to fix these issues
a few days ago. From a first look, your patch series looks identical.
Thanks anyway for taking your time.
Marc
Marc Dietrich <marvin24@gmx.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-08 10:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 22:31 [PATCH] staging:nvec: Fix several coding style warnings Guillaume Clement
2014-07-07 22:31 ` [PATCH 1/5] staging:nvec: Fix "unnecessary else" coding style warning Guillaume Clement
2014-07-07 22:31 ` [PATCH 2/5] staging:nvec: Remove unnessary out of memory message Guillaume Clement
2014-07-07 22:31 ` [PATCH 3/5] staging:nvec: Add missing blank line after declarations Guillaume Clement
2014-07-07 22:31 ` [PATCH 4/5] " Guillaume Clement
2014-07-07 22:31 ` [PATCH 5/5] " Guillaume Clement
2014-07-08 8:26 ` Dan Carpenter
2014-07-08 10:14 ` [PATCH] staging:nvec: Fix several coding style warnings Marc Dietrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).