Re: [PATCH RESEND] staging: greybus: hid: remove braces {} around single statement block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/28/20 9:49 AM, Dan Jessie wrote:
> This patch fixes the checkpatch.pl warning:
> 
> WARNING: braces {} are not necessary for single statement blocks
> 
> Per Alex Elder's <elder@xxxxxxxx> suggestion, noting that this is the only
> instance of the problem noted by checkpatch.pl in staging: greybus.
> 
> Signed-off-by: Dan Jessie <dtjessie@xxxxxxxx

OK now I have a few suggestions, just to help you with future patch
submissions:
- You could have just said "This is the only instance..." without
  explicitly acknowledging me.  I appreciate it, but if you end up
  posting many versions of a patch, acknowledging each suggestion
  would become cumbersome (and unwanted).
- The "RESEND" tag in your subject line should be used when you re-send
  a patch that's identical to a previous one, and the previous one
  never got any attention.  Instead, this should have been "PATCH v2".
- When you send another version of a patch, you should also provide
  a short message (which will be cumulative for subsequent versions
  of patches) below the main patch description.  I provide an example
  of how to do this, below.
- Instead of crediting me for the suggestion in the patch description,
  you could do it in the "additional info" section, following "---".
  (I don't claim that's the proper name for that section...)

> ---

- The "---" line here marks the end of the patch description.  Things
  above it will be committed with the patch; things between that and
  the patch content (the diffs) will not, but will be preserved with
  the e-mail exchange for reference.  This is the place you put
  a history of version updates.  So for this patch, it might look
  something like this:
. . .
---
v3: - Reworded patch message
    - Added patch version history
v2: - Noted that this is the only place this issue is reported,
      suggested by Alex Elder

 drivers/staging/greybus/hid.c | 3 +--
. . .

I'm going to ask you to send a v3 of this patch, mostly to give
you practice in doing the right thing.

					-Alex

>  drivers/staging/greybus/hid.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c
> index 04bfd9110502..ed706f39e87a 100644
> --- a/drivers/staging/greybus/hid.c
> +++ b/drivers/staging/greybus/hid.c
> @@ -290,9 +290,8 @@ static int gb_hid_parse(struct hid_device *hid)
>  	}
>  
>  	rdesc = kzalloc(rsize, GFP_KERNEL);
> -	if (!rdesc) {
> +	if (!rdesc)
>  		return -ENOMEM;
> -	}
>  
>  	ret = gb_hid_get_report_desc(ghid, rdesc);
>  	if (ret) {
> 

_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux