From: Rishi Gupta <gupt21@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: jikos@kernel.org, benjamin.tissoires@redhat.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Rishi Gupta <gupt21@gmail.com>
Subject: [PATCH v3] HID: hidraw: replace printk() with corresponding pr_xx() variant
Date: Fri, 20 Sep 2019 08:05:01 +0530 [thread overview]
Message-ID: <1568946901-29752-1-git-send-email-gupt21@gmail.com> (raw)
In-Reply-To: <20190919161613.GR237523@dtor-ws>
This commit replaces direct invocations of printk with
their appropriate pr_info/warn() variant.
Signed-off-by: Rishi Gupta <gupt21@gmail.com>
---
Changes in v3:
* Use hid_warn() subsystem specific variant instead of pr_warn()
drivers/hid/hidraw.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 006bd6f..a42f4b5 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -197,15 +197,15 @@ static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t
}
if (count > HID_MAX_BUFFER_SIZE) {
- printk(KERN_WARNING "hidraw: pid %d passed too large report\n",
- task_pid_nr(current));
+ hid_warn(dev, "pid %d passed too large report\n",
+ task_pid_nr(current));
ret = -EINVAL;
goto out;
}
if (count < 2) {
- printk(KERN_WARNING "hidraw: pid %d passed too short report\n",
- task_pid_nr(current));
+ hid_warn(dev, "pid %d passed too short report\n",
+ task_pid_nr(current));
ret = -EINVAL;
goto out;
}
@@ -597,7 +597,7 @@ int __init hidraw_init(void)
if (result < 0)
goto error_class;
- printk(KERN_INFO "hidraw: raw HID events driver (C) Jiri Kosina\n");
+ pr_info("raw HID events driver (C) Jiri Kosina\n");
out:
return result;
--
2.7.4
next prev parent reply other threads:[~2019-09-20 2:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 16:43 [PATCH] HID: hidraw: replace printk() with corresponding pr_xx() variant Rishi Gupta
2019-09-12 20:31 ` Dmitry Torokhov
2019-09-18 16:29 ` [PATCH v2] " Rishi Gupta
2019-09-19 16:16 ` Dmitry Torokhov
2019-09-20 2:35 ` Rishi Gupta [this message]
2019-10-01 14:23 ` [PATCH v3] " Jiri Kosina
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=1568946901-29752-1-git-send-email-gupt21@gmail.com \
--to=gupt21@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).