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: <DM6PR04MB657592A71CA6394C409788B3FCD69@DM6PR04MB6575.namprd04.prod.outlook.com>
Date:   Fri, 10 Sep 2021 16:13:43 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Guenter Roeck <linux@...ck-us.net>
CC:     "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Bart Van Assche <bvanassche@....org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Bean Huo <beanhuo@...ron.com>
Subject: RE: [PATCH v2 1/2] scsi: ufs: Probe for temperature notification
 support

> > +     if (IS_ERR(hwmon)) {
> > +             dev_warn(dev, "Failed to instantiate hwmon device\n");
> > +             kfree(data);
> > +             return PTR_ERR(hwmon);
> 
> If the error is ignored by the caller, it doesn't make sense to return it.
Done.

> 
> > +     }
> > +
> > +     hba->hwmon_device = hwmon;
> > +
> > +     return 0;
> > +}
> > +
> > +void ufs_hwmon_remove(struct ufs_hba *hba) {
> > +     if (hba->hwmon_device) {
> > +             struct ufs_hwmon_data *data =
> > +                     dev_get_drvdata(hba->hwmon_device);
> > +
> > +             hwmon_device_unregister(hba->hwmon_device);
> > +             hba->hwmon_device = NULL;
> > +             kfree(data);
> > +     }
> > +}
> 
> That function is never called and thus pointless (suggesting that there may
> be some structural problem in the code).
Yayks... Forgot to call it from ufshcd_remve()
Thanks.

> >
> >       ufshcd_wb_probe(hba, desc_buf);
> >
> > +     ufshcd_temp_notif_probe(hba, desc_buf);
> > +
> 
> Is that the appropriate place to make this call ?
Yes I think so.
This path is on link startup when the host reads the device configuration.

> > +#ifdef CONFIG_SCSI_UFS_HWMON
> > +int ufs_hwmon_probe(struct ufs_hba *hba, u8 mask); void
> > +ufs_hwmon_remove(struct ufs_hba *hba); #else static inline int
> > +ufs_hwmon_probe(struct ufs_hba *hba, u8 mask) { return 0; } static
> > +inline void nvme_hwmon_remove(struct ufs_hba *hba) {}
> 
> ufs_hwmon_remove
Done. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ