Message ID | 20200523232304.23976-7-peter.chen@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | usb: some PM changes for cdns3 and xhci-plat | expand |
> -----Original Message----- > From: Peter Chen <peter.chen@nxp.com> > Sent: 2020年5月24日 7:23 > To: balbi@kernel.org; mathias.nyman@intel.com > Cc: linux-usb@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>; > pawell@cadence.com; rogerq@ti.com; gregkh@linuxfoundation.org; Jun Li > <jun.li@nxp.com>; Peter Chen <peter.chen@nxp.com> > Subject: [PATCH v2 6/9] usb: host: xhci-plat: delete the unnecessary code > > The if {} condition is duplicated with outer if {} condition. > > Signed-off-by: Peter Chen <peter.chen@nxp.com> Reviewed-by: Jun Li <jun.li@nxp.com> > --- > drivers/usb/host/xhci-plat.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index > 51e20464fe0a..03d6bbe51919 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -283,8 +283,7 @@ static int xhci_plat_probe(struct platform_device *pdev) > struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); > > /* Just copy data for now */ > - if (priv_match) > - *priv = *priv_match; > + *priv = *priv_match; > } > > device_wakeup_enable(hcd->self.controller); > -- > 2.17.1
On 24.5.2020 2.23, Peter Chen wrote: > The if {} condition is duplicated with outer if {} condition. > > Signed-off-by: Peter Chen <peter.chen@nxp.com> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> > --- > drivers/usb/host/xhci-plat.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c > index 51e20464fe0a..03d6bbe51919 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -283,8 +283,7 @@ static int xhci_plat_probe(struct platform_device *pdev) > struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); > > /* Just copy data for now */ > - if (priv_match) > - *priv = *priv_match; > + *priv = *priv_match; > } > > device_wakeup_enable(hcd->self.controller); >
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 51e20464fe0a..03d6bbe51919 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -283,8 +283,7 @@ static int xhci_plat_probe(struct platform_device *pdev) struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); /* Just copy data for now */ - if (priv_match) - *priv = *priv_match; + *priv = *priv_match; } device_wakeup_enable(hcd->self.controller);
The if {} condition is duplicated with outer if {} condition. Signed-off-by: Peter Chen <peter.chen@nxp.com> --- drivers/usb/host/xhci-plat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)