HID: core: Adjust indentation in hid_add_device
PATCH 1/1 HID: core: Adjust indentation in hid_add_device
Clang warns:
../drivers/hid/hid-core.c:2378:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
if (!hdev->ll_driver->raw_request) {
^
../drivers/hid/hid-core.c:2372:2: note: previous statement is here
if (hid_ignore(hdev))
^1 warning generated.
This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.
--- drivers/hid/hid-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/hid-core.c +2 -2
@@ -2375,10 +2375,10 @@ int hid_add_device(struct hid_device *hdev)/* * Check for the mandatory transport channel. */ -if (!hdev->ll_driver->raw_request) { +if (!hdev->ll_driver->raw_request) {hid_err (hdev,"transport driver missing .raw_request()\n" );return -EINVAL ; - } + }/* * Read the device report descriptor once and use as template
Signature · 1 line
2.24.0
Quoted 12 lines · Nathan Chancellor
Clang warns:
../drivers/hid/hid-core.c:2378:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]if (!hdev->ll_driver->raw_request) { ^ ../drivers/hid/hid-core.c:2372:2: note: previous statement is here if (hid_ignore(hdev)) ^1 warning generated.
Quoted 7 lines
This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns.
Fixes 3c86726cfe38 ("HID: make .raw_request mandatory")Signed-off-by Nathan Chancellor <[email protected]>
Thanks for taking the time to track down proper fixes tags.
Quoted 28 lines
--- drivers/hid/hid-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/hid/hid-core.c +2
-3@@ -2375,10 +2375,10 @@ int hid_add_device(struct hid_device *hdev)/* * Check for the mandatory transport channel. */ -if (!hdev->ll_driver->raw_request) { +if (!hdev->ll_driver->raw_request) {hid_err (hdev,"transport driver missing .raw_request()\n" );return -EINVAL ; - } + }/* * Read the device report descriptor once and use as template -- 2.24.0
--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191209203855.25500-1-natechancellor%40gmail.com.
Signature · 2 lines
Thanks, ~Nick Desaulniers