On Tue, Apr 11, 2017 at 03:15:32PM +0200, SF Markus Elfring wrote: > From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> > 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@xxxxxxxxxxxxxxxxxxxxx> > --- > 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; > } This patch does not apply to Greg's staging-testing branch. Sorry Markus a patch was merged the same day you submitted this one that refactored this code. The patch was good though, good spotting. Good luck, Tobin. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel