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
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
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
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]>
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]>
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]>