* [PATCH] HID: core: Adjust indentation in hid_add_device
@ 2019-12-09 20:38 Nathan Chancellor
2019-12-09 20:55 ` Nick Desaulniers
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2019-12-09 20:38 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: linux-input, linux-kernel, clang-built-linux, 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.
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")
Link: https://github.com/ClangBuiltLinux/linux/issues/793
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/hid/hid-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index e0b241bd3070..9c7f03f23eca 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: core: Adjust indentation in hid_add_device
2019-12-09 20:38 [PATCH] HID: core: Adjust indentation in hid_add_device Nathan Chancellor
@ 2019-12-09 20:55 ` Nick Desaulniers
0 siblings, 0 replies; 2+ messages in thread
From: Nick Desaulniers @ 2019-12-09 20:55 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Jiri Kosina, Benjamin Tissoires, linux-input, LKML, clang-built-linux
On Mon, Dec 9, 2019 at 12:39 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> 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.
>
> Fixes: 3c86726cfe38 ("HID: make .raw_request mandatory")
> Link: https://github.com/ClangBuiltLinux/linux/issues/793
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Thanks for taking the time to track down proper fixes tags.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> drivers/hid/hid-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index e0b241bd3070..9c7f03f23eca 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -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 clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20191209203855.25500-1-natechancellor%40gmail.com.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-09 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 20:38 [PATCH] HID: core: Adjust indentation in hid_add_device Nathan Chancellor
2019-12-09 20:55 ` Nick Desaulniers
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).