[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20161206070800.GC10047@kroah.com>
Date: Tue, 6 Dec 2016 08:08:00 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: csmanjuvijay@...il.com
Cc: Alan Stern <stern@...land.harvard.edu>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: OHCI: pxa27x: fix warnings and errors
On Mon, Dec 05, 2016 at 10:18:58PM +0000, csmanjuvijay@...il.com wrote:
> From: Manjunath Goudar <csmanjuvijay@...il.com>
>
> This patch will fix the checkpatch.pl warnings and errors.
>
> Signed-off-by: Manjunath Goudar <csmanjuvijay@...il.com>
> Cc: Alan Stern <stern@...land.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: linux-usb@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> ---
> drivers/usb/host/ohci-pxa27x.c | 28 +++++++++++++---------------
> 1 file changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
> index 79efde8f..c50a767 100644
> --- a/drivers/usb/host/ohci-pxa27x.c
> +++ b/drivers/usb/host/ohci-pxa27x.c
> @@ -106,7 +106,8 @@
> #define UHCHIE_UPS2IE (1 << 12) /* Power Sense Port2 IntEn */
> #define UHCHIE_UPS1IE (1 << 11) /* Power Sense Port1 IntEn */
> #define UHCHIE_TAIE (1 << 10) /* HCI Interface Transfer Abort
> - Interrupt Enable*/
> + * Interrupt Enable
> + */
> #define UHCHIE_HBAIE (1 << 8) /* HCI Buffer Active IntEn */
> #define UHCHIE_RWIE (1 << 7) /* Remote Wake-up IntEn */
>
> @@ -128,14 +129,14 @@ struct pxa27x_ohci {
> #define to_pxa27x_ohci(hcd) (struct pxa27x_ohci *)(hcd_to_ohci(hcd)->priv)
>
> /*
> - PMM_NPS_MODE -- PMM Non-power switching mode
> - Ports are powered continuously.
> -
> - PMM_GLOBAL_MODE -- PMM global switching mode
> - All ports are powered at the same time.
> -
> - PMM_PERPORT_MODE -- PMM per port switching mode
> - Ports are powered individually.
> + * PMM_NPS_MODE -- PMM Non-power switching mode
> + * Ports are powered continuously.
> + *
> + * PMM_GLOBAL_MODE -- PMM global switching mode
> + * All ports are powered at the same time.
> + *
> + * PMM_PERPORT_MODE -- PMM per port switching mode
> + * Ports are powered individually.
> */
> static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode)
> {
> @@ -157,10 +158,7 @@ static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode)
> uhcrhdb |= (0x7<<17);
> break;
> default:
> - printk( KERN_ERR
> - "Invalid mode %d, set to non-power switch mode.\n",
> - mode );
> -
> + pr_err("Invalid mode %d,set to non-power switch mode.\n", mode);
Use dev_err() please.
> uhcrhda |= RH_A_NPS;
> }
>
> @@ -541,7 +539,7 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev)
>
>
> if (time_before(jiffies, ohci->next_statechange))
> - msleep(5);
> + usleep_range(5000, 10000);
This is totally wrong :(
> ohci->next_statechange = jiffies;
>
> ret = ohci_suspend(hcd, do_wakeup);
> @@ -561,7 +559,7 @@ static int ohci_hcd_pxa27x_drv_resume(struct device *dev)
> int status;
>
> if (time_before(jiffies, ohci->next_statechange))
> - msleep(5);
> + usleep_range(5000, 10000);
As is this :(
Did you not check these changes?
Powered by blists - more mailing lists