2018-02-02 21:13:16

by SF Markus Elfring

[permalink] [raw]
Subject: [PATCH 0/2] HSI: ssi_protocol: Adjustments for two function implementations

From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 21:03:45 +0100

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 ssi_protocol_probe()
Fix a typo in two comment lines

drivers/hsi/clients/ssi_protocol.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

--
2.16.1



2018-02-02 21:12:31

by SF Markus Elfring

[permalink] [raw]
Subject: [PATCH 1/2] HSI: ssi_protocol: Delete an error message for a failed memory allocation in ssi_protocol_probe()

From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 20:02:17 +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 <[email protected]>
---
drivers/hsi/clients/ssi_protocol.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c
index 9b167bc6eee4..0bccea2fa119 100644
--- a/drivers/hsi/clients/ssi_protocol.c
+++ b/drivers/hsi/clients/ssi_protocol.c
@@ -1088,10 +1088,8 @@ static int ssi_protocol_probe(struct device *dev)
int err;

ssi = kzalloc(sizeof(*ssi), GFP_KERNEL);
- if (!ssi) {
- dev_err(dev, "No memory for ssi protocol\n");
+ if (!ssi)
return -ENOMEM;
- }

spin_lock_init(&ssi->lock);
timer_setup(&ssi->rx_wd, ssip_rx_wd, TIMER_DEFERRABLE);
--
2.16.1


2018-02-02 21:13:11

by SF Markus Elfring

[permalink] [raw]
Subject: [PATCH 2/2] HSI: ssi_protocol: Fix a typo in two comment lines

From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 20:57:23 +0100

Adjust two words in this description.

Signed-off-by: Markus Elfring <[email protected]>
---
drivers/hsi/clients/ssi_protocol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c
index 0bccea2fa119..6dbead863d07 100644
--- a/drivers/hsi/clients/ssi_protocol.c
+++ b/drivers/hsi/clients/ssi_protocol.c
@@ -993,8 +993,8 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
goto inc_dropped;

/*
- * Modem sends Phonet messages over SSI with its own endianess...
- * Assume that modem has the same endianess as we do.
+ * Modem sends Phonet messages over SSI with its own endianness.
+ * Assume that modem has the same endianness as we do.
*/
if (skb_cow_head(skb, 0))
goto drop;
--
2.16.1