mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cristian Mazzotta <cmmazzo@icloud.com>
To: aer@tuxedocomputers.com
Cc: W_Armin@gmx.de, bentiss@kernel.org, jikos@kernel.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	wse@tuxedocomputers.com, Cristian Mazzotta <cmmazzo@icloud.com>
Subject: [PATCH 2/4] HID: lamparray: raise log level of fatal probe errors
Date: Wed,  9 Sep 2026 11:52:55 -0500	[thread overview]
Message-ID: <20260909165257.352597-3-cmmazzo@icloud.com> (raw)
In-Reply-To: <20260909165257.352597-1-cmmazzo@icloud.com>

The failure paths in lamparray_read_attributes_report() and
lamparray_get_lamp_attributes() use hid_dbg(), so on a device that
cannot be driven the driver declines to register with no output unless
dynamic debug is enabled for the module.

Use hid_warn() for these, since they leave the device without LED
support and the reason is useful to anyone diagnosing why a LampArray
device did not appear under /sys/class/leds.

Signed-off-by: Cristian Mazzotta <cmmazzo@icloud.com>
---
 drivers/hid/hid-lamparray.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/hid/hid-lamparray.c b/drivers/hid/hid-lamparray.c
index f169929aecd6..70c596f292a2 100644
--- a/drivers/hid/hid-lamparray.c
+++ b/drivers/hid/hid-lamparray.c
@@ -169,19 +169,19 @@ static int lamparray_read_attributes_report(struct lamparray_device *ldev)
 	size_t len;
 
 	if (!ldev->lamp_count.field) {
-		hid_dbg(hdev, "No LampCount field found\n");
+		hid_warn(hdev, "No LampCount field found\n");
 		return -ENODEV;
 	}
 
 	if (!ldev->lamparray_kind.field) {
-		hid_dbg(hdev, "No LampArrayKind field found\n");
+		hid_warn(hdev, "No LampArrayKind field found\n");
 		return -ENODEV;
 	}
 
 	report = ldev->lamp_count.field->report;
 
 	if (!report) {
-		hid_dbg(hdev, "LampCount field has no report\n");
+		hid_warn(hdev, "LampCount field has no report\n");
 		return -ENODEV;
 	}
 
@@ -196,7 +196,7 @@ static int lamparray_read_attributes_report(struct lamparray_device *ldev)
 	ret = hid_hw_raw_request(hdev, report->id, buf, len,
 		HID_FEATURE_REPORT, HID_REQ_GET_REPORT);
 	if (ret < 0) {
-		hid_dbg(hdev, "Failed to get LampCount value from device: %d\n", ret);
+		hid_warn(hdev, "Failed to get LampCount value from device: %d\n", ret);
 		goto out;
 	}
 
@@ -204,7 +204,7 @@ static int lamparray_read_attributes_report(struct lamparray_device *ldev)
 
 	ldev->lamp_count_value = get_field_value(&ldev->lamp_count);
 	if (!ldev->lamp_count_value) {
-		hid_dbg(hdev, "LampCount is 0 (invalid)\n");
+		hid_warn(hdev, "LampCount is 0 (invalid)\n");
 		ret = -EINVAL;
 		goto out;
 	}
@@ -415,7 +415,7 @@ static int lamparray_get_lamp_attributes(struct lamparray_device *ldev)
 	ret = hid_hw_raw_request(hdev, report->id, buf, len,
 		HID_FEATURE_REPORT, HID_REQ_GET_REPORT);
 	if (ret < 0) {
-		hid_dbg(hdev, "Failed to read LampAttributesResponseReport: %d\n", ret);
+		hid_warn(hdev, "Failed to read LampAttributesResponseReport: %d\n", ret);
 		goto out;
 	}
 
@@ -427,7 +427,7 @@ static int lamparray_get_lamp_attributes(struct lamparray_device *ldev)
 	ldev->max_brightness = get_field_value_as_u8(&ldev->color_levels.intensity);
 
 	if (!ldev->max_r || !ldev->max_g || !ldev->max_b || !ldev->max_brightness) {
-		hid_dbg(hdev, "LampArray device has no color levels\n");
+		hid_warn(hdev, "LampArray device has no color levels\n");
 		ret = -EINVAL;
 		goto out;
 	}
-- 
2.55.0


  parent reply	other threads:[~2026-09-09 16:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  7:35 [PATCH v5 0/2] HID: generic: add LampArray support via hid-lamparray helper Aaron Erhardt
2026-09-03  7:35 ` [PATCH v5 1/2] HID: lamparray: add new LampArray helper module Aaron Erhardt
2026-09-03 20:07   ` Werner Sembach
2026-09-04  8:51     ` Aaron Erhardt
2026-09-04 21:30   ` Armin Wolf
2026-09-07 16:13     ` Aaron Erhardt
2026-09-03  7:35 ` [PATCH v5 2/2] HID: generic: add LampArray support via hid-lamparray helper Aaron Erhardt
2026-09-04 20:49 ` [PATCH v5 0/2] " Armin Wolf
2026-09-07 16:30   ` Aaron Erhardt
2026-09-09 16:52     ` [PATCH 0/4] HID: lamparray: fixes from testing on Acer Predator PT14-52T Cristian Mazzotta
2026-09-09 16:52       ` [PATCH 1/4] HID: lamparray: read attribute reports synchronously Cristian Mazzotta
2026-09-09 16:52       ` Cristian Mazzotta [this message]
2026-09-09 16:52       ` [PATCH 3/4] HID: lamparray: transfer control when use_leds_uapi changes Cristian Mazzotta
2026-09-09 16:52       ` [PATCH 4/4] HID: lamparray: blank lamps across suspend and restore on resume Cristian Mazzotta
2026-09-11 10:38       ` [PATCH 0/4] HID: lamparray: fixes from testing on Acer Predator PT14-52T Aaron Erhardt
2026-09-09 22:36     ` [PATCH v5 0/2] HID: generic: add LampArray support via hid-lamparray helper Armin Wolf
2026-09-11 10:01       ` Aaron Erhardt
2026-09-14 13:32 ` Aaron Erhardt

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=20260909165257.352597-3-cmmazzo@icloud.com \
    --to=cmmazzo@icloud.com \
    --cc=W_Armin@gmx.de \
    --cc=aer@tuxedocomputers.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wse@tuxedocomputers.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®