From: Moses Christopher Bollavarapu <mosescb.dev@gmail.com>
To: laurent.pinchart@ideasonboard.com, mchehab@kernel.org,
gregkh@linuxfoundation.org
Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Moses Christopher Bollavarapu <mosescb.dev@gmail.com>
Subject: [PATCH] drivers: staging: media: omap4iss: Use BIT macro instead of left shifting
Date: Fri, 21 Jan 2022 10:37:22 +0100 [thread overview]
Message-ID: <20220121093722.320082-1-mosescb.dev@gmail.com> (raw)
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,
/* The stream has been started on the output video node. */
- ISS_PIPELINE_STREAM_OUTPUT = (1 << 1),
+ ISS_PIPELINE_STREAM_OUTPUT = BIT(1),
/* At least one buffer is queued on the input video node. */
- ISS_PIPELINE_QUEUE_INPUT = (1 << 2),
+ ISS_PIPELINE_QUEUE_INPUT = BIT(2),
/* At least one buffer is queued on the output video node. */
- ISS_PIPELINE_QUEUE_OUTPUT = (1 << 3),
+ ISS_PIPELINE_QUEUE_OUTPUT = BIT(3),
/* The input entity is idle, ready to be started. */
- ISS_PIPELINE_IDLE_INPUT = (1 << 4),
+ ISS_PIPELINE_IDLE_INPUT = BIT(4),
/* The output entity is idle, ready to be started. */
- ISS_PIPELINE_IDLE_OUTPUT = (1 << 5),
+ ISS_PIPELINE_IDLE_OUTPUT = BIT(5),
/* The pipeline is currently streaming. */
- ISS_PIPELINE_STREAM = (1 << 6),
+ ISS_PIPELINE_STREAM = BIT(6),
};
/*
@@ -119,9 +119,9 @@ struct iss_buffer {
enum iss_video_dmaqueue_flags {
/* Set if DMA queue becomes empty when ISS_PIPELINE_STREAM_CONTINUOUS */
- ISS_VIDEO_DMAQUEUE_UNDERRUN = (1 << 0),
+ ISS_VIDEO_DMAQUEUE_UNDERRUN = BIT(0),
/* Set when queuing buffer to an empty DMA queue */
- ISS_VIDEO_DMAQUEUE_QUEUED = (1 << 1),
+ ISS_VIDEO_DMAQUEUE_QUEUED = BIT(1),
};
#define iss_video_dmaqueue_flags_clr(video) \
--
2.30.2
next reply other threads:[~2022-01-21 9:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 9:37 Moses Christopher Bollavarapu [this message]
2022-01-21 9:41 ` [PATCH] drivers: staging: media: omap4iss: Use BIT macro instead of left shifting Dan Carpenter
2022-01-21 10:02 ` Moses Christopher Bollavarapu
2022-01-21 10:08 ` Moses Christopher Bollavarapu
2022-01-21 10:08 ` [PATCH v2] " Moses Christopher Bollavarapu
2022-01-21 10:14 ` Greg KH
2022-01-21 10:20 ` Dan Carpenter
2022-01-21 10:51 ` [PATCH v3] " Moses Christopher Bollavarapu
2022-01-23 23:04 ` Laurent Pinchart
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=20220121093722.320082-1-mosescb.dev@gmail.com \
--to=mosescb.dev@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
/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.