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]
Date:   Tue, 3 Nov 2020 08:55:20 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Stanley Chu <stanley.chu@...iatek.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kuohong.wang@...iatek.com" <kuohong.wang@...iatek.com>,
        "peter.wang@...iatek.com" <peter.wang@...iatek.com>,
        "chun-hung.wu@...iatek.com" <chun-hung.wu@...iatek.com>,
        "andy.teng@...iatek.com" <andy.teng@...iatek.com>,
        "chaotian.jing@...iatek.com" <chaotian.jing@...iatek.com>,
        "cc.chou@...iatek.com" <cc.chou@...iatek.com>,
        "jiajie.hao@...iatek.com" <jiajie.hao@...iatek.com>,
        "alice.chao@...iatek.com" <alice.chao@...iatek.com>
Subject: RE: [PATCH v1 1/6] scsi: ufs-mediatek: Assign arguments with correct
 type

> 
> Hi Avri,
> 
> On Tue, 2020-11-03 at 07:12 +0000, Avri Altman wrote:
> > >
> > > In ufs_mtk_unipro_set_lpm(), use specific unsigned values
> > > as the argument to invoke ufshcd_dme_set().
> > >
> > > In the same time, change the name of ufs_mtk_unipro_set_pm()
> > > to ufs_mtk_unipro_set_lpm() to align the naming convention
> > > in MediaTek UFS driver.
> > >
> > > Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
> > Looks like this patch is gilding the lily?
> 
> Thanks for the review.
> 
> Please see explanation below.
> 
> >
> > > ---
> > >  drivers/scsi/ufs/ufs-mediatek.c | 12 ++++++------
> > >  1 file changed, 6 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-
> mediatek.c
> > > index 8df73bc2f8cb..0196a89055b5 100644
> > > --- a/drivers/scsi/ufs/ufs-mediatek.c
> > > +++ b/drivers/scsi/ufs/ufs-mediatek.c
> > > @@ -639,14 +639,14 @@ static int ufs_mtk_pwr_change_notify(struct
> > > ufs_hba *hba,
> > >         return ret;
> > >  }
> > >
> > > -static int ufs_mtk_unipro_set_pm(struct ufs_hba *hba, bool lpm)
> > > +static int ufs_mtk_unipro_set_lpm(struct ufs_hba *hba, bool lpm)
> > >  {
> > >         int ret;
> > >         struct ufs_mtk_host *host = ufshcd_get_variant(hba);
> > >
> > >         ret = ufshcd_dme_set(hba,
> > >                              UIC_ARG_MIB_SEL(VS_UNIPROPOWERDOWNCONTROL,
> 0),
> > > -                            lpm);
> > > +                            lpm ? 1 : 0);
> > bool is implicitly converted to int anyway?
> 
> This change is the echo of your suggestion in
> https://patchwork.kernel.org/project/linux-
> scsi/patch/20200908064507.30774-4-stanley.chu@...iatek.com/
> 
> Actually I think your suggestion is constructive that the accepted
> values of VS_UNIPROPOWERDOWNCONTROL are better clearly defined so I
> use
> the casting here in this patch.
My previous comment that you refer to was against using bool as well,
But to leave it u32.
Anyway, I am not religious about it.

Looks fine,
Avri

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ