From: Bart Van Assche <bvanassche@acm.org>
To: Yang Xiuwei <yangxiuwei@kylinos.cn>
Cc: axboe@kernel.dk, fujita.tomonori@lab.ntt.co.jp,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, linux-block@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v7 1/3] bsg: add bsg_uring_cmd uapi structure
Date: Fri, 13 Mar 2026 08:34:22 -0700 [thread overview]
Message-ID: <79039bac-3785-41cf-8277-c120e3e475fa@acm.org> (raw)
In-Reply-To: <20260313073415.102437-1-yangxiuwei@kylinos.cn>
On 3/13/26 12:34 AM, Yang Xiuwei wrote:
> /* include/uapi/linux/bsg.h */
> #define BSG_URING_CMD_SIZE 80
>
> /* drivers/scsi/scsi_bsg.c */
> static_assert(sizeof(struct bsg_uring_cmd) == BSG_URING_CMD_SIZE);
>
> Does this arrangement look reasonable to you?
Wouldn't it be simpler to add the following statement just below the
struct bsg_uring_cmd definition, or in other words, not to introduce a
new #define?
static_assert(sizeof(struct bsg_uring_cmd) == 80);
There are already static_assert() statements in uapi header files:
$ git grep -nH 'static_assert.*sizeof' include/uapi
include/uapi/cxl/features.h:22:static_assert(sizeof(__uapi_uuid_t) ==
sizeof(uuid_t));
include/uapi/linux/media/amlogic/c3-isp-config.h:516:static_assert((sizeof(struct
c3_isp_params_cfg) - C3_ISP_PARAMS_MAX_SIZE) ==
include/uapi/linux/rkisp1-config.h:1617:static_assert((sizeof(struct
rkisp1_ext_params_cfg) -
Thanks,
Bart.
next prev parent reply other threads:[~2026-03-13 15:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 9:22 [PATCH v7 0/3] bsg: add io_uring command support for SCSI passthrough Yang Xiuwei
2026-03-12 9:22 ` [PATCH v7 1/3] bsg: add bsg_uring_cmd uapi structure Yang Xiuwei
2026-03-12 19:29 ` Bart Van Assche
2026-03-13 7:34 ` Yang Xiuwei
2026-03-13 15:34 ` Bart Van Assche [this message]
2026-03-12 9:22 ` [PATCH v7 2/3] bsg: add io_uring command support to generic layer Yang Xiuwei
2026-03-12 19:33 ` Bart Van Assche
2026-03-13 7:34 ` Yang Xiuwei
2026-03-13 15:35 ` Bart Van Assche
2026-03-12 9:22 ` [PATCH v7 3/3] scsi: bsg: add io_uring passthrough handler Yang Xiuwei
2026-03-12 19:41 ` Bart Van Assche
2026-03-13 7:34 ` Yang Xiuwei
2026-03-13 15:37 ` Bart Van Assche
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=79039bac-3785-41cf-8277-c120e3e475fa@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yangxiuwei@kylinos.cn \
/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