Re: [PATCH v2] scsi: stop judging after finding a VPD page expected to be processed.

From: John Garry
Date: Thu Feb 27 2025 - 02:55:45 EST


On 27/02/2025 06:06, Chaohai Chen wrote:
+#define SCSI_BUILD_BUG_ON(cond) (sizeof(char[1 - 2 * !!(cond)]) - sizeof(char))
+
+#define VPD_PAGE_INFO(vpd_page) \
+ { 0x##vpd_page, offsetof(struct scsi_device, vpd_pg##vpd_page) + \
+ SCSI_BUILD_BUG_ON(!__same_type(&((struct scsi_device *)NULL)->vpd_pg##vpd_page, \
+ struct scsi_vpd __rcu **))} \
+
#define to_scsi_device(d) \

That's unreadable....