RE: [PATCH v2 2/9] scsi: ufshpb: Add host control mode support to rsp_upiu
From: Avri Altman
Date: Tue Feb 02 2021 - 06:29:23 EST
>
> On Tue, Feb 02, 2021 at 10:30:00AM +0200, Avri Altman wrote:
> > 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.
Thanks,
Avri