2020-07-01 06:24:01

by Pawel Laszczak

[permalink] [raw]
Subject: [PATCH 3/9] usb: cnds3: Improvement: deleted !=

Patch deletes unnecessary != from condition statement ini cdns3_drd_init
function.

Signed-off-by: Pawel Laszczak <[email protected]>
---
drivers/usb/cdns3/drd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c
index 4939a568d8a2..6d2da504ad49 100644
--- a/drivers/usb/cdns3/drd.c
+++ b/drivers/usb/cdns3/drd.c
@@ -365,7 +365,7 @@ int cdns3_drd_init(struct cdns3 *cdns)
}

state = readl(&cdns->otg_regs->sts);
- if (OTGSTS_OTG_NRDY(state) != 0) {
+ if (OTGSTS_OTG_NRDY(state)) {
dev_err(cdns->dev, "Cadence USB3 OTG device not ready\n");
return -ENODEV;
}
--
2.17.1


2020-07-07 06:25:15

by Peter Chen

[permalink] [raw]
Subject: Re: [PATCH 3/9] usb: cnds3: Improvement: deleted !=

On 20-07-01 08:19:58, Pawel Laszczak wrote:
> Patch deletes unnecessary != from condition statement ini cdns3_drd_init
> function.

Change the title.

%s/ini/in

Peter
>
> Signed-off-by: Pawel Laszczak <[email protected]>
> ---
> drivers/usb/cdns3/drd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c
> index 4939a568d8a2..6d2da504ad49 100644
> --- a/drivers/usb/cdns3/drd.c
> +++ b/drivers/usb/cdns3/drd.c
> @@ -365,7 +365,7 @@ int cdns3_drd_init(struct cdns3 *cdns)
> }
>
> state = readl(&cdns->otg_regs->sts);
> - if (OTGSTS_OTG_NRDY(state) != 0) {
> + if (OTGSTS_OTG_NRDY(state)) {
> dev_err(cdns->dev, "Cadence USB3 OTG device not ready\n");
> return -ENODEV;
> }
> --
> 2.17.1
>

--

Thanks,
Peter Chen