From: Greg KH <gregkh@linuxfoundation.org>
To: Kushagra Verma <kushagra765@outlook.com>
Cc: balbi@kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB / dwc3: remove the use of -ENOSYS from core.c
Date: Thu, 19 May 2022 17:59:46 +0200 [thread overview]
Message-ID: <YoZpcqDCwoXIvI5q@kroah.com> (raw)
In-Reply-To: <HK0PR01MB280106E1D78EF51A5B8ED8BFF8CE9@HK0PR01MB2801.apcprd01.prod.exchangelabs.com>
On Tue, May 17, 2022 at 08:22:00PM +0530, Kushagra Verma wrote:
> This patch removes the use of -ENOSYS as it is used when users try to call a
> syscall that doesn't exist. So, we don't need to check if 'ret == -ENOSYS'.
ENOSYS is also used internally in the kernel for other things.
>
> Signed-off-by: Kushagra Verma <kushagra765@outlook.com>
> ---
> drivers/usb/dwc3/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index c78205c5e19f..3c1a877d5183 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1283,7 +1283,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
> dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy");
> if (IS_ERR(dwc->usb2_generic_phy)) {
> ret = PTR_ERR(dwc->usb2_generic_phy);
> - if (ret == -ENOSYS || ret == -ENODEV)
> + if (ret == -ENODEV)
Did you validate that no callers can ever set this to ENOSYS?
Why was this added in the first place? What commit added it?
thanks,
greg k-h
next prev parent reply other threads:[~2022-05-19 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 14:52 [PATCH] USB / dwc3: remove the use of -ENOSYS from core.c Kushagra Verma
2022-05-19 15:59 ` Greg KH [this message]
2022-05-20 6:46 ` Kushagra Verma
2022-05-20 8:24 ` Greg KH
2022-05-23 12:43 ` Kushagra Verma
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=YoZpcqDCwoXIvI5q@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=balbi@kernel.org \
--cc=kushagra765@outlook.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 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).