All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] video/fbdev/omap: Adjustments for two function implementations
@ 2017-11-26 17:40 ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:40 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:38:48 +0100

Three update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  Delete an error message for a failed memory allocation in omapfb_do_probe()
  Improve a size determination in omapfb_do_probe()
  Delete an error message for a failed memory allocation in mipid_spi_probe()

 drivers/video/fbdev/omap/lcd_mipid.c   | 4 +---
 drivers/video/fbdev/omap/omapfb_main.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

-- 
2.15.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 0/3] video/fbdev/omap: Adjustments for two function implementations
@ 2017-11-26 17:40 ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:40 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:38:48 +0100

Three update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  Delete an error message for a failed memory allocation in omapfb_do_probe()
  Improve a size determination in omapfb_do_probe()
  Delete an error message for a failed memory allocation in mipid_spi_probe()

 drivers/video/fbdev/omap/lcd_mipid.c   | 4 +---
 drivers/video/fbdev/omap/omapfb_main.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

-- 
2.15.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/3] video: omap: Delete an error message for a failed memory allocation in omapfb_do_probe()
  2017-11-26 17:40 ` SF Markus Elfring
  (?)
@ 2017-11-26 17:41   ` SF Markus Elfring
  -1 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:41 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:09:15 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/omapfb_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 3479a47a3082..b0d91524bf6c 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1647,8 +1647,6 @@ static int omapfb_do_probe(struct platform_device *pdev,
 
 	fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
 	if (fbdev == NULL) {
-		dev_err(&pdev->dev,
-			"unable to allocate memory for device info\n");
 		r = -ENOMEM;
 		goto cleanup;
 	}
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 1/3] video: omap: Delete an error message for a failed memory allocation in omapfb_do_probe()
@ 2017-11-26 17:41   ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:41 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:09:15 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/omapfb_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 3479a47a3082..b0d91524bf6c 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1647,8 +1647,6 @@ static int omapfb_do_probe(struct platform_device *pdev,
 
 	fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
 	if (fbdev = NULL) {
-		dev_err(&pdev->dev,
-			"unable to allocate memory for device info\n");
 		r = -ENOMEM;
 		goto cleanup;
 	}
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 1/3] video: omap: Delete an error message for a failed memory allocation in omapfb_do_probe()
@ 2017-11-26 17:41   ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:41 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:09:15 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/omapfb_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 3479a47a3082..b0d91524bf6c 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1647,8 +1647,6 @@ static int omapfb_do_probe(struct platform_device *pdev,
 
 	fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
 	if (fbdev == NULL) {
-		dev_err(&pdev->dev,
-			"unable to allocate memory for device info\n");
 		r = -ENOMEM;
 		goto cleanup;
 	}
-- 
2.15.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] video: omap: Improve a size determination in omapfb_do_probe()
  2017-11-26 17:40 ` SF Markus Elfring
  (?)
@ 2017-11-26 17:42   ` SF Markus Elfring
  -1 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:42 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:16:20 +0100

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/omapfb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index b0d91524bf6c..c47059430ca8 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1645,7 +1645,7 @@ static int omapfb_do_probe(struct platform_device *pdev,
 		goto cleanup;
 	}
 
-	fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
+	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
 	if (fbdev == NULL) {
 		r = -ENOMEM;
 		goto cleanup;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] video: omap: Improve a size determination in omapfb_do_probe()
@ 2017-11-26 17:42   ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:42 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:16:20 +0100

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/omapfb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index b0d91524bf6c..c47059430ca8 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1645,7 +1645,7 @@ static int omapfb_do_probe(struct platform_device *pdev,
 		goto cleanup;
 	}
 
-	fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
+	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
 	if (fbdev = NULL) {
 		r = -ENOMEM;
 		goto cleanup;
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] video: omap: Improve a size determination in omapfb_do_probe()
@ 2017-11-26 17:42   ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:42 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:16:20 +0100

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/omapfb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index b0d91524bf6c..c47059430ca8 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1645,7 +1645,7 @@ static int omapfb_do_probe(struct platform_device *pdev,
 		goto cleanup;
 	}
 
-	fbdev = kzalloc(sizeof(struct omapfb_device), GFP_KERNEL);
+	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
 	if (fbdev == NULL) {
 		r = -ENOMEM;
 		goto cleanup;
-- 
2.15.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] video: omap: Delete an error message for a failed memory allocation in mipid_spi_probe()
  2017-11-26 17:40 ` SF Markus Elfring
  (?)
@ 2017-11-26 17:43   ` SF Markus Elfring
  -1 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:43 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:21:25 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/lcd_mipid.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index e3a85432f926..e71b674b47d8 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -564,10 +564,8 @@ static int mipid_spi_probe(struct spi_device *spi)
 	int r;
 
 	md = kzalloc(sizeof(*md), GFP_KERNEL);
-	if (md == NULL) {
-		dev_err(&spi->dev, "out of memory\n");
+	if (!md)
 		return -ENOMEM;
-	}
 
 	spi->mode = SPI_MODE_0;
 	md->spi = spi;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] video: omap: Delete an error message for a failed memory allocation in mipid_spi_probe()
@ 2017-11-26 17:43   ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:43 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:21:25 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/lcd_mipid.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index e3a85432f926..e71b674b47d8 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -564,10 +564,8 @@ static int mipid_spi_probe(struct spi_device *spi)
 	int r;
 
 	md = kzalloc(sizeof(*md), GFP_KERNEL);
-	if (md = NULL) {
-		dev_err(&spi->dev, "out of memory\n");
+	if (!md)
 		return -ENOMEM;
-	}
 
 	spi->mode = SPI_MODE_0;
 	md->spi = spi;
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] video: omap: Delete an error message for a failed memory allocation in mipid_spi_probe()
@ 2017-11-26 17:43   ` SF Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: SF Markus Elfring @ 2017-11-26 17:43 UTC (permalink / raw)
  To: linux-omap, linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz,
	Tomi Valkeinen
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:21:25 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/omap/lcd_mipid.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index e3a85432f926..e71b674b47d8 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -564,10 +564,8 @@ static int mipid_spi_probe(struct spi_device *spi)
 	int r;
 
 	md = kzalloc(sizeof(*md), GFP_KERNEL);
-	if (md == NULL) {
-		dev_err(&spi->dev, "out of memory\n");
+	if (!md)
 		return -ENOMEM;
-	}
 
 	spi->mode = SPI_MODE_0;
 	md->spi = spi;
-- 
2.15.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] video: omap: Improve a size determination in omapfb_do_probe()
  2017-11-26 17:42   ` SF Markus Elfring
  (?)
@ 2018-04-26 10:22     ` Bartlomiej Zolnierkiewicz
  -1 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-26 10:22 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-omap, linux-fbdev, dri-devel, Tomi Valkeinen, LKML,
	kernel-janitors

On Sunday, November 26, 2017 06:42:23 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 26 Nov 2017 18:16:20 +0100
> 
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch queued for 4.18, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] video: omap: Improve a size determination in omapfb_do_probe()
@ 2018-04-26 10:22     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-26 10:22 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-fbdev, kernel-janitors, LKML, dri-devel, Tomi Valkeinen,
	linux-omap

On Sunday, November 26, 2017 06:42:23 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 26 Nov 2017 18:16:20 +0100
> 
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch queued for 4.18, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] video: omap: Improve a size determination in omapfb_do_probe()
@ 2018-04-26 10:22     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-26 10:22 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-fbdev, kernel-janitors, LKML, dri-devel, Tomi Valkeinen,
	linux-omap

On Sunday, November 26, 2017 06:42:23 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 26 Nov 2017 18:16:20 +0100
> 
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch queued for 4.18, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-04-26 10:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-26 17:40 [PATCH 0/3] video/fbdev/omap: Adjustments for two function implementations SF Markus Elfring
2017-11-26 17:40 ` SF Markus Elfring
2017-11-26 17:41 ` [PATCH 1/3] video: omap: Delete an error message for a failed memory allocation in omapfb_do_probe() SF Markus Elfring
2017-11-26 17:41   ` SF Markus Elfring
2017-11-26 17:41   ` SF Markus Elfring
2017-11-26 17:42 ` [PATCH 2/3] video: omap: Improve a size determination " SF Markus Elfring
2017-11-26 17:42   ` SF Markus Elfring
2017-11-26 17:42   ` SF Markus Elfring
2018-04-26 10:22   ` Bartlomiej Zolnierkiewicz
2018-04-26 10:22     ` Bartlomiej Zolnierkiewicz
2018-04-26 10:22     ` Bartlomiej Zolnierkiewicz
2017-11-26 17:43 ` [PATCH 3/3] video: omap: Delete an error message for a failed memory allocation in mipid_spi_probe() SF Markus Elfring
2017-11-26 17:43   ` SF Markus Elfring
2017-11-26 17:43   ` SF Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.