From: rkir@google.com
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, tkjos@google.com,
Roman Kiryanov <rkir@google.com>
Subject: [PATCH 8/9] platform: goldfish: pipe: Replace pr_ with dev_ for logging
Date: Mon, 13 Aug 2018 16:38:39 -0700 [thread overview]
Message-ID: <20180813233839.190855-8-rkir@google.com> (raw)
In-Reply-To: <20180813233839.190855-1-rkir@google.com>
From: Roman Kiryanov <rkir@google.com>
dev_ is preferred if struct device is available.
Signed-off-by: Roman Kiryanov <rkir@google.com>
---
drivers/platform/goldfish/goldfish_pipe.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 6f3fc4b30fba..3f8e440d62ae 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -384,6 +384,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
int count = 0, ret = -EINVAL;
unsigned long address, address_end, last_page;
unsigned int last_page_size;
+ struct device *pdev_dev;
/* If the emulator already closed the pipe, no need to go further */
if (unlikely(test_bit(BIT_CLOSED_ON_HOST, &pipe->flags)))
@@ -401,6 +402,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
last_page = (address_end - 1) & PAGE_MASK;
last_page_size = ((address_end - 1) & ~PAGE_MASK) + 1;
+ pdev_dev = pipe->dev->pdev_dev;
+
while (address < address_end) {
s32 consumed_size;
int status;
@@ -433,7 +436,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
* err.
*/
if (status != PIPE_ERROR_AGAIN)
- pr_info_ratelimited("goldfish_pipe: backend error %d on %s\n",
+ dev_err_ratelimited(pdev_dev,
+ "goldfish_pipe: backend error %d on %s\n",
status, is_write ? "write" : "read");
break;
}
--
2.18.0.865.gffc8e1a3cd6-goog
next prev parent reply other threads:[~2018-08-13 23:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-13 23:38 [PATCH 1/9] platform: goldfish: pipe: Fix comments to fit 80 columns rkir
2018-08-13 23:38 ` [PATCH 2/9] platform: goldfish: pipe: Update license rkir
2018-08-13 23:38 ` [PATCH 3/9] platform: goldfish: pipe: Fix checkpatch warning rkir
2018-08-13 23:38 ` [PATCH 4/9] platform: goldfish: pipe: Separate the host interface to a separate header rkir
2018-08-13 23:38 ` [PATCH 5/9] platform: goldfish: pipe: Update the comment for GFP_ATOMIC rkir
2018-08-13 23:38 ` [PATCH 6/9] platform: goldfish: pipe: Fail compilation if structs are too large rkir
2018-08-14 1:48 ` Joe Perches
2018-08-14 3:47 ` Roman Kiryanov
2018-08-14 4:41 ` Joe Perches
2018-08-13 23:38 ` [PATCH 7/9] platform: goldfish: pipe: Replace an array of 1 with a variable rkir
2018-08-13 23:38 ` rkir [this message]
2018-08-14 1:30 ` [PATCH 8/9] platform: goldfish: pipe: Replace pr_ with dev_ for logging Joe Perches
2018-08-14 3:16 ` kbuild test robot
2018-08-14 1:35 ` [PATCH 1/9] platform: goldfish: pipe: Fix comments to fit 80 columns Joe Perches
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=20180813233839.190855-8-rkir@google.com \
--to=rkir@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tkjos@google.com \
/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®