All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jamal Shareef <jamal.k.shareef@gmail.com>
Cc: boqun.feng@microsoft.com, andrea.parri@microsoft.com,
	sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars
Date: Tue, 15 Oct 2019 18:44:59 +0200	[thread overview]
Message-ID: <20191015164459.GA1052688@kroah.com> (raw)
In-Reply-To: <5e1ec6d6977f27f39844abf38f598e15cc70916d.1571108943.git.jamal.k.shareef@gmail.com>

On Mon, Oct 14, 2019 at 08:12:13PM -0700, Jamal Shareef wrote:
> Fixes block comments and variable assignments
> that were over 80 characters in length. Issue
> found by checkpatch.
> 
> Fix typo "mean" to "means". Add comment for
> ROP value in sm750_accel.h as it is in
> sm750_accel.c file.
> 
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750.c       | 22 +++++----
>  drivers/staging/sm750fb/sm750_accel.c | 69 ++++++++++++++++++++-------
>  drivers/staging/sm750fb/sm750_accel.h | 51 ++++++++++++++++----
>  3 files changed, 108 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 59568d18ce23..7eb3f7b0a86b 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -133,13 +133,15 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
>  		/* get the 16bit color of kernel means */
>  		u16 fg, bg;
>  
> -		fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
> -		     ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
> -		     ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
> +		fg =
> +		((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
> +		((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
> +		((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);

No, never indent this far to the left for these lines.  You just made
this code harder to understand, the original is fine.

thanks,

greg k-h


      reply	other threads:[~2019-10-15 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  3:12 [PATCH 0/2] Fix line over 80 characters warnings Jamal Shareef
2019-10-15  3:12 ` [PATCH 1/2] staging: sm750fb: Fix lines over 80 characters Jamal Shareef
2019-10-15  3:12 ` [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars Jamal Shareef
2019-10-15 16:44   ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015164459.GA1052688@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andrea.parri@microsoft.com \
    --cc=boqun.feng@microsoft.com \
    --cc=jamal.k.shareef@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.