LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Bart Van Assche <bvanassche@acm.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Bean Huo <beanhuo@micron.com>
Subject: RE: [PATCH v2 1/2] scsi: ufs: Probe for temperature notification support
Date: Fri, 10 Sep 2021 16:13:43 +0000 [thread overview]
Message-ID: <DM6PR04MB657592A71CA6394C409788B3FCD69@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <20210909165145.GA3973437@roeck-us.net>
> > + 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.
next prev parent reply other threads:[~2021-09-10 16:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 6:34 [PATCH v2 0/2] Add " Avri Altman
2021-09-09 6:34 ` [PATCH v2 1/2] scsi: ufs: Probe for " Avri Altman
2021-09-09 16:26 ` Bart Van Assche
2021-09-10 15:58 ` Avri Altman
2021-09-09 16:51 ` Guenter Roeck
2021-09-10 16:13 ` Avri Altman [this message]
2021-09-09 6:34 ` [PATCH v2 2/2] scsi: ufs: Add temperature notification exception handling Avri Altman
2021-09-09 16:54 ` Guenter Roeck
2021-09-10 16:32 ` Avri Altman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR04MB657592A71CA6394C409788B3FCD69@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=adrian.hunter@intel.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=martin.petersen@oracle.com \
--subject='RE: [PATCH v2 1/2] scsi: ufs: Probe for temperature notification support' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).