From: sujithpshankar@gmail.com (Sujith Pandel)
Subject: [PATCH] NVMe:Expose model attribute in sysfs
Date: Wed, 9 Sep 2015 10:16:39 +0530 [thread overview]
Message-ID: <20150909044630.GA11728@localhost.localdomain> (raw)
In-Reply-To: <alpine.LNX.2.00.1509082123370.23840@localhost.lm.intel.com>
On Tue, Sep 08, 2015@04:29:54PM -0500, Keith Busch wrote:
> I'm wondering why you chose to add the device model number to sysfs since
> this is available via other methods. Is it to maintain parity with scsi?
Yes. scsi devices show model and vendor details as device attributes in sysfs.
Needed these two from nvme also.
> > + result = nvme_create_sysfs_files(dev->device);
> > if (result)
> > goto put_dev;
> >
> > @@ -3208,6 +3246,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> > return 0;
> >
> > put_dev:
> > + nvme_remove_sysfs_files(dev->device);
>
> You don't need to remove the sysfs files if creating them was not
> successful, so you shouldn't have to add this to the error out at this
> label. We'd need to add a new label with this in the future if the driver
> performs more tasks that could potentially fail, but this is the last
> thing this section of code does, so no need to unwind this.
Ok, I will make the change and send version-2 of the patch.
Thanks!
Regards,
Sujith
prev parent reply other threads:[~2015-09-09 4:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 4:54 [PATCH] NVMe:Expose model attribute in sysfs Sujith Pandel
2015-08-25 15:38 ` Matthew Wilcox
2015-09-01 16:38 ` Sujith Pandel
2015-08-25 17:14 ` Keith Busch
2015-09-01 16:55 ` Sujith Pandel
2015-09-01 17:25 ` Keith Busch
2015-09-04 4:54 ` Sujith Pandel
2015-09-08 21:29 ` Keith Busch
2015-09-09 4:46 ` Sujith Pandel [this message]
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=20150909044630.GA11728@localhost.localdomain \
--to=sujithpshankar@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).