From 80fb8a850ecdcdd515e1ea3d3d97901ff0085e50 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Fri, 2 Feb 2018 20:57:23 +0100 Subject: [PATCH 1/4] HSI: ssi_protocol: Fix a typo in two comment lines Adjust two words in this description. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel --- 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 9b167bc6eee4..ac3415b4072c 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; From 2d8236d17586f373e5c2b0d4cefccd4a5bef7a92 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Fri, 2 Feb 2018 20:02:17 +0100 Subject: [PATCH 2/4] HSI: ssi_protocol: Delete an error message for a failed memory allocation in ssi_protocol_probe() 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 Signed-off-by: Sebastian Reichel --- 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 ac3415b4072c..6dbead863d07 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); From 852041d1ce474a9e3ab81abc851985a6d05b05ba Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Fri, 16 Mar 2018 14:33:01 +0000 Subject: [PATCH 3/4] HSI: ssi_protocol: fix spelling mistake: "trigerred" -> "triggered" Trivial fix to spelling mistake in dev_err error message text. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel --- 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 6dbead863d07..561abf7bdf1f 100644 --- a/drivers/hsi/clients/ssi_protocol.c +++ b/drivers/hsi/clients/ssi_protocol.c @@ -495,7 +495,7 @@ static void ssip_rx_wd(struct timer_list *t) struct ssi_protocol *ssi = from_timer(ssi, t, rx_wd); struct hsi_client *cl = ssi->cl; - dev_err(&cl->device, "Watchdog trigerred\n"); + dev_err(&cl->device, "Watchdog triggered\n"); ssip_error(cl); } @@ -504,7 +504,7 @@ static void ssip_tx_wd(struct timer_list *t) struct ssi_protocol *ssi = from_timer(ssi, t, tx_wd); struct hsi_client *cl = ssi->cl; - dev_err(&cl->device, "Watchdog trigerred\n"); + dev_err(&cl->device, "Watchdog triggered\n"); ssip_error(cl); } From e3d7fbab062b877b96c09ffb43733502cdc1bd0a Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Fri, 2 Feb 2018 21:21:12 +0100 Subject: [PATCH 4/4] HSI: hsi_char: Delete an error message for a failed memory allocation in hsc_probe() 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 Signed-off-by: Sebastian Reichel --- drivers/hsi/clients/hsi_char.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index cf9c2a332ad8..9d2a6d64dfb8 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c @@ -697,10 +697,9 @@ static int hsc_probe(struct device *dev) int i; cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL); - if (!cl_data) { - dev_err(dev, "Could not allocate hsc_client_data\n"); + if (!cl_data) return -ENOMEM; - } + hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl)); if (!hsc_major) { ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor,