[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12095569-1d23-7676-adef-b89ebc3a229b@users.sourceforge.net>
Date: Tue, 11 Apr 2017 15:15:32 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sabitha George <sabitha.george@...il.com>,
sayli karnik <karniksayli1995@...il.com>,
"Tobin C. Harding" <me@...in.cc>, Wolfram Sang <wsa@...-dreams.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org, Joe Perches <joe@...ches.com>
Subject: [PATCH] staging: ks7010: Adjust dev_err() calls in
ks7010_sdio_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 11 Apr 2017 14:54:35 +0200
The use of the logging function "dev_err" was introduced here on 2016-09-26.
I find the following implementation details worth for another look.
* Reduce expressions for the first input parameter "dev".
* Omit an extra module prefix in passed error messages because the device name
will be displayed by the function "__dev_printk".
Fixes: 9887b5e51fafaf919601ccb8bdae1e0ad749032f ("staging: ks7010: Fix warnings on printk() usage")
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/staging/ks7010/ks7010_sdio.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index b16618b41253..85feb170869b 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -955,12 +955,11 @@ static int ks7010_sdio_probe(struct sdio_func *func,
/* private memory allocate */
netdev = alloc_etherdev(sizeof(*priv));
if (!netdev) {
- dev_err(&card->func->dev, "ks7010 : Unable to alloc new net device\n");
+ dev_err(&func->dev, "Unable to alloc new net device\n");
goto err_release_irq;
}
if (dev_alloc_name(netdev, "wlan%d") < 0) {
- dev_err(&card->func->dev,
- "ks7010 : Couldn't get name!\n");
+ dev_err(&func->dev, "Couldn't get name!\n");
goto err_free_netdev;
}
@@ -1000,9 +999,9 @@ static int ks7010_sdio_probe(struct sdio_func *func,
/* Upload firmware */
ret = ks7010_upload_firmware(priv, card); /* firmware load */
if (ret) {
- dev_err(&card->func->dev,
- "ks7010: firmware load failed !! return code = %d\n",
- ret);
+ dev_err(&func->dev,
+ "firmware load failed! return code = %d\n",
+ ret);
goto err_free_read_buf;
}
--
2.12.2
Powered by blists - more mailing lists