mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: linux-input@vger.kernel.org
Cc: Lee Jones <lee@kernel.org>, Vojtech Pavlik <vojtech@ucw.cz>,
	Guanglei Zhu <zhugl3@xiaopeng.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 6/8] Input: adi - use dev_warn() in adi_id_decode()
Date: Sun, 29 Nov 2026 21:42:43 -0800	[thread overview]
Message-ID: <20261130054245.2215181-7-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20261130054245.2215181-1-dmitry.torokhov@gmail.com>

Convert the remaining printk(KERN_WARNING) calls in adi_id_decode() to
dev_warn() against the gameport device, dropping the manual driver name
prefix.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/joystick/adi.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
index 34febfc54ae3..6eb8dabda4e5 100644
--- a/drivers/input/joystick/adi.c
+++ b/drivers/input/joystick/adi.c
@@ -362,7 +362,8 @@ static void adi_id_decode(struct adi *adi, struct adi_port *port)
 		return;
 
 	if (adi->ret < (t = adi_get_bits(adi, 10))) {
-		printk(KERN_WARNING "adi: Short ID packet: reported: %d != read: %d\n", t, adi->ret);
+		dev_warn(dev, "Short ID packet: reported: %d != read: %d\n",
+			 t, adi->ret);
 		return;
 	}
 
@@ -373,7 +374,7 @@ static void adi_id_decode(struct adi *adi, struct adi_port *port)
 	adi->length = adi_get_bits(adi, 10);
 
 	if (adi->length >= ADI_MAX_LENGTH || adi->length < ADI_MIN_LENGTH) {
-		printk(KERN_WARNING "adi: Bad data packet length (%d).\n", adi->length);
+		dev_warn(dev, "Bad data packet length (%d).\n", adi->length);
 		adi->length = 0;
 		return;
 	}
@@ -382,7 +383,7 @@ static void adi_id_decode(struct adi *adi, struct adi_port *port)
 	adi->buttons = adi_get_bits(adi, 6);
 
 	if (adi_get_bits(adi, 6) != 8 && adi->hats) {
-		printk(KERN_WARNING "adi: Other than 8-dir POVs not supported yet.\n");
+		dev_warn(dev, "Other than 8-dir POVs not supported yet.\n");
 		adi->length = 0;
 		return;
 	}
@@ -411,7 +412,8 @@ static void adi_id_decode(struct adi *adi, struct adi_port *port)
 
 	t = 8 + adi->buttons + adi->axes10 * 10 + adi->axes8 * 8 + adi->hats * 4;
 	if (adi->length != t && adi->length != t + (t & 1)) {
-		printk(KERN_WARNING "adi: Expected length %d != data length %d\n", t, adi->length);
+		dev_warn(dev, "Expected length %d != data length %d\n",
+			 t, adi->length);
 		adi->length = 0;
 		return;
 	}
-- 
2.56.1.839.g22a8290db9-goog


  parent reply	other threads:[~2026-11-30  5:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  5:42 [PATCH 0/8] Input: adi - bounds checking fixes and driver cleanups Dmitry Torokhov
2026-11-30  5:42 ` [PATCH 1/8] Input: adi - fix out-of-bounds write in adi_read_packet() Dmitry Torokhov
2026-11-30  5:42 ` [PATCH 2/8] Input: adi - bound two-stream packet merge in adi_move_bits() Dmitry Torokhov
2026-11-30  5:42 ` [PATCH 3/8] Input: adi - validate ID packet axis and button counts Dmitry Torokhov
2026-11-30  5:42 ` [PATCH 4/8] Input: adi - use explicit fixed-width types and const tables Dmitry Torokhov
2026-11-30  5:42 ` [PATCH 5/8] Input: adi - simplify device name formatting Dmitry Torokhov
2026-11-30  5:42 ` Dmitry Torokhov [this message]
2026-11-30  5:42 ` [PATCH 7/8] Input: adi - use BIT() and GENMASK() for bitmasks and bit checks Dmitry Torokhov
2026-11-30  5:42 ` [PATCH 8/8] Input: adi - clean up formatting Dmitry Torokhov

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=20261130054245.2215181-7-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@ucw.cz \
    --cc=zhugl3@xiaopeng.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®