Thread (29 messages) 29 messages, 5 authors, 2021-02-08

RE: [PATCH v2 2/9] scsi: ufshpb: Add host control mode support to rsp_upiu

From: Avri Altman <Avri.Altman@wdc.com>
Date: 2021-02-02 11:56:02
Also in: lkml

On Tue, Feb 02, 2021 at 11:24:04AM +0000, Avri Altman wrote:
quoted
quoted
On Tue, Feb 02, 2021 at 10:30:00AM +0200, Avri Altman wrote:
quoted
diff --git a/drivers/scsi/ufs/ufshpb.h b/drivers/scsi/ufs/ufshpb.h
index afeb6365daf8..5ec4023db74d 100644
--- a/drivers/scsi/ufs/ufshpb.h
+++ b/drivers/scsi/ufs/ufshpb.h
@@ -48,6 +48,11 @@ enum UFSHPB_MODE {
      HPB_DEVICE_CONTROL,
 };

+enum HPB_RGN_FLAGS {
+     RGN_FLAG_UPDATE = 0,
+     RGN_FLAG_DIRTY,
+};
+
 enum UFSHPB_STATE {
      HPB_PRESENT = 1,
      HPB_SUSPEND,
@@ -109,6 +114,7 @@ struct ufshpb_region {

      /* below information is used by lru */
      struct list_head list_lru_rgn;
+     unsigned long rgn_flags;
Why an unsigned long for a simple enumerated type?  And why not make
this "type safe" by explicitly saying this is an enumerated type
variable?
I am using it for atomic bit operations.
That's not obvious given you have an enumerated type above.  Seems like
an odd mix...
Done.
Will make it clear that those are bit indices.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help