lkml.org 
[lkml]   [2017]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] staging: sm750fb: removing unnecessary binary operations
On Sun, May 14, 2017 at 12:42:37AM +0200, Matej Dujava wrote:
> This patch remove unnecessary operation (eg. ``X | (0x0 << Y)`` to ``X``).
>
> Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
> ---
> drivers/staging/sm750fb/ddk750_display.h | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
> index cef7f46..f9e1614 100644
> --- a/drivers/staging/sm750fb/ddk750_display.h
> +++ b/drivers/staging/sm750fb/ddk750_display.h
> @@ -9,8 +9,8 @@
> #define PNL_2_OFFSET 0
> #define PNL_2_MASK (3 << PNL_2_OFFSET)
> #define PNL_2_USAGE (PNL_2_MASK << 16)
> -#define PNL_2_PRI ((0 << PNL_2_OFFSET) | PNL_2_USAGE)
> -#define PNL_2_SEC ((2 << PNL_2_OFFSET) | PNL_2_USAGE)
> +#define PNL_2_PRI (PNL_2_USAGE)
> +#define PNL_2_SEC (PNL_2_USAGE | (2 << PNL_2_OFFSET))

But the original makes more sense to read, don't you think so?

thanks,

greg k-h

\
 
 \ /
  Last update: 2017-05-15 12:22    [W:1.069 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site