From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: linux-staging@lists.linux.dev
Cc: Zhan Xusheng <zhanxusheng@xiaomi.com>
Subject: [PATCH 3/4] staging: greybus: gb-camera: use BIT() macro and fix formatting
Date: Fri, 19 Dec 2025 14:34:14 +0800 [thread overview]
Message-ID: <20251219063415.46818-4-zhanxusheng@xiaomi.com> (raw)
In-Reply-To: <20251219063415.46818-1-zhanxusheng@xiaomi.com>
Replace `(1 << 0)` with the `BIT(0)` macro for input/output flags
to follow Linux kernel style.
Also adjust the indentation of gb_camera_ops->configure_streams
parameters to match kernel coding style.
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
drivers/staging/greybus/gb-camera.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/greybus/gb-camera.h b/drivers/staging/greybus/gb-camera.h
index 3e09147435a5..d5a33a13f2a4 100644
--- a/drivers/staging/greybus/gb-camera.h
+++ b/drivers/staging/greybus/gb-camera.h
@@ -10,9 +10,9 @@
#include <linux/v4l2-mediabus.h>
/* Input flags need to be set from the caller */
-#define GB_CAMERA_IN_FLAG_TEST (1 << 0)
+#define GB_CAMERA_IN_FLAG_TEST BIT(0)
/* Output flags returned */
-#define GB_CAMERA_OUT_FLAG_ADJUSTED (1 << 0)
+#define GB_CAMERA_OUT_FLAG_ADJUSTED BIT(0)
/**
* struct gb_camera_stream - Represents greybus camera stream.
@@ -89,8 +89,9 @@ struct gb_camera_csi_params {
struct gb_camera_ops {
ssize_t (*capabilities)(void *priv, char *buf, size_t len);
int (*configure_streams)(void *priv, unsigned int *nstreams,
- unsigned int *flags, struct gb_camera_stream *streams,
- struct gb_camera_csi_params *csi_params);
+ unsigned int *flags,
+ struct gb_camera_stream *streams,
+ struct gb_camera_csi_params *csi_params);
int (*capture)(void *priv, u32 request_id,
unsigned int streams, unsigned int num_frames,
size_t settings_size, const void *settings);
--
2.43.0
next prev parent reply other threads:[~2025-12-19 6:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 6:34 [PATCH 0/4] greybus: staging fixes and cleanups Zhan Xusheng
2025-12-19 6:34 ` [PATCH 1/4] staging: greybus: spilib: fix function parameter indentation Zhan Xusheng
2025-12-22 8:45 ` Greg KH
2025-12-19 6:34 ` [PATCH 2/4] staging: greybus: audio: avoid macro with side effects Zhan Xusheng
2025-12-22 8:46 ` Greg KH
2025-12-19 6:34 ` Zhan Xusheng [this message]
2025-12-22 8:46 ` [PATCH 3/4] staging: greybus: gb-camera: use BIT() macro and fix formatting Greg KH
2025-12-19 6:34 ` [PATCH 4/4] staging: greybus: greybus_firmware: fix long macro lines Zhan Xusheng
2025-12-22 8:47 ` Greg KH
2025-12-22 15:40 ` [PATCH 1/4] staging: greybus: gb-camera: use BIT() macro and fix formatting Zhan Xusheng
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=20251219063415.46818-4-zhanxusheng@xiaomi.com \
--to=zhanxusheng1024@gmail.com \
--cc=linux-staging@lists.linux.dev \
--cc=zhanxusheng@xiaomi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox