diff mbox series

[RESEND,1/2] HID: hid-universal-pidff: Fix errors from checkpatch

Message ID 20250414230818.957678-2-tomasz.pakula.oficjalny@gmail.com (mailing list archive)
State New
Headers show
Series HID: pidff: checkpatch fixes | expand

Commit Message

Tomasz Pakuła April 14, 2025, 11:08 p.m. UTC
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
 drivers/hid/hid-universal-pidff.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Greg KH April 15, 2025, 7:13 a.m. UTC | #1
On Tue, Apr 15, 2025 at 01:08:17AM +0200, Tomasz Pakuła wrote:
> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
> ---
>  drivers/hid/hid-universal-pidff.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what is needed in
  order to properly describe the change.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
diff mbox series

Patch

diff --git a/drivers/hid/hid-universal-pidff.c b/drivers/hid/hid-universal-pidff.c
index 001a0f5efb9d..dc3ed69dac72 100644
--- a/drivers/hid/hid-universal-pidff.c
+++ b/drivers/hid/hid-universal-pidff.c
@@ -56,7 +56,8 @@  static int universal_pidff_input_mapping(struct hid_device *hdev,
 static int universal_pidff_probe(struct hid_device *hdev,
 				 const struct hid_device_id *id)
 {
-	int i, error;
+	int error;
+
 	error = hid_parse(hdev);
 	if (error) {
 		hid_err(hdev, "HID parse failed\n");
@@ -71,7 +72,7 @@  static int universal_pidff_probe(struct hid_device *hdev,
 
 	/* Check if device contains PID usage page */
 	error = 1;
-	for (i = 0; i < hdev->collection_size; i++)
+	for (int i = 0; i < hdev->collection_size; i++)
 		if ((hdev->collection[i].usage & HID_USAGE_PAGE) == HID_UP_PID) {
 			error = 0;
 			hid_dbg(hdev, "PID usage page found\n");
@@ -91,8 +92,8 @@  static int universal_pidff_probe(struct hid_device *hdev,
 
 	/* Check if HID_PID support is enabled */
 	int (*init_function)(struct hid_device *, u32);
-	init_function = hid_pidff_init_with_quirks;
 
+	init_function = hid_pidff_init_with_quirks;
 	if (!init_function) {
 		hid_warn(hdev, "HID_PID support not enabled!\n");
 		return 0;
@@ -114,14 +115,13 @@  static int universal_pidff_probe(struct hid_device *hdev,
 static int universal_pidff_input_configured(struct hid_device *hdev,
 					    struct hid_input *hidinput)
 {
-	int axis;
 	struct input_dev *input = hidinput->input;
 
 	if (!input->absinfo)
 		return 0;
 
 	/* Decrease fuzz and deadzone on available axes */
-	for (axis = ABS_X; axis <= ABS_BRAKE; axis++) {
+	for (int axis = ABS_X; axis <= ABS_BRAKE; axis++) {
 		if (!test_bit(axis, input->absbit))
 			continue;