From: YAMANE Toshiaki <yamanetoshi@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, YAMANE Toshiaki <yamanetoshi@gmail.com>
Subject: [PATCH 5/7] staging/gdm72xx: Use dev_ printks in sdio_boot.c
Date: Mon, 29 Oct 2012 20:05:30 +0900 [thread overview]
Message-ID: <1351508730-1857-1-git-send-email-yamanetoshi@gmail.com> (raw)
In-Reply-To: <1351508627-1713-1-git-send-email-yamanetoshi@gmail.com>
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
---
drivers/staging/gdm72xx/sdio_boot.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/gdm72xx/sdio_boot.c b/drivers/staging/gdm72xx/sdio_boot.c
index 38feb1a..6291829 100644
--- a/drivers/staging/gdm72xx/sdio_boot.c
+++ b/drivers/staging/gdm72xx/sdio_boot.c
@@ -65,15 +65,15 @@ static int download_image(struct sdio_func *func, const char *img_name)
ret = request_firmware(&firm, img_name, &func->dev);
if (ret < 0) {
- printk(KERN_ERR
- "requesting firmware %s failed with error %d\n",
+ dev_err(&func->dev,
+ "requesting firmware %s failed with error %d\n",
img_name, ret);
return ret;
}
buf = kmalloc(DOWNLOAD_SIZE + TYPE_A_HEADER_SIZE, GFP_KERNEL);
if (buf == NULL) {
- printk(KERN_ERR "Error: kmalloc\n");
+ dev_err(&func->dev, "Error: kmalloc\n");
return -ENOMEM;
}
@@ -101,8 +101,9 @@ static int download_image(struct sdio_func *func, const char *img_name)
memcpy(buf+TYPE_A_HEADER_SIZE, firm->data + pos, len);
ret = sdio_memcpy_toio(func, 0, buf, len + TYPE_A_HEADER_SIZE);
if (ret < 0) {
- printk(KERN_ERR "gdmwm: send image error: "
- "packet number = %d ret = %d\n", pno, ret);
+ dev_err(&func->dev,
+ "send image error: packet number = %d ret = %d\n",
+ pno, ret);
goto out;
}
@@ -110,13 +111,14 @@ static int download_image(struct sdio_func *func, const char *img_name)
break;
if (!ack_ready(func)) {
ret = -EIO;
- printk(KERN_ERR "gdmwm: Ack is not ready.\n");
+ dev_err(&func->dev, "Ack is not ready.\n");
goto out;
}
ret = sdio_memcpy_fromio(func, buf, 0, TYPE_A_LOOKAHEAD_SIZE);
if (ret < 0) {
- printk(KERN_ERR "gdmwm: receive ack error: "
- "packet number = %d ret = %d\n", pno, ret);
+ dev_err(&func->dev,
+ "receive ack error: packet number = %d ret = %d\n",
+ pno, ret);
goto out;
}
sdio_writeb(func, 0x01, 0x13, &ret);
@@ -140,19 +142,20 @@ int sdio_boot(struct sdio_func *func)
tx_buf = kmalloc(YMEM0_SIZE, GFP_KERNEL);
if (tx_buf == NULL) {
- printk(KERN_ERR "Error: kmalloc: %s %d\n", __func__, __LINE__);
+ dev_err(&func->dev, "Error: kmalloc: %s %d\n",
+ __func__, __LINE__);
return -ENOMEM;
}
ret = download_image(func, krn_name);
if (ret)
goto restore_fs;
- printk(KERN_INFO "GCT: Kernel download success.\n");
+ dev_info(&func->dev, "GCT: Kernel download success.\n");
ret = download_image(func, rfs_name);
if (ret)
goto restore_fs;
- printk(KERN_INFO "GCT: Filesystem download success.\n");
+ dev_info(&func->dev, "GCT: Filesystem download success.\n");
restore_fs:
kfree(tx_buf);
--
1.7.9.5
next prev parent reply other threads:[~2012-10-29 11:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 11:03 [PATCH 1/7] staging/gdm72xx: Use netdev_ or pr_ printks in gdm_wimax.c YAMANE Toshiaki
2012-10-29 11:04 ` [PATCH 2/7] staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c YAMANE Toshiaki
2012-10-29 11:05 ` [PATCH 3/7] staging/gdm72xx: Use netdev_ or pr_ printks in netlink_k.c YAMANE Toshiaki
2012-10-29 11:05 ` [PATCH 4/7] staging/gdm72xx: Use dev_ printks in gdm_sdio.c YAMANE Toshiaki
2012-10-29 11:05 ` YAMANE Toshiaki [this message]
2012-10-29 11:05 ` [PATCH 6/7] staging/gdm72xx: Use dev_ printks in gdm_usb.c YAMANE Toshiaki
2012-10-29 11:05 ` [PATCH 7/7] staging/gdm72xx: Use dev_ printks in usb_boot.c YAMANE Toshiaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351508730-1857-1-git-send-email-yamanetoshi@gmail.com \
--to=yamanetoshi@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®