USB: OHCI: pxa27x: fix warnings and errors
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · On Mon, Dec 05, 2016 at 10:18:58PM +0000, [email protected] wrote:
From: Manjunath Goudar <[email protected]>
This patch will fix the checkpatch.pl warnings and errors.
what warnings and errors? Please always be specific.
And don't send a single patch to fix everything up, break it up into logical types of fixes please.
thanks,
greg k-h
Quoted 51 lines · On Mon, Dec 05, 2016 at 10:18:58PM +0000, [email protected] wrote:
From: Manjunath Goudar <[email protected]>
This patch will fix the checkpatch.pl warnings and errors.
Signed-off-by Manjunath Goudar <[email protected]>Cc Alan Stern <[email protected]>Cc Greg Kroah-Hartman <[email protected]>--- drivers/usb/host/ohci-pxa27x.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-)drivers/usb/host/ohci-pxa27x.c +10
-9@@ -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) {
drivers/usb/host/ohci-pxa27x.c static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode) · line 161
Quoted 8 lines
drivers/usb/host/ohci-pxa27x.c +1
-4@@ -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.
drivers/usb/host/ohci-pxa27x.c static int ohci_hcd_pxa27x_drv_suspend(struct device *dev) · line 542
Quoted 9 lines
drivers/usb/host/ohci-pxa27x.c +1
-1uhcrhda |=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 :(
drivers/usb/host/ohci-pxa27x.c static int ohci_hcd_pxa27x_drv_resume(struct device *dev) · line 562
Quoted 9 lines
drivers/usb/host/ohci-pxa27x.c +1
-1ohci->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?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v2] USB: OHCI: pxa27x:fix warnings and error
Quoted 59 lines · On Wed, Dec 07, 2016 at 11:37:45PM +0000, [email protected] wrote:
From: Manjunath Goudar <[email protected]>
This patch will fix the checkpatch.pl following warnings and error:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
ERROR: space prohibited after that open parenthesis '('Signed-off-by Manjunath Goudar <[email protected]>Cc Alan Stern <[email protected]>Cc Greg Kroah-Hartman <[email protected]>---
changelogV1->V2:
Warnings and error message is added to the patch discrition.drivers/usb/host/ohci-pxa27x.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)drivers/usb/host/ohci-pxa27x.c +10
-9@@ -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) {
drivers/usb/host/ohci-pxa27x.c static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode) · line 161
Quoted 8 lines
drivers/usb/host/ohci-pxa27x.c +1
-4@@ -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 ); - +dev_err (mode,"Invalid mode %d,set to non-power switch mode.\n" );
Did you even compile this code?
Please do so...
And don't mix different types of fixes in the same patch please.
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): CAKsNYyyAx-OA5-4qJc-49Qt3n7u6Dq8SFy+KQsOLPKje4wAzag@mail.gmail.com
Re: [PATCH v2] USB: OHCI: pxa27x:fix warnings and error
Quoted 81 lines · manju goudar
On Thu, Dec 8, 2016 at 4:49 PM, Greg Kroah-Hartman <[email protected]> wrote:
On Wed, Dec 07, 2016 at 11:37:45PM +0000, [email protected] wrote:
> From: Manjunath Goudar <[email protected]>
>
> This patch will fix the checkpatch.pl following warnings and error:
> WARNING: Block comments use * on subsequent lines
> WARNING: Block comments use a trailing */ on a separate line > WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev,
> ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... > ERROR: space prohibited after that open parenthesis '('
>
> Signed-off-by: Manjunath Goudar <[email protected]>
> Cc: Alan Stern <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> changelogV1->V2:
> Warnings and error message is added to the patch discrition. >
>drivers/usb/host/ohci-pxa27x.c| 24 +++++++++++------------- > 1 file changed, 11 insertions(+), 13 deletions(-)
>
> diff --gita/drivers/usb/host/ohci-pxa27x.cb/drivers/usb/host/ohci-pxa27x.c
> index 79efde8f..73445ab 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
> + */
> #defineUHCHIE_HBAIE(1 << 8) /* HCI Buffer Active IntEn */ > #define UHCHIE_RWIE (1 << 7) /* Remote Wake-up IntEn */ >
> @@ -128,14 +129,14 @@ structpxa27x_ohci{
> #define to_pxa27x_ohci(hcd) (structpxa27x_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 intpxa27x_ohci_select_pmm(struct pxa27x_ohci *pxa_ohci, int mode)
> {
> @@ -157,10 +158,7 @@ static intpxa27x_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 );
> -
> + dev_err(mode, "Invalid mode %d,set to non-power switch mode.\n");
Quoted 4 lines
Did you even compile this code?
Yes It is successful compiled.
I don't believe you. Look at your change here and tell me how that dev_err() function is correct.
Quoted 5 lines
Please do so...
And don't mix different types of fixes in the same patch please.
don't mix up means each type of warning fix as a separate patch?
Yes please.
thanks,
greg k-h