lkml.org 
[lkml]   [2022]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers: staging: media: omap4iss: Use BIT macro instead of left shifting
On Fri, Jan 21, 2022 at 10:37:22AM +0100, Moses Christopher Bollavarapu wrote:
> There is a BIT(nr) macro available in Linux Kernel,
> which does the same thing.
>
> Example: 1 << 7 is same as BIT(7)
>
> Signed-off-by: Moses Christopher Bollavarapu <mosescb.dev@gmail.com>
> ---
> drivers/staging/media/omap4iss/iss_video.h | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/media/omap4iss/iss_video.h b/drivers/staging/media/omap4iss/iss_video.h
> index 526281bf0051..ea1cc311384a 100644
> --- a/drivers/staging/media/omap4iss/iss_video.h
> +++ b/drivers/staging/media/omap4iss/iss_video.h
> @@ -55,17 +55,17 @@ enum iss_pipeline_state {
> /* The stream has been started on the input video node. */
> ISS_PIPELINE_STREAM_INPUT = 1,

This should be BIT(0).

> /* The stream has been started on the output video node. */
> - ISS_PIPELINE_STREAM_OUTPUT = (1 << 1),
> + ISS_PIPELINE_STREAM_OUTPUT = BIT(1),

regards,
dan carpenter

\
 
 \ /
  Last update: 2022-01-21 10:42    [W:0.106 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site