Re: [PATCH 4/9] staging: sm750fb: removing unnecessary binary operations
From: Greg KH
Date: Mon May 15 2017 - 06:21:59 EST
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@xxxxxxxxxxxx>
> ---
> 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