On 11/25/24 6:02 AM, Kai Mäkisara wrote:
+ unsigned char ua_new_media_ctr; /* Counter for New Media UNIT ATTENTIONs */ + unsigned char ua_por_ctr; /* Counter for Power On / Reset UAs */
Why unsigned char instead of e.g. u16 or u32? With one of the latter two data types, no cast would be necessary in the macros below.
+/* Macros to access the UNIT ATTENTION counters */ +#define scsi_get_ua_new_media_ctr(sdev) \ + ((const unsigned int)(sdev->ua_new_media_ctr)) +#define scsi_get_ua_por_ctr(sdev) \ + ((const unsigned int)(sdev->ua_por_ctr))
Please introduce macros in the patch that introduces the first user of these macros. I don't see any users of these macros in this patch?
Thanks, Bart.