From: Kenny Ballou <kballou@devnulllabs.io>
To: linux-pci@vger.kernel.org
Cc: googlegot@yahoo.com, bhelgaas@google.com
Subject: Re: [PATCH] pci: use kstrtobool over ad hoc string parsing
Date: Mon, 19 Feb 2018 13:56:23 -0700 [thread overview]
Message-ID: <87eflghf60.fsf@devnulllabs.io> (raw)
In-Reply-To: <20180212230457.23181-1-kballou@devnulllabs.io>
On 2018年02月12日 23:04 GMT, Kenny Ballou wrote:
> Convert ROM read access enable/disable string parsing to use the
> `kstrtobool` function.
>
> This fixes Bugzilla Bug 111301 -- Sysfs PCI rom file functionality does
> not match documentation.
>
> bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111301
>
> Reported-by: googlegot@yahoo.com
> Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
> ---
> drivers/pci/pci-sysfs.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index eb6bee8724cc..3cde1f25e786 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -1424,10 +1424,12 @@ static ssize_t pci_write_rom(struct file *filp, struct kobject *kobj,
> {
> struct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj));
>
> - if ((off == 0) && (*buf == '0') && (count == 2))
> - pdev->rom_attr_enabled = 0;
> - else
> + bool res = false;
> +
> + if (kstrtobool(buf, &res) == 0 && res)
> pdev->rom_attr_enabled = 1;
> + else
> + pdev->rom_attr_enabled = 0;
>
> return count;
> }
Bjorn,
How does one know if a patch was accepted? Should I be monitoring
patchwork? What's the status of the quoted patch? Patchwork doesn't
seem to show any changes for this patch.
Regards,
-Kenny
next prev parent reply other threads:[~2018-02-19 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 23:04 [PATCH] pci: use kstrtobool over ad hoc string parsing Kenny Ballou
2018-02-19 20:56 ` Kenny Ballou [this message]
2018-02-19 21:10 ` Bjorn Helgaas
2018-02-28 3:32 ` Bjorn Helgaas
2018-03-02 23:47 ` Kenny Ballou
2018-03-05 14:28 ` Bjorn Helgaas
2018-03-05 15:15 ` Kenny Ballou
2018-03-05 19:35 ` Bjorn Helgaas
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=87eflghf60.fsf@devnulllabs.io \
--to=kballou@devnulllabs.io \
--cc=bhelgaas@google.com \
--cc=googlegot@yahoo.com \
--cc=linux-pci@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.