From: Gratian Crisan <gratian.crisan@ni.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org,
felipe.balbi@linux.intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, gratian@gmail.com
Subject: Re: [PATCH] usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
Date: Wed, 26 Jul 2023 14:00:21 -0500 [thread overview]
Message-ID: <875y66h4v2.fsf@ni.com> (raw)
In-Reply-To: <5fdc06b2-22bc-1470-e60c-1e388774ee4b@redhat.com>
Hans de Goede <hdegoede@redhat.com> writes:
> Thanks this change looks good to me.
>
>> @@ -247,8 +249,10 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc,
>> if (IS_ERR(gpio))
>> return PTR_ERR(gpio);
>>
>> - gpiod_set_value_cansleep(gpio, 1);
>> - gpiod_put(gpio);
>> + if (gpio) {
>> + gpiod_set_value_cansleep(gpio, 1);
>> + gpiod_put(gpio);
>> + }
>>
>> gpio = gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
>> if (IS_ERR(gpio))
>
> But this is not necessary both gpiod_set_value_cansleep() and gpiod_put() handle being called with NULL gracefully (so they handle NULL returned by gpiod_get_optional() without issues) .
>
> Can you please post a version 2 of this patch dropping this unnecessary change?
V2 posted: https://lore.kernel.org/linux-usb/20230726184555.218091-2-gratian.crisan@ni.com/
Thanks,
Gratian
prev parent reply other threads:[~2023-07-26 19:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 17:05 [PATCH] usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy Gratian Crisan
2023-07-26 14:33 ` Hans de Goede
2023-07-26 19:00 ` Gratian Crisan [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=875y66h4v2.fsf@ni.com \
--to=gratian.crisan@ni.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gratian@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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.