RE: [PATCH] scsi: ufs: revamp string descriptor reading
> > > > Hello Tomas, > > > > > > > > > > > Define new a type: uc_string_id for easier string handling and less > > > > casting. Reduce number or string copies in price of a dynamic > > > > allocation. > > > > > > > > Signed-off-by: Tomas Winkler > > > Tested-by: Avri Altman > > > > > > Just one nit - doesn't really matters. > > > > > > Cheers, > > > Avri > > > > > > > --- > > > > drivers/scsi/ufs/ufs-sysfs.c | 20 ++--- > > > > drivers/scsi/ufs/ufs.h | 2 +- > > > > drivers/scsi/ufs/ufshcd.c| 164 +-- > > > > drivers/scsi/ufs/ufshcd.h| 9 +- > > > > 4 files changed, 115 insertions(+), 80 deletions(-) > > > > > > > > > > > > > > ufs_fixup_device_setup(hba, &card); > > > > + ufs_put_device_desc(&card); > > > ufs_get_device_desc() and ufs_put_device_desc() actually serves the > > > quirks setup. > > > Make sense to call it from within so the logic is clear and in one place. > > > Might also save ufs_put_device_desc(). > > > > You are right from the current perspective , just I'd need it also for the > RPMB > > patches that should follow, then it will have bit larger span than the > > quirks. > > > > Is this okay, can we merge? Looks good to me. Thanks, Avri > Thanks > Tomas
RE: [PATCH] scsi: ufs: revamp string descriptor reading
> > Hello Tomas, > > > > > > > > Define new a type: uc_string_id for easier string handling and less > > > casting. Reduce number or string copies in price of a dynamic > > > allocation. > > > > > > Signed-off-by: Tomas Winkler > > Tested-by: Avri Altman > > > > Just one nit - doesn't really matters. > > > > Cheers, > > Avri > > > > > --- > > > drivers/scsi/ufs/ufs-sysfs.c | 20 ++--- > > > drivers/scsi/ufs/ufs.h | 2 +- > > > drivers/scsi/ufs/ufshcd.c| 164 +-- > > > drivers/scsi/ufs/ufshcd.h| 9 +- > > > 4 files changed, 115 insertions(+), 80 deletions(-) > > > > > > > > > > ufs_fixup_device_setup(hba, &card); > > > + ufs_put_device_desc(&card); > > ufs_get_device_desc() and ufs_put_device_desc() actually serves the > > quirks setup. > > Make sense to call it from within so the logic is clear and in one place. > > Might also save ufs_put_device_desc(). > > You are right from the current perspective , just I'd need it also for the > RPMB > patches that should follow, then it will have bit larger span than the quirks. > Is this okay, can we merge? Thanks Tomas
RE: [PATCH] scsi: ufs: revamp string descriptor reading
> -Original Message- > From: Avri Altman [mailto:avri.alt...@wdc.com] > Sent: Tuesday, December 11, 2018 18:18 > To: Winkler, Tomas ; James E . J . Bottomley > ; Martin K . Petersen > ; Vinayak Holikatti ; > Hunter, Adrian > Cc: Christoph Hellwig ; Vivek Gautam > ; Subhash Jadavani > ; Alex Lemberg ; linux- > s...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] scsi: ufs: revamp string descriptor reading > > Hello Tomas, > > > > > Define new a type: uc_string_id for easier string handling and less > > casting. Reduce number or string copies in price of a dynamic > > allocation. > > > > Signed-off-by: Tomas Winkler > Tested-by: Avri Altman > > Just one nit - doesn't really matters. > > Cheers, > Avri > > > --- > > drivers/scsi/ufs/ufs-sysfs.c | 20 ++--- > > drivers/scsi/ufs/ufs.h | 2 +- > > drivers/scsi/ufs/ufshcd.c| 164 +-- > > drivers/scsi/ufs/ufshcd.h| 9 +- > > 4 files changed, 115 insertions(+), 80 deletions(-) > > > > > > ufs_fixup_device_setup(hba, &card); > > + ufs_put_device_desc(&card); > ufs_get_device_desc() and ufs_put_device_desc() actually serves the quirks > setup. > Make sense to call it from within so the logic is clear and in one place. > Might also save ufs_put_device_desc(). You are right from the current perspective , just I'd need it also for the RPMB patches that should follow, then it will have bit larger span than the quirks. Thanks Tomas
RE: [PATCH] scsi: ufs: revamp string descriptor reading
Hello Tomas, > > Define new a type: uc_string_id for easier string > handling and less casting. Reduce number or string > copies in price of a dynamic allocation. > > Signed-off-by: Tomas Winkler Tested-by: Avri Altman Just one nit - doesn't really matters. Cheers, Avri > --- > drivers/scsi/ufs/ufs-sysfs.c | 20 ++--- > drivers/scsi/ufs/ufs.h | 2 +- > drivers/scsi/ufs/ufshcd.c| 164 +-- > drivers/scsi/ufs/ufshcd.h| 9 +- > 4 files changed, 115 insertions(+), 80 deletions(-) > > ufs_fixup_device_setup(hba, &card); > + ufs_put_device_desc(&card); ufs_get_device_desc() and ufs_put_device_desc() actually serves the quirks setup. Make sense to call it from within so the logic is clear and in one place. Might also save ufs_put_device_desc().