* [PATCH v2 00/11] HID: pidff: checkpatch fixes
@ 2025-05-24 17:47 Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 01/11] HID: universal-pidff: Fix missing blank lines Tomasz Pakuła
` (11 more replies)
0 siblings, 12 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes warning and errors from checkpatch script.
Also fixes the define name for LITE_STAR_GT987
Would be great if this could still somehow make it into 6.15
Changes in v2:
- Split fixes into multiple, smaller commits
Tomasz Pakuła (11):
HID: universal-pidff: Fix missing blank lines
HID: hid-ids.h: Fix LITE_STAR_GT987 device id define
HID: hid-pidff.h: Fix comment styling
HID: pidff: Fix missing blank lines after declarations
HID: pidff: Remove unneeded debug from pidff_clamp()
HID: pidff: Rework pidff_set_time() to fix warnings
HID: pidff: Use __func__ in debugs
HID: pidff: Remove unneeded else in pidff_find_special_field()
HID: pidff: Move trailing statements in pidff_rescale_signed()
HID: pidff: Add missing spaces
HID: pidff: Move else if statements to follow closing braces
drivers/hid/hid-ids.h | 2 +-
drivers/hid/hid-universal-pidff.c | 5 ++--
drivers/hid/usbhid/hid-pidff.c | 46 +++++++++++++++----------------
drivers/hid/usbhid/hid-pidff.h | 3 +-
4 files changed, 28 insertions(+), 28 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 01/11] HID: universal-pidff: Fix missing blank lines
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 02/11] HID: hid-ids.h: Fix LITE_STAR_GT987 device id define Tomasz Pakuła
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes errors from checkpatch script
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/hid-universal-pidff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-universal-pidff.c b/drivers/hid/hid-universal-pidff.c
index 001a0f5efb9d..dad6c5a6e2df 100644
--- a/drivers/hid/hid-universal-pidff.c
+++ b/drivers/hid/hid-universal-pidff.c
@@ -57,6 +57,7 @@ static int universal_pidff_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{
int i, error;
+
error = hid_parse(hdev);
if (error) {
hid_err(hdev, "HID parse failed\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;
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 02/11] HID: hid-ids.h: Fix LITE_STAR_GT987 device id define
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 01/11] HID: universal-pidff: Fix missing blank lines Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 03/11] HID: hid-pidff.h: Fix comment styling Tomasz Pakuła
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
The name was missing "ID" part
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/hid-ids.h | 2 +-
drivers/hid/hid-universal-pidff.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 1062731315a2..5c75c09c5780 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -841,7 +841,7 @@
#define USB_DEVICE_ID_PXN_V12 0x1212
#define USB_DEVICE_ID_PXN_V12_LITE 0x1112
#define USB_DEVICE_ID_PXN_V12_LITE_2 0x1211
-#define USB_DEVICE_LITE_STAR_GT987_FF 0x2141
+#define USB_DEVICE_ID_LITE_STAR_GT987 0x2141
#define USB_VENDOR_ID_LOGITECH 0x046d
#define USB_DEVICE_ID_LOGITECH_Z_10_SPK 0x0a07
diff --git a/drivers/hid/hid-universal-pidff.c b/drivers/hid/hid-universal-pidff.c
index dad6c5a6e2df..554a6559aeb7 100644
--- a/drivers/hid/hid-universal-pidff.c
+++ b/drivers/hid/hid-universal-pidff.c
@@ -178,7 +178,7 @@ static const struct hid_device_id universal_pidff_devices[] = {
.driver_data = HID_PIDFF_QUIRK_PERIODIC_SINE_ONLY },
{ HID_USB_DEVICE(USB_VENDOR_ID_LITE_STAR, USB_DEVICE_ID_PXN_V12_LITE_2),
.driver_data = HID_PIDFF_QUIRK_PERIODIC_SINE_ONLY },
- { HID_USB_DEVICE(USB_VENDOR_ID_LITE_STAR, USB_DEVICE_LITE_STAR_GT987_FF),
+ { HID_USB_DEVICE(USB_VENDOR_ID_LITE_STAR, USB_DEVICE_ID_LITE_STAR_GT987),
.driver_data = HID_PIDFF_QUIRK_PERIODIC_SINE_ONLY },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASETEK, USB_DEVICE_ID_ASETEK_INVICTA) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASETEK, USB_DEVICE_ID_ASETEK_FORTE) },
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 03/11] HID: hid-pidff.h: Fix comment styling
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 01/11] HID: universal-pidff: Fix missing blank lines Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 02/11] HID: hid-ids.h: Fix LITE_STAR_GT987 device id define Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 04/11] HID: pidff: Fix missing blank lines after declarations Tomasz Pakuła
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes checkpatch.pl warnings
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.h b/drivers/hid/usbhid/hid-pidff.h
index dda571e0a5bd..a53a8b436baa 100644
--- a/drivers/hid/usbhid/hid-pidff.h
+++ b/drivers/hid/usbhid/hid-pidff.h
@@ -9,8 +9,7 @@
/* Delay field (0xA7) missing. Skip it during set effect report upload */
#define HID_PIDFF_QUIRK_MISSING_DELAY BIT(0)
-/* Missing Paramter block offset (0x23). Skip it during SET_CONDITION
- report upload */
+/* Missing Paramter block offset (0x23). Skip it during SET_CONDITION upload */
#define HID_PIDFF_QUIRK_MISSING_PBO BIT(1)
/* Initialise device control field even if logical_minimum != 1 */
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 04/11] HID: pidff: Fix missing blank lines after declarations
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (2 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 03/11] HID: hid-pidff.h: Fix comment styling Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 05/11] HID: pidff: Remove unneeded debug from pidff_clamp() Tomasz Pakuła
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes chackpatch.pl warnings
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 8dfd2c554a27..3c2b20cf7853 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -241,8 +241,8 @@ static u32 pidff_rescale_time(u16 time, struct hid_field *field)
{
u32 scaled_time = time;
int exponent = field->unit_exponent;
- pr_debug("time field exponent: %d\n", exponent);
+ pr_debug("time field exponent: %d\n", exponent);
for (;exponent < FF_TIME_EXPONENT; exponent++)
scaled_time *= 10;
for (;exponent > FF_TIME_EXPONENT; exponent--)
@@ -332,6 +332,7 @@ static int pidff_needs_set_envelope(struct ff_envelope *envelope,
struct ff_envelope *old)
{
bool needs_new_envelope;
+
needs_new_envelope = envelope->attack_level != 0 ||
envelope->fade_level != 0 ||
envelope->attack_length != 0 ||
@@ -715,6 +716,7 @@ static void pidff_playback_pid(struct pidff_device *pidff, int pid_id, int n)
static int pidff_playback(struct input_dev *dev, int effect_id, int value)
{
struct pidff_device *pidff = dev->ff->private;
+
pidff_playback_pid(pidff, pidff->pid_id[effect_id], value);
return 0;
}
@@ -1207,6 +1209,7 @@ static int pidff_find_effects(struct pidff_device *pidff,
for (i = 0; i < sizeof(pidff_effect_types); i++) {
int pidff_type = pidff->type_id[i];
+
if (pidff->set_effect_type->usage[pidff_type].hid !=
pidff->create_new_effect_type->usage[pidff_type].hid) {
hid_err(pidff->hid,
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 05/11] HID: pidff: Remove unneeded debug from pidff_clamp()
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (3 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 04/11] HID: pidff: Fix missing blank lines after declarations Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 06/11] HID: pidff: Rework pidff_set_time() to fix warnings Tomasz Pakuła
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes chechpatch.pl warning about missing blank line
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 3c2b20cf7853..44cbd2a0461a 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -210,9 +210,7 @@ struct pidff_device {
*/
static s32 pidff_clamp(s32 i, struct hid_field *field)
{
- s32 clamped = clamp(i, field->logical_minimum, field->logical_maximum);
- pr_debug("clamped from %d to %d", i, clamped);
- return clamped;
+ return (s32)clamp(i, field->logical_minimum, field->logical_maximum);
}
/*
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 06/11] HID: pidff: Rework pidff_set_time() to fix warnings
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (4 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 05/11] HID: pidff: Remove unneeded debug from pidff_clamp() Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 07/11] HID: pidff: Use __func__ in debugs Tomasz Pakuła
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes blank line warning from checkpatch.pl script
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 44cbd2a0461a..743b76c8d3b2 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -273,8 +273,8 @@ static void pidff_set_signed(struct pidff_usage *usage, s16 value)
static void pidff_set_time(struct pidff_usage *usage, u16 time)
{
- u32 modified_time = pidff_rescale_time(time, usage->field);
- usage->value[0] = pidff_clamp(modified_time, usage->field);
+ usage->value[0] = pidff_clamp(
+ pidff_rescale_time(time, usage->field), usage->field);
}
static void pidff_set_duration(struct pidff_usage *usage, u16 duration)
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 07/11] HID: pidff: Use __func__ in debugs
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (5 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 06/11] HID: pidff: Rework pidff_set_time() to fix warnings Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 08/11] HID: pidff: Remove unneeded else in pidff_find_special_field() Tomasz Pakuła
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes checkpatch.pl warnings
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 743b76c8d3b2..88eb832265a4 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -940,7 +940,7 @@ static int pidff_find_fields(struct pidff_usage *usage, const u8 *table,
struct hid_report *report, int count, int strict)
{
if (!report) {
- pr_debug("pidff_find_fields, null report\n");
+ pr_debug("%s, null report\n", __func__);
return -1;
}
@@ -1069,7 +1069,7 @@ static struct hid_field *pidff_find_special_field(struct hid_report *report,
int usage, int enforce_min)
{
if (!report) {
- pr_debug("pidff_find_special_field, null report\n");
+ pr_debug("%s, null report\n", __func__);
return NULL;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 08/11] HID: pidff: Remove unneeded else in pidff_find_special_field()
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (6 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 07/11] HID: pidff: Use __func__ in debugs Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 09/11] HID: pidff: Move trailing statements in pidff_rescale_signed() Tomasz Pakuła
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes checkpatch.pl warning
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 88eb832265a4..6f25490ce464 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -1081,10 +1081,9 @@ static struct hid_field *pidff_find_special_field(struct hid_report *report,
if (!enforce_min ||
report->field[i]->logical_minimum == 1)
return report->field[i];
- else {
- pr_err("logical_minimum is not 1 as it should be\n");
- return NULL;
- }
+
+ pr_err("logical_minimum is not 1 as it should be\n");
+ return NULL;
}
}
return NULL;
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 09/11] HID: pidff: Move trailing statements in pidff_rescale_signed()
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (7 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 08/11] HID: pidff: Remove unneeded else in pidff_find_special_field() Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 10/11] HID: pidff: Add missing spaces Tomasz Pakuła
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Adds newline before trailing if statements.
Fixes checkpatch.pl errors
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 6f25490ce464..0e19d61f4936 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -227,8 +227,10 @@ static int pidff_rescale(int i, int max, struct hid_field *field)
*/
static int pidff_rescale_signed(int i, struct hid_field *field)
{
- if (i > 0) return i * field->logical_maximum / S16_MAX;
- if (i < 0) return i * field->logical_minimum / S16_MIN;
+ if (i > 0)
+ return i * field->logical_maximum / S16_MAX;
+ if (i < 0)
+ return i * field->logical_minimum / S16_MIN;
return 0;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 10/11] HID: pidff: Add missing spaces
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (8 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 09/11] HID: pidff: Move trailing statements in pidff_rescale_signed() Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 11/11] HID: pidff: Move else if statements to follow closing braces Tomasz Pakuła
2025-06-10 19:29 ` [PATCH v2 00/11] HID: pidff: checkpatch fixes Jiri Kosina
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes checkpatch.pl errors
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 0e19d61f4936..a07c5efddbe4 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -243,9 +243,9 @@ static u32 pidff_rescale_time(u16 time, struct hid_field *field)
int exponent = field->unit_exponent;
pr_debug("time field exponent: %d\n", exponent);
- for (;exponent < FF_TIME_EXPONENT; exponent++)
+ for (; exponent < FF_TIME_EXPONENT; exponent++)
scaled_time *= 10;
- for (;exponent > FF_TIME_EXPONENT; exponent--)
+ for (; exponent > FF_TIME_EXPONENT; exponent--)
scaled_time /= 10;
pr_debug("time calculated from %d to %d\n", time, scaled_time);
@@ -569,7 +569,7 @@ static void pidff_set_device_control(struct pidff_device *pidff, int field)
hid_dbg(pidff->hid, "DEVICE_CONTROL is a bitmask\n");
/* Clear current bitmask */
- for(i = 0; i < sizeof(pidff_device_control); i++) {
+ for (i = 0; i < sizeof(pidff_device_control); i++) {
index = pidff->control_id[i];
if (index < 1)
continue;
@@ -620,7 +620,7 @@ static void pidff_fetch_pool(struct pidff_device *pidff)
struct hid_device *hid = pidff->hid;
/* Repeat if PID_SIMULTANEOUS_MAX < 2 to make sure it's correct */
- for(i = 0; i < 20; i++) {
+ for (i = 0; i < 20; i++) {
hid_hw_request(hid, pidff->reports[PID_POOL], HID_REQ_GET_REPORT);
hid_hw_wait(hid);
@@ -851,7 +851,7 @@ static int pidff_upload_effect(struct input_dev *dev, struct ff_effect *effect,
case FF_INERTIA:
case FF_FRICTION:
if (!old) {
- switch(effect->type) {
+ switch (effect->type) {
case FF_SPRING:
type_id = PID_SPRING;
break;
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 11/11] HID: pidff: Move else if statements to follow closing braces
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (9 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 10/11] HID: pidff: Add missing spaces Tomasz Pakuła
@ 2025-05-24 17:47 ` Tomasz Pakuła
2025-06-10 19:29 ` [PATCH v2 00/11] HID: pidff: checkpatch fixes Jiri Kosina
11 siblings, 0 replies; 14+ messages in thread
From: Tomasz Pakuła @ 2025-05-24 17:47 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input, linux-usb
Fixes checkpatch.pl errors
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index a07c5efddbe4..614a20b62023 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -976,13 +976,11 @@ static int pidff_find_fields(struct pidff_usage *usage, const u8 *table,
pr_debug("Delay field not found, but that's OK\n");
pr_debug("Setting MISSING_DELAY quirk\n");
return_value |= HID_PIDFF_QUIRK_MISSING_DELAY;
- }
- else if (!found && table[k] == pidff_set_condition[PID_PARAM_BLOCK_OFFSET]) {
+ } else if (!found && table[k] == pidff_set_condition[PID_PARAM_BLOCK_OFFSET]) {
pr_debug("PBO field not found, but that's OK\n");
pr_debug("Setting MISSING_PBO quirk\n");
return_value |= HID_PIDFF_QUIRK_MISSING_PBO;
- }
- else if (!found && strict) {
+ } else if (!found && strict) {
pr_debug("failed to locate %d\n", k);
return -1;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 00/11] HID: pidff: checkpatch fixes
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
` (10 preceding siblings ...)
2025-05-24 17:47 ` [PATCH v2 11/11] HID: pidff: Move else if statements to follow closing braces Tomasz Pakuła
@ 2025-06-10 19:29 ` Jiri Kosina
2025-06-19 16:22 ` tomasz.pakula.oficjalny
11 siblings, 1 reply; 14+ messages in thread
From: Jiri Kosina @ 2025-06-10 19:29 UTC (permalink / raw)
To: Tomasz Pakuła; +Cc: bentiss, oleg, linux-input, linux-usb
On Sat, 24 May 2025, Tomasz Pakuła wrote:
> Fixes warning and errors from checkpatch script.
> Also fixes the define name for LITE_STAR_GT987
>
> Would be great if this could still somehow make it into 6.15
Sorry, that didn't work, I was overly busy over the past few weeks.
On the other hand, I don't really think there is any imminent need to rush
this in, as there are no functional fixes.
Now queued in hid.git#for-6.17/pidff.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 00/11] HID: pidff: checkpatch fixes
2025-06-10 19:29 ` [PATCH v2 00/11] HID: pidff: checkpatch fixes Jiri Kosina
@ 2025-06-19 16:22 ` tomasz.pakula.oficjalny
0 siblings, 0 replies; 14+ messages in thread
From: tomasz.pakula.oficjalny @ 2025-06-19 16:22 UTC (permalink / raw)
To: Jiri Kosina; +Cc: bentiss, oleg, linux-input, linux-usb
On Tue, 2025-06-10 at 21:29 +0200, Jiri Kosina wrote:
> On Sat, 24 May 2025, Tomasz Pakuła wrote:
>
>
> Sorry, that didn't work, I was overly busy over the past few weeks.
>
> On the other hand, I don't really think there is any imminent need to rush
> this in, as there are no functional fixes.
Yeah, no worries! We were debating as to when to send out a few more
fixes to the driver that should only be enabled for distros that ship
newer SDL as well and 6.17 will work for that.
>
> Now queued in hid.git#for-6.17/pidff.
>
> Thanks,
Thank YOU and I wish you can get some rest in the meantime.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-06-19 16:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-24 17:47 [PATCH v2 00/11] HID: pidff: checkpatch fixes Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 01/11] HID: universal-pidff: Fix missing blank lines Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 02/11] HID: hid-ids.h: Fix LITE_STAR_GT987 device id define Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 03/11] HID: hid-pidff.h: Fix comment styling Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 04/11] HID: pidff: Fix missing blank lines after declarations Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 05/11] HID: pidff: Remove unneeded debug from pidff_clamp() Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 06/11] HID: pidff: Rework pidff_set_time() to fix warnings Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 07/11] HID: pidff: Use __func__ in debugs Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 08/11] HID: pidff: Remove unneeded else in pidff_find_special_field() Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 09/11] HID: pidff: Move trailing statements in pidff_rescale_signed() Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 10/11] HID: pidff: Add missing spaces Tomasz Pakuła
2025-05-24 17:47 ` [PATCH v2 11/11] HID: pidff: Move else if statements to follow closing braces Tomasz Pakuła
2025-06-10 19:29 ` [PATCH v2 00/11] HID: pidff: checkpatch fixes Jiri Kosina
2025-06-19 16:22 ` tomasz.pakula.oficjalny
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).