Re: [PATCH] scsi: qla2xxx: Rework BUILD_BUG_ON() assertion

From: Bart Van Assche

Date: Mon Nov 23 2026 - 11:24:59 EST


On 3/9/26 10:59 PM, Finn Thain wrote:
Fixes: e428b013d9df ("atomic: specify alignment for atomic_t and atomic64_t").

Please remove the trailing dot from the above line.

- /* atio must be the last member of qla_tgt_sess_op for add_cdb_len */
- BUILD_BUG_ON(offsetof(struct qla_tgt_sess_op, atio) + sizeof(u->atio) != sizeof(*u));
+ /* atio_u_isp24_fcp_cmnd_add_cdb follows immediately after atio */
+ BUILD_BUG_ON(offsetof(struct qla_tgt_sess_op, atio) + sizeof(struct atio_from_isp) !=
+ offsetof(struct qla_tgt_sess_op, atio_u_isp24_fcp_cmnd_add_cdb));

Has it been considered to use offsetofend() in the above expression?

+ uint8_t atio_u_isp24_fcp_cmnd_add_cdb[];

The array name is rather long. How about "add_cdb" or "extra_cdb"?

Thanks,

Bart.