Re: [PATCH v2 2/4] scsi: scsi_error: Add counters for New Media and Power On/Reset UNIT ATTENTIONs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux