lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <BL0PR04MB6564C8FA4C6105DFBFDE0622FCB82@BL0PR04MB6564.namprd04.prod.outlook.com>
Date: Wed, 7 Aug 2024 05:41:54 +0000
From: Avri Altman <Avri.Altman@....com>
To: Bart Van Assche <bvanassche@....org>, "Martin K . Petersen"
	<martin.petersen@...cle.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 1/2] scsi: ufs: Prepare to add HCI capabilities sysfs

> On 8/4/24 12:21 AM, Avri Altman wrote:
> > -     up(&hba->host_sem);
> > -     return ret;
> > +     return sysfs_emit(buf, "%d\n", ufshcd_ahit_to_us(ahit));
> >   }
> 
> All ufshcd_read_hci_reg() callers call sysfs_emit(). How about renaming
> ufshcd_read_hci_reg() into ufshcd_show_hci_reg(), adding an argument that
> indicates how the result should be formatted and moving the
> sysfs_emit() call into ufshcd_show_hci_reg()?
Yes, but with the cost of:
 - complication - You would need to attend the extra processing e.g. if ufs4.0 or as in hibern8 ahit_to_us(),
 - readability - read_hci_reg does just that (reading), and nothing more
 - breaks the _show _store convention that one would expect from a sysfs entry

Wouldn't keep it simple be better?

Thanks,
Avri
> 
> Thanks,
> 
> Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ