2014-07-05 20:31:02

by Pawel Lebioda

[permalink] [raw]
Subject: [PATCH 0/2] staging: nvec: fix some coding style problems

The following patches fix some warnings reported by checkpatch.pl

Pawel Lebioda (2):
staging: nvec: remove unnecessary 'else' after 'return' statement
staging: nvec: remove unneccessary 'out of memory' message

drivers/staging/nvec/nvec.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

--
1.8.3.2


2014-07-05 20:31:09

by Pawel Lebioda

[permalink] [raw]
Subject: [PATCH 1/2] staging: nvec: remove unnecessary 'else' after 'return' statement

Fix the following warning reported by checkpatch.pl:

WARNING: else is not generally useful after a break or return
235: FILE: drivers/staging/nvec/nvec.c:235

Signed-off-by: Pawel Lebioda <[email protected]>
---
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.3.2

2014-07-05 20:31:07

by Pawel Lebioda

[permalink] [raw]
Subject: [PATCH 2/2] staging: nvec: remove unneccessary 'out of memory' message

Fix the following warning reported by checkpatch.pl:

WARNING: Possible unnecessary 'out of memory' message
811: FILE: drivers/staging/nvec/nvec.c:811

Signed-off-by: Pawel Lebioda <[email protected]>
---
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.3.2

2014-07-06 08:26:51

by Marc Dietrich

[permalink] [raw]
Subject: Re: [PATCH 0/2] staging: nvec: fix some coding style problems

Hi Pawel,

Am Samstag, 5. Juli 2014, 22:30:54 schrieb Pawel Lebioda:
> The following patches fix some warnings reported by checkpatch.pl
>
> Pawel Lebioda (2):
> staging: nvec: remove unnecessary 'else' after 'return' statement
> staging: nvec: remove unneccessary 'out of memory' message
>
> drivers/staging/nvec/nvec.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)

thanks for fixing, so for this series

Acked-by: Marc Dietrich <[email protected]>


Attachments:
signature.asc (490.00 B)
This is a digitally signed message part.

2014-07-07 05:53:31

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: nvec: remove unnecessary 'else' after 'return' statement

On Sat, Jul 05, 2014 at 10:30:55PM +0200, Pawel Lebioda wrote:
> Fix the following warning reported by checkpatch.pl:
>
> WARNING: else is not generally useful after a break or return
> 235: FILE: drivers/staging/nvec/nvec.c:235
>
> Signed-off-by: Pawel Lebioda <[email protected]>
> ---
> drivers/staging/nvec/nvec.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (437.00 B)
(No filename) (819.00 B)
Download all attachments

2014-07-07 05:53:43

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 2/2] staging: nvec: remove unneccessary 'out of memory' message

On Sat, Jul 05, 2014 at 10:30:56PM +0200, Pawel Lebioda wrote:
> Fix the following warning reported by checkpatch.pl:
>
> WARNING: Possible unnecessary 'out of memory' message
> 811: FILE: drivers/staging/nvec/nvec.c:811
>
> Signed-off-by: Pawel Lebioda <[email protected]>
> ---
> drivers/staging/nvec/nvec.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (432.00 B)
(No filename) (819.00 B)
Download all attachments