]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
HID: pidff: Add missing spaces
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Sat, 24 May 2025 17:47:23 +0000 (19:47 +0200)
committerJiri Kosina <jkosina@suse.com>
Tue, 10 Jun 2025 19:28:27 +0000 (21:28 +0200)
Fixes checkpatch.pl errors

Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/usbhid/hid-pidff.c

index 0e19d61f4936aeb231565cb7597dde7115bcb8c4..a07c5efddbe415ded703e86313358dc07abc2909 100644 (file)
@@ -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;