linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: core: clean up indentation issue
@ 2019-09-22 11:50 Colin King
  2019-09-23 11:04 ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Colin King @ 2019-09-22 11:50 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There is an if statement that is indented by one extra space,
fix this by removing the extraneous space.

Signed-off-by: Colin Ian King <colin.king@canonical.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 3eaee2c37931..9469c382a182 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2329,10 +2329,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.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: core: clean up indentation issue
  2019-09-22 11:50 [PATCH] HID: core: clean up indentation issue Colin King
@ 2019-09-23 11:04 ` Jiri Kosina
  2019-09-25 11:47   ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2019-09-23 11:04 UTC (permalink / raw)
  To: Colin King; +Cc: Benjamin Tissoires, linux-input, kernel-janitors, linux-kernel

On Sun, 22 Sep 2019, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> There is an if statement that is indented by one extra space,
> fix this by removing the extraneous space.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.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 3eaee2c37931..9469c382a182 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -2329,10 +2329,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;
> -	 }
> +	}

Let's not pollute git blame and wait for an ocasion when we need to touch 
the code for some more valid reason.

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: core: clean up indentation issue
  2019-09-23 11:04 ` Jiri Kosina
@ 2019-09-25 11:47   ` Dan Carpenter
  2019-09-27 10:04     ` Benjamin Tissoires
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2019-09-25 11:47 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Colin King, Benjamin Tissoires, linux-input, kernel-janitors,
	linux-kernel

On Mon, Sep 23, 2019 at 01:04:13PM +0200, Jiri Kosina wrote:
> On Sun, 22 Sep 2019, Colin King wrote:
> 
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > There is an if statement that is indented by one extra space,
> > fix this by removing the extraneous space.
> > 
> > Signed-off-by: Colin Ian King <colin.king@canonical.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 3eaee2c37931..9469c382a182 100644
> > --- a/drivers/hid/hid-core.c
> > +++ b/drivers/hid/hid-core.c
> > @@ -2329,10 +2329,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;
> > -	 }
> > +	}
> 
> Let's not pollute git blame and wait for an ocasion when we need to touch 
> the code for some more valid reason.

Just use `git blame -w`.

This probably came from a Smatch warning.  Smatch warns very seldom
warns about style issues, but in this case the indenting is legitimately
bad.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: core: clean up indentation issue
  2019-09-25 11:47   ` Dan Carpenter
@ 2019-09-27 10:04     ` Benjamin Tissoires
  2019-09-27 10:04       ` Benjamin Tissoires
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Tissoires @ 2019-09-27 10:04 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jiri Kosina, Colin King, open list:HID CORE LAYER,
	kernel-janitors, lkml

On Wed, Sep 25, 2019 at 1:48 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> On Mon, Sep 23, 2019 at 01:04:13PM +0200, Jiri Kosina wrote:
> > On Sun, 22 Sep 2019, Colin King wrote:
> >
> > > From: Colin Ian King <colin.king@canonical.com>
> > >
> > > There is an if statement that is indented by one extra space,
> > > fix this by removing the extraneous space.
> > >
> > > Signed-off-by: Colin Ian King <colin.king@canonical.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 3eaee2c37931..9469c382a182 100644
> > > --- a/drivers/hid/hid-core.c
> > > +++ b/drivers/hid/hid-core.c
> > > @@ -2329,10 +2329,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;
> > > -    }
> > > +   }
> >
> > Let's not pollute git blame and wait for an ocasion when we need to touch
> > the code for some more valid reason.
>
> Just use `git blame -w`.
>
> This probably came from a Smatch warning.  Smatch warns very seldom
> warns about style issues, but in this case the indenting is legitimately
> bad.

Well, I tend to agree with Jiri here. Yes, you can use a particular
flag in a tool to 'solve' the git blame/history issue, but this is
putting the workload on the user, while tthe code is fine, in this
case. Why do we need to pollute the history of a file for no good
reasons?

Cheers,
Benjamin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: core: clean up indentation issue
  2019-09-27 10:04     ` Benjamin Tissoires
@ 2019-09-27 10:04       ` Benjamin Tissoires
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2019-09-27 10:04 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jiri Kosina, Colin King, open list:HID CORE LAYER,
	kernel-janitors, lkml

On Wed, Sep 25, 2019 at 1:48 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> On Mon, Sep 23, 2019 at 01:04:13PM +0200, Jiri Kosina wrote:
> > On Sun, 22 Sep 2019, Colin King wrote:
> >
> > > From: Colin Ian King <colin.king@canonical.com>
> > >
> > > There is an if statement that is indented by one extra space,
> > > fix this by removing the extraneous space.
> > >
> > > Signed-off-by: Colin Ian King <colin.king@canonical.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 3eaee2c37931..9469c382a182 100644
> > > --- a/drivers/hid/hid-core.c
> > > +++ b/drivers/hid/hid-core.c
> > > @@ -2329,10 +2329,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;
> > > -    }
> > > +   }
> >
> > Let's not pollute git blame and wait for an ocasion when we need to touch
> > the code for some more valid reason.
>
> Just use `git blame -w`.
>
> This probably came from a Smatch warning.  Smatch warns very seldom
> warns about style issues, but in this case the indenting is legitimately
> bad.

Well, I tend to agree with Jiri here. Yes, you can use a particular
flag in a tool to 'solve' the git blame/history issue, but this is
putting the workload on the user, while tthe code is fine, in this
case. Why do we need to pollute the history of a file for no good
reasons?

Cheers,
Benjamin


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-27 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-22 11:50 [PATCH] HID: core: clean up indentation issue Colin King
2019-09-23 11:04 ` Jiri Kosina
2019-09-25 11:47   ` Dan Carpenter
2019-09-27 10:04     ` Benjamin Tissoires
2019-09-27 10:04       ` Benjamin Tissoires

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).