All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations
@ 2017-05-22  6:12 ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-22  6:12 UTC (permalink / raw)
  To: linuxdev, linux-wpan, netdev, Alexander Aring, Harry Morris,
	Stefan Schmidt
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 08:08:04 +0200

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

Markus Elfring (2):
  Delete an error message for a failed memory allocation in ca8210_probe()
  Delete an error message for a failed memory allocation in ca8210_skb_rx()

 drivers/net/ieee802154/ca8210.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

-- 
2.13.0

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

* [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations
@ 2017-05-22  6:12 ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-22  6:12 UTC (permalink / raw)
  To: linuxdev, linux-wpan, netdev, Alexander Aring, Harry Morris,
	Stefan Schmidt
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 08:08:04 +0200

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

Markus Elfring (2):
  Delete an error message for a failed memory allocation in ca8210_probe()
  Delete an error message for a failed memory allocation in ca8210_skb_rx()

 drivers/net/ieee802154/ca8210.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

-- 
2.13.0


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

* [PATCH 1/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_probe()
  2017-05-22  6:12 ` SF Markus Elfring
@ 2017-05-22  6:13   ` SF Markus Elfring
  -1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-22  6:13 UTC (permalink / raw)
  To: linuxdev, linux-wpan, netdev, Alexander Aring, Harry Morris,
	Stefan Schmidt
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 07:32:46 +0200

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/ieee802154/ca8210.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 25fd3b04b3c0..25ed11bb5ed3 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -3143,10 +3143,6 @@ static int ca8210_probe(struct spi_device *spi_device)
 
 	pdata = kmalloc(sizeof(*pdata), GFP_KERNEL);
 	if (!pdata) {
-		dev_crit(
-			&spi_device->dev,
-			"Could not allocate platform data\n"
-		);
 		ret = -ENOMEM;
 		goto error;
 	}
-- 
2.13.0

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

* [PATCH 1/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_pro
@ 2017-05-22  6:13   ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-22  6:13 UTC (permalink / raw)
  To: linuxdev, linux-wpan, netdev, Alexander Aring, Harry Morris,
	Stefan Schmidt
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 07:32:46 +0200

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/ieee802154/ca8210.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 25fd3b04b3c0..25ed11bb5ed3 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -3143,10 +3143,6 @@ static int ca8210_probe(struct spi_device *spi_device)
 
 	pdata = kmalloc(sizeof(*pdata), GFP_KERNEL);
 	if (!pdata) {
-		dev_crit(
-			&spi_device->dev,
-			"Could not allocate platform data\n"
-		);
 		ret = -ENOMEM;
 		goto error;
 	}
-- 
2.13.0


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

* [PATCH 2/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_skb_rx()
  2017-05-22  6:12 ` SF Markus Elfring
@ 2017-05-22  6:14   ` SF Markus Elfring
  -1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-22  6:14 UTC (permalink / raw)
  To: linuxdev, linux-wpan, netdev, Alexander Aring, Harry Morris,
	Stefan Schmidt
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 08:03:17 +0200

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/ieee802154/ca8210.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 25ed11bb5ed3..f6df75e80a60 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1808,10 +1808,9 @@ static int ca8210_skb_rx(
 
 	/* Allocate mtu size buffer for every rx packet */
 	skb = dev_alloc_skb(IEEE802154_MTU + sizeof(hdr));
-	if (!skb) {
-		dev_crit(&priv->spi->dev, "dev_alloc_skb failed\n");
+	if (!skb)
 		return -ENOMEM;
-	}
+
 	skb_reserve(skb, sizeof(hdr));
 
 	msdulen = data_ind[22]; /* msdu_length */
-- 
2.13.0

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

* [PATCH 2/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_skb
@ 2017-05-22  6:14   ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-22  6:14 UTC (permalink / raw)
  To: linuxdev, linux-wpan, netdev, Alexander Aring, Harry Morris,
	Stefan Schmidt
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 08:03:17 +0200

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/ieee802154/ca8210.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 25ed11bb5ed3..f6df75e80a60 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1808,10 +1808,9 @@ static int ca8210_skb_rx(
 
 	/* Allocate mtu size buffer for every rx packet */
 	skb = dev_alloc_skb(IEEE802154_MTU + sizeof(hdr));
-	if (!skb) {
-		dev_crit(&priv->spi->dev, "dev_alloc_skb failed\n");
+	if (!skb)
 		return -ENOMEM;
-	}
+
 	skb_reserve(skb, sizeof(hdr));
 
 	msdulen = data_ind[22]; /* msdu_length */
-- 
2.13.0


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

* Re: [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations
  2017-05-22  6:12 ` SF Markus Elfring
@ 2017-05-22  8:28   ` Marcel Holtmann
  -1 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2017-05-22  8:28 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linuxdev, linux-wpan, Network Development, Alexander Aring,
	Harry Morris, Stefan Schmidt, LKML, kernel-janitors

Hi Markus,

> Two update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (2):
>  Delete an error message for a failed memory allocation in ca8210_probe()
>  Delete an error message for a failed memory allocation in ca8210_skb_rx()
> 
> drivers/net/ieee802154/ca8210.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)

both patches have been applied to bluetooth-next tree.

Regards

Marcel

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

* Re: [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations
@ 2017-05-22  8:28   ` Marcel Holtmann
  0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2017-05-22  8:28 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linuxdev, linux-wpan, Network Development, Alexander Aring,
	Harry Morris, Stefan Schmidt, LKML, kernel-janitors

Hi Markus,

> Two update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (2):
>  Delete an error message for a failed memory allocation in ca8210_probe()
>  Delete an error message for a failed memory allocation in ca8210_skb_rx()
> 
> drivers/net/ieee802154/ca8210.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)

both patches have been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, other threads:[~2017-05-22  8:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-22  6:12 [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations SF Markus Elfring
2017-05-22  6:12 ` SF Markus Elfring
2017-05-22  6:13 ` [PATCH 1/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_probe() SF Markus Elfring
2017-05-22  6:13   ` [PATCH 1/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_pro SF Markus Elfring
2017-05-22  6:14 ` [PATCH 2/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_skb_rx() SF Markus Elfring
2017-05-22  6:14   ` [PATCH 2/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_skb SF Markus Elfring
2017-05-22  8:28 ` [PATCH 0/2] ieee802154: ca8210: Adjustments for two function implementations Marcel Holtmann
2017-05-22  8:28   ` Marcel Holtmann

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.