All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings
@ 2015-02-27  9:48 Haneen Mohammed
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27  9:48 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patchset fixes the following coding style issues found by checkpatch.pl:
Do not add new typedefs.
Use of volatile is usually wrong.
printk(KERNEL_ERR not prefered.

Changes in v6:
- Merged two patches into one: remove typedef and volatile.
- Justified the use of pr_err instead of dev_err.
Changes in v5:
- Fix spelling mistakes
- Justify the removal of volatile
- Replaced pr_err with dev_err when possible
Changes in v4:
- Patchset broken into smaller pathces
Changes in v3:
- Create patchset from two patches
Changes in v2:
- First patch reversion

Haneen Mohammed (4):
  Staging: emxx_udc: Replace custom printk macro ERR with pr_err
  Staging: emxx_udc: Replace custom printk macro ERR with dev_err
  Staging: emxx_udc: Remove custom printk macro ERR
  Staging: emxx_udc: Clean dev_err() logging

 drivers/staging/emxx_udc/emxx_udc.c | 82 ++++++++++++++++++-------------------
 drivers/staging/emxx_udc/emxx_udc.h |  1 -
 2 files changed, 41 insertions(+), 42 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v7 0/5] Staging: emxx_udc: Fix checkpatch.pl warnings
  2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
@ 2015-02-27 10:01 ` Haneen Mohammed
  2015-02-27 10:26   ` [PATCH v8 " Haneen Mohammed
                     ` (5 more replies)
  2015-03-01 20:53 ` [PATCH v9 0/4] emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
                   ` (4 subsequent siblings)
  5 siblings, 6 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:01 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patchset fixes the following coding style issues found by checkpatch.pl:
Do not add new typedefs.
Use of volatile is usually wrong.
printk(KERNEL_ERR not prefered.

Changes in v7:
- Add missing first patch in v6 removal of typedefs and volatile.
Changes in v6:
- Merged two patches into one: remove typedef and volatile.
- Justified the use of pr_err instead of dev_err.
Changes in v5:
- Fix spelling mistakes
- Justify the removal of volatile
- Replaced pr_err with dev_err when possible
Changes in v4:
- Patchset broken into smaller pathces
Changes in v3:
- Create patchset from two patches
Changes in v2:
- First patch reversion

Haneen Mohammed (5):
  Staging: emxx_udc: Fix do not add new typedefs remove volatile
  Staging: emxx_udc: Replace custom printk macro ERR with pr_err
  Staging: emxx_udc: Replace custom printk macro ERR with dev_err
  Staging: emxx_udc: Remove custom printk macro ERR
  Staging: emxx_udc: Clean dev_err() logging

 drivers/staging/emxx_udc/emxx_udc.c | 142 ++++++++++++++++++------------------
 drivers/staging/emxx_udc/emxx_udc.h |  27 ++++---
 2 files changed, 84 insertions(+), 85 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v8 0/5] Staging: emxx_udc: Fix checkpatch.pl warnings
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
@ 2015-02-27 10:26   ` Haneen Mohammed
  2015-02-27 10:28   ` [PATCH v8 1/5] Staging: emxx_udc: Fix do not add new typedefs remove and volatile Haneen Mohammed
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:26 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed


This patchset fixes the following coding style issues found by checkpatch.pl:
Do not add new typedefs.
Use of volatile is usually wrong.
printk(KERNEL_ERR not prefered.

Changes in v8:
- Edit first patch subject line.
Changes in v7:
- Add missing first patch in v6: removal of typedefs and volatile. 
Changes in v6:
- Merged two patches into one: remove typedef and volatile.
- Justified the use of pr_err instead of dev_err.
Changes in v5:
- Fix spelling mistakes
- Justify the removal of volatile
- Replaced pr_err with dev_err when possible
Changes in v4:
- Patchset broken into smaller pathces
Changes in v3:
- Create patchset from two patches
Changes in v2:
- First patch reversion

Haneen Mohammed (5):
  Staging: emxx_udc: Fix do not add new typedefs and remove volatile
  Staging: emxx_udc: Replace custom printk macro ERR with pr_err
  Staging: emxx_udc: Replace custom printk macro ERR with dev_err
  Staging: emxx_udc: Remove custom printk macro ERR
  Staging: emxx_udc: Clean dev_err() logging

 drivers/staging/emxx_udc/emxx_udc.c | 142 ++++++++++++++++++------------------
 drivers/staging/emxx_udc/emxx_udc.h |  27 ++++---
 2 files changed, 84 insertions(+), 85 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v8 1/5] Staging: emxx_udc: Fix do not add new typedefs remove and volatile
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
  2015-02-27 10:26   ` [PATCH v8 " Haneen Mohammed
@ 2015-02-27 10:28   ` Haneen Mohammed
  2015-02-27 10:31   ` [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err Haneen Mohammed
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:28 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch fixes the following checkpatch.pl warnings:"do not add new
typedefs" and "Use of volatile is usually wrong".
Remove typedefs keyword and rename identifiers appropriately.
Remove volatile from union usb_regs_access.
Update related  files.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v8: Edit subject line.
v7: nothing.
v6: merge two patches into one. removal of typedefs and of volatile.
v5: nothing
v4: Replace struct with volatile union for usb_reg_access.
v3: Removed all typedefs and created patchset from emxx_udc.
v2: Removed typedefs appropriately and changed related file.

 drivers/staging/emxx_udc/emxx_udc.c | 60 ++++++++++++++++++-------------------
 drivers/staging/emxx_udc/emxx_udc.h | 26 ++++++++--------
 2 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 4be646c..f2ddad3 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -201,7 +201,7 @@ static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc)
 	u32		num, buf_type;
 	u32		data, last_ram_adr, use_ram_size;
 
-	PT_EP_REGS	p_ep_regs;
+	struct ep_regs *p_ep_regs;
 
 	last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2;
 	use_ram_size = 0;
@@ -394,7 +394,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 {
 	u32		num;
 	u32		data;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (udc->vbus_active == 0)
 		return;		/* VBUS OFF */
@@ -425,7 +425,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 /* Abort DMA */
 static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 {
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	_nbu2ss_bitclr(&preg->EP_DCR[ep->epnum-1].EP_DCR1, DCR1_EPn_REQEN);
 	mdelay(DMA_DISABLE_TIME);	/* DCR1_EPn_REQEN Clear */
@@ -443,7 +443,7 @@ static void _nbu2ss_ep_in_end(
 {
 	u32		data;
 	u32		num;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (length >= sizeof(u32))
 		return;
@@ -567,7 +567,7 @@ static int EP0_out_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 	u32		i;
 	int		nret   = 0;
 	u32		iWordLength = 0;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access *pBuf32 = (union usb_reg_access *)pBuf;
 
 	/*------------------------------------------------------------*/
 	/* Read Length */
@@ -592,8 +592,8 @@ static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 {
 	u32		i;
 	u32		iReadSize = 0;
-	USB_REG_ACCESS  Temp32;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access  Temp32;
+	union usb_reg_access  *pBuf32 = (union usb_reg_access *)pBuf;
 
 	if ((0 < length) && (length < sizeof(u32))) {
 		Temp32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
@@ -613,7 +613,7 @@ static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 	u32		iMaxLength   = EP0_PACKETSIZE;
 	u32		iWordLength  = 0;
 	u32		iWriteLength = 0;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access  *pBuf32 = (union usb_reg_access *)pBuf;
 
 	/*------------------------------------------------------------*/
 	/* Transfer Length */
@@ -638,8 +638,8 @@ static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 static int EP0_in_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 iRemainSize)
 {
 	u32		i;
-	USB_REG_ACCESS Temp32;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access  Temp32;
+	union usb_reg_access  *pBuf32 = (union usb_reg_access *)pBuf;
 
 	if ((0 < iRemainSize) && (iRemainSize < sizeof(u32))) {
 		for (i = 0 ; i < iRemainSize ; i++)
@@ -840,7 +840,7 @@ static int _nbu2ss_out_dma(
 	u32		burst = 1;
 	u32		data;
 	int		result = -EINVAL;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
@@ -900,10 +900,10 @@ static int _nbu2ss_epn_out_pio(
 	u32		i;
 	u32		data;
 	u32		iWordLength;
-	USB_REG_ACCESS	Temp32;
-	USB_REG_ACCESS	*pBuf32;
+	union usb_reg_access	Temp32;
+	union usb_reg_access	*pBuf32;
 	int		result = 0;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
@@ -912,7 +912,7 @@ static int _nbu2ss_epn_out_pio(
 		return 0;
 
 	pBuffer = (u8 *)req->req.buf;
-	pBuf32 = (USB_REG_ACCESS *)(pBuffer + req->req.actual);
+	pBuf32 = (union usb_reg_access *)(pBuffer + req->req.actual);
 
 	iWordLength = length / sizeof(u32);
 	if (iWordLength > 0) {
@@ -988,7 +988,7 @@ static int _nbu2ss_epn_out_transfer(
 	u32		num;
 	u32		iRecvLength;
 	int		result = 1;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (ep->epnum == 0)
 		return -EINVAL;
@@ -1051,7 +1051,7 @@ static int _nbu2ss_in_dma(
 	u32		iWriteLength;
 	u32		data;
 	int		result = -EINVAL;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
@@ -1123,17 +1123,17 @@ static int _nbu2ss_epn_in_pio(
 	u32		i;
 	u32		data;
 	u32		iWordLength;
-	USB_REG_ACCESS	Temp32;
-	USB_REG_ACCESS	*pBuf32 = NULL;
+	union usb_reg_access	Temp32;
+	union usb_reg_access	*pBuf32 = NULL;
 	int		result = 0;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
 
 	if (length > 0) {
 		pBuffer = (u8 *)req->req.buf;
-		pBuf32 = (USB_REG_ACCESS *)(pBuffer + req->req.actual);
+		pBuf32 = (union usb_reg_access *)(pBuffer + req->req.actual);
 
 		iWordLength = length / sizeof(u32);
 		if (iWordLength > 0) {
@@ -1347,7 +1347,7 @@ static void _nbu2ss_set_endpoint_stall(
 	u8		num, epnum;
 	u32		data;
 	struct nbu2ss_ep *ep;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
 		if (bstall) {
@@ -1471,7 +1471,7 @@ static int _nbu2ss_get_ep_stall(struct nbu2ss_udc *udc, u8 ep_adrs)
 {
 	u8		epnum;
 	u32		data = 0, bit_data;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	epnum = ep_adrs & ~USB_ENDPOINT_DIR_MASK;
 	if (epnum == 0) {
@@ -1566,7 +1566,7 @@ static void _nbu2ss_epn_set_stall(
 	u32	regdata;
 	int	limit_cnt = 0;
 
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (ep->direct == USB_DIR_IN) {
 		for (limit_cnt = 0
@@ -1994,7 +1994,7 @@ static inline void _nbu2ss_epn_in_int(
 	int	result = 0;
 	u32	status;
 
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return;		/* DMA is forwarded */
@@ -2090,7 +2090,7 @@ static inline void _nbu2ss_epn_out_dma_int(
 	u32		num;
 	u32		dmacnt, ep_dmacnt;
 	u32		mpkt;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	num = ep->epnum - 1;
 
@@ -2293,7 +2293,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 /*-------------------------------------------------------------------------*/
 static void _nbu2ss_fifo_flush(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 {
-	PT_FC_REGS	p = udc->p_regs;
+	struct fc_regs	*p = udc->p_regs;
 
 	if (udc->vbus_active == 0)
 		return;
@@ -2536,7 +2536,7 @@ static irqreturn_t _nbu2ss_udc_irq(int irq, void *_udc)
 	u32	epnum, int_bit;
 
 	struct nbu2ss_udc	*udc = (struct nbu2ss_udc *)_udc;
-	PT_FC_REGS		preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (gpio_get_value(VBUS_VALUE) == 0) {
 		_nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW);
@@ -2944,7 +2944,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 	struct nbu2ss_ep	*ep;
 	struct nbu2ss_udc	*udc;
 	unsigned long		flags;
-	PT_FC_REGS		preg;
+	struct fc_regs		*preg;
 
 /*	INFO("=== %s()\n", __func__); */
 
@@ -3341,7 +3341,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 				  0, driver_name, udc);
 
 	/* IO Memory */
-	udc->p_regs = (PT_FC_REGS)mmio_base;
+	udc->p_regs = (struct fc_regs *)mmio_base;
 
 	/* USB Function Controller Interrupt */
 	if (status != 0) {
diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
index 202e2dc..c21f211 100644
--- a/drivers/staging/emxx_udc/emxx_udc.h
+++ b/drivers/staging/emxx_udc/emxx_udc.h
@@ -474,8 +474,8 @@
 
 /*===========================================================================*/
 /* Struct */
-/*------- T_EP_REGS */
-typedef struct _T_EP_REGS {
+/*------- ep_regs */
+struct ep_regs {
 	u32 EP_CONTROL;			/* EP Control */
 	u32 EP_STATUS;			/* EP Status */
 	u32 EP_INT_ENA;			/* EP Interrupt Enable */
@@ -484,18 +484,18 @@ typedef struct _T_EP_REGS {
 	u32 EP_LEN_DCNT;		/* EP Length & DMA count */
 	u32 EP_READ;			/* EP Read */
 	u32 EP_WRITE;			/* EP Write */
-} T_EP_REGS, *PT_EP_REGS;
+};
 
-/*------- T_EP_DCR */
-typedef struct _T_EP_DCR {
+/*------- ep_dcr */
+struct ep_dcr {
 	u32 EP_DCR1;			/* EP_DCR1 */
 	u32 EP_DCR2;			/* EP_DCR2 */
 	u32 EP_TADR;			/* EP_TADR */
 	u32 Reserved;			/* Reserved */
-} T_EP_DCR, *PT_EP_DCR;
+};
 
 /*------- Function Registers */
-typedef struct _T_FC_REGS {
+struct fc_regs {
 	u32 USB_CONTROL;		/* (0x0000) USB Control */
 	u32 USB_STATUS;			/* (0x0004) USB Status */
 	u32 USB_ADDRESS;		/* (0x0008) USB Address */
@@ -513,7 +513,7 @@ typedef struct _T_FC_REGS {
 	u32 EP0_READ;			/* (0x0038) EP0 Read */
 	u32 EP0_WRITE;			/* (0x003C) EP0 Write */
 
-	T_EP_REGS EP_REGS[REG_EP_NUM];	/* Endpoint Register */
+	struct ep_regs EP_REGS[REG_EP_NUM];	/* Endpoint Register */
 
 	u8 Reserved220[0x1000-0x220];	/* (0x0220:0x0FFF) Reserved */
 
@@ -531,11 +531,11 @@ typedef struct _T_FC_REGS {
 
 	u8 Reserved1028[0x110-0x28];	/* (0x1028:0x110F) Reserved */
 
-	T_EP_DCR EP_DCR[REG_EP_NUM];	/* */
+	struct ep_dcr EP_DCR[REG_EP_NUM];	/* */
 
 	u8 Reserved1200[0x1000-0x200];	/* Reserved */
 
-} __attribute__ ((aligned(32))) T_FC_REGS, *PT_FC_REGS;
+} __attribute__ ((aligned(32)));
 
 
 
@@ -631,16 +631,16 @@ struct nbu2ss_udc {
 
 	u32		curr_config;	/* Current Configuration Number */
 
-	PT_FC_REGS		p_regs;
+	struct fc_regs		*p_regs;
 };
 
 /* USB register access structure */
-typedef volatile union {
+union usb_reg_access {
 	struct {
 		unsigned char	DATA[4];
 	} byte;
 	unsigned int		dw;
-} USB_REG_ACCESS;
+};
 
 /*-------------------------------------------------------------------------*/
 #define ERR(stuff...)		printk(KERN_ERR "udc: " stuff)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
  2015-02-27 10:26   ` [PATCH v8 " Haneen Mohammed
  2015-02-27 10:28   ` [PATCH v8 1/5] Staging: emxx_udc: Fix do not add new typedefs remove and volatile Haneen Mohammed
@ 2015-02-27 10:31   ` Haneen Mohammed
  2015-02-27 10:59     ` [Outreachy kernel] " Julia Lawall
  2015-02-27 10:32   ` [PATCH v8 3/5] Staging: emxx_udc: Replace custom printk macro ERR with dev_err Haneen Mohammed
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:31 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes half custom printk macros ERR and replace it with
pr_err, for no appropriate struct device *dev field where found for dev_err.
Issue addressed by checkpathc.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v6: Justify the use of pr_err instead of dev_err. 

 drivers/staging/emxx_udc/emxx_udc.c | 56 ++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index f2ddad3..094e018 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -115,7 +115,7 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
 	pr_info("=== %s()\n", __func__);
 
 	if (udc == NULL) {
-		ERR("%s udc == NULL\n", __func__);
+		pr_err("udc: %s udc == NULL\n", __func__);
 		return;
 	}
 
@@ -2258,7 +2258,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 	u32	reg_dt;
 
 	if (!udc) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2612,13 +2612,13 @@ static int nbu2ss_ep_enable(
 	struct nbu2ss_udc	*udc;
 
 	if ((_ep == NULL) || (desc == NULL)) {
-		ERR(" *** %s, bad param\n", __func__);
+		pr_err("udc: *** %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if ((ep == NULL) || (ep->udc == NULL)) {
-		ERR(" *** %s, ep == NULL !!\n", __func__);
+		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
 	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
 		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
 
-		ERR(" *** %s, bat bmAttributes\n", __func__);
+		pr_err("udc:  *** %s, bat bmAttributes\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2672,13 +2672,13 @@ static int nbu2ss_ep_disable(struct usb_ep *_ep)
 	unsigned long		flags;
 
 	if (_ep == NULL) {
-		ERR(" *** %s, bad param\n", __func__);
+		pr_err("udc:  *** %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if ((ep == NULL) || (ep->udc == NULL)) {
-		ERR(" *** %s, ep == NULL !!\n", __func__);
+		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2742,10 +2742,10 @@ static int nbu2ss_ep_queue(
 	/* catch various bogus parameters */
 	if ((_ep == NULL) || (_req == NULL)) {
 		if (_ep == NULL)
-			ERR("*** %s --- _ep == NULL\n", __func__);
+			pr_err("udc: *** %s --- _ep == NULL\n", __func__);
 
 		if (_req == NULL)
-			ERR("*** %s --- _req == NULL\n", __func__);
+			pr_err("udc: *** %s --- _req == NULL\n", __func__);
 
 		return -EINVAL;
 	}
@@ -2756,13 +2756,13 @@ static int nbu2ss_ep_queue(
 	     || !list_empty(&req->queue))) {
 
 		if (!_req->complete)
-			ERR("*** %s --- !_req->complete\n", __func__);
+			pr_err("udc: *** %s --- !_req->complete\n", __func__);
 
 		if (!_req->buf)
-			ERR("*** %s --- !_req->buf\n", __func__);
+			pr_err("udc: *** %s --- !_req->buf\n", __func__);
 
 		if (!list_empty(&req->queue))
-			ERR("*** %s --- !list_empty(&req->queue)\n", __func__);
+			pr_err("udc: *** %s --- !list_empty(&req->queue)\n", __func__);
 
 		return -EINVAL;
 	}
@@ -2849,13 +2849,13 @@ static int nbu2ss_ep_dequeue(
 
 	/* catch various bogus parameters */
 	if ((_ep == NULL) || (_req == NULL)) {
-		/* ERR("%s, bad param(1)\n", __func__); */
+		/* pr_err("udc: %s, bad param(1)\n", __func__); */
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!ep) {
-		ERR("%s, ep == NULL !!\n", __func__);
+		pr_err("udc: %s, ep == NULL !!\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2895,19 +2895,19 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (!_ep) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!ep) {
-		ERR("%s, bad ep\n", __func__);
+		pr_err("udc: %s, bad ep\n", __func__);
 		return -EINVAL;
 	}
 
 	udc = ep->udc;
 	if (!udc) {
-		ERR(" *** %s, bad udc\n", __func__);
+		pr_err("udc: *** %s, bad udc\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2949,19 +2949,19 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (!_ep) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!ep) {
-		ERR("%s, bad ep\n", __func__);
+		pr_err("udc: %s, bad ep\n", __func__);
 		return -EINVAL;
 	}
 
 	udc = ep->udc;
 	if (!udc) {
-		ERR("%s, bad udc\n", __func__);
+		pr_err("udc: %s, bad udc\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2997,19 +2997,19 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (!_ep) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!_ep) {
-		ERR("%s, bad ep\n", __func__);
+		pr_err("udc: %s, bad ep\n", __func__);
 		return;
 	}
 
 	udc = ep->udc;
 	if (!udc) {
-		ERR("%s, bad udc\n", __func__);
+		pr_err("udc: %s, bad udc\n", __func__);
 		return;
 	}
 
@@ -3053,7 +3053,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3083,7 +3083,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("%s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3123,7 +3123,7 @@ static int nbu2ss_gad_set_selfpowered(struct usb_gadget *pgadget,
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3152,7 +3152,7 @@ static int nbu2ss_gad_vbus_draw(struct usb_gadget *pgadget, unsigned mA)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3174,7 +3174,7 @@ static int nbu2ss_gad_pullup(struct usb_gadget *pgadget, int is_on)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v8 3/5] Staging: emxx_udc: Replace custom printk macro ERR with dev_err
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
                     ` (2 preceding siblings ...)
  2015-02-27 10:31   ` [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err Haneen Mohammed
@ 2015-02-27 10:32   ` Haneen Mohammed
  2015-02-27 10:34   ` [PATCH v8 4/5] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
  2015-02-27 10:35   ` [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:32 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes the other half of ERR macros that uses "printk(KERN_ERR"
and replace them with dev_err, to fix issue addressed by checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 094e018..77189cc 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -808,7 +808,7 @@ static int _nbu2ss_ep0_out_transfer(
 		return 0;		/* Short Packet Transfer End */
 
 	if (req->req.actual > req->req.length) {
-		ERR(" *** Overrun Error\n");
+		dev_err(udc->dev, " *** Overrun Error\n");
 		return -EOVERFLOW;
 	}
 
@@ -1026,8 +1026,8 @@ static int _nbu2ss_epn_out_transfer(
 	}
 
 	if (req->req.actual > req->req.length) {
-		ERR(" *** Overrun Error\n");
-		ERR(" *** actual = %d, length = %d\n",
+		dev_err(udc->dev, " *** Overrun Error\n");
+		dev_err(udc->dev, " *** actual = %d, length = %d\n",
 			req->req.actual, req->req.length);
 		result = -EOVERFLOW;
 	}
@@ -1638,7 +1638,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
 		_nbu2ss_ep0_in_transfer(udc, &udc->ep[0], &udc->ep0_req);
 
 	} else {
-		ERR("*** Error GET_STATUS\n");
+		dev_err(udc->dev, "*** Error GET_STATUS\n");
 	}
 
 	return result;
@@ -2350,7 +2350,7 @@ static int _nbu2ss_enable_controller(struct nbu2ss_udc *udc)
 		waitcnt++;
 		udelay(1);	/* 1us wait */
 		if (waitcnt == EPC_PLL_LOCK_COUNT) {
-			ERR("*** Reset Cancel failed\n");
+			dev_err(udc->dev, "*** Reset Cancel failed\n");
 			return -EINVAL;
 		}
 	};
@@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
 	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
 		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
 
-		pr_err("udc:  *** %s, bat bmAttributes\n", __func__);
+		dev_err(ep->udc->dev, "udc:  *** %s, bat bmAttributes\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
 	if ((udc->driver == NULL)
 		|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
 
-		ERR(" *** %s, udc !!\n", __func__);
+		dev_err(udc->dev, " *** %s, udc !!\n", __func__);
 		return -ESHUTDOWN;
 	}
 
@@ -2773,12 +2773,12 @@ static int nbu2ss_ep_queue(
 /*	INFO("=== %s(ep%d), zero=%d\n", __func__, ep->epnum, _req->zero); */
 
 	if (udc->vbus_active == 0) {
-		pr_info("Can't ep_queue (VBUS OFF)\n");
+		dev_info(udc->dev, "Can't ep_queue (VBUS OFF)\n");
 		return -ESHUTDOWN;
 	}
 
 	if (unlikely(!udc->driver)) {
-		ERR("%s, bogus device state %p\n", __func__, udc->driver);
+		dev_err(udc->dev, "%s, bogus device state %p\n", __func__, udc->driver);
 		return -ESHUTDOWN;
 	}
 
@@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
 
 		result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
 		if (result < 0) {
-			ERR(" *** %s, result = %d\n", __func__, result);
+			dev_err(udc->dev, " *** %s, result = %d\n", __func__, result);
 			list_del(&req->queue);
 		} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
 #ifdef USE_DMA
@@ -2907,7 +2907,7 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
 
 	udc = ep->udc;
 	if (!udc) {
-		pr_err("udc: *** %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "udc: *** %s, bad udc\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2961,7 +2961,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 
 	udc = ep->udc;
 	if (!udc) {
-		pr_err("udc: %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3009,7 +3009,7 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
 
 	udc = ep->udc;
 	if (!udc) {
-		pr_err("udc: %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
 		return;
 	}
 
@@ -3059,7 +3059,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		ERR("%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3089,7 +3089,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		ERR("%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3345,7 +3345,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 
 	/* USB Function Controller Interrupt */
 	if (status != 0) {
-		ERR("request_irq(USB_UDC_IRQ_1) failed\n");
+		dev_err(udc->dev, "request_irq(USB_UDC_IRQ_1) failed\n");
 		goto cleanup1;
 	}
 
@@ -3365,7 +3365,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 				udc);
 
 	if (status != 0) {
-		ERR("request_irq(INT_VBUS) failed\n");
+		dev_err(udc->dev, "request_irq(INT_VBUS) failed\n");
 		goto cleanup1;
 	}
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v8 4/5] Staging: emxx_udc: Remove custom printk macro ERR
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
                     ` (3 preceding siblings ...)
  2015-02-27 10:32   ` [PATCH v8 3/5] Staging: emxx_udc: Replace custom printk macro ERR with dev_err Haneen Mohammed
@ 2015-02-27 10:34   ` Haneen Mohammed
  2015-02-27 10:35   ` [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:34 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes custom printk macro ERR.
All the calls to this macro were replaced by de_err and pr_err.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
index c21f211..f4a94c3 100644
--- a/drivers/staging/emxx_udc/emxx_udc.h
+++ b/drivers/staging/emxx_udc/emxx_udc.h
@@ -643,6 +643,5 @@ union usb_reg_access {
 };
 
 /*-------------------------------------------------------------------------*/
-#define ERR(stuff...)		printk(KERN_ERR "udc: " stuff)
 
 #endif  /* _LINUX_EMXX_H */
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
                     ` (4 preceding siblings ...)
  2015-02-27 10:34   ` [PATCH v8 4/5] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
@ 2015-02-27 10:35   ` Haneen Mohammed
  2015-02-27 10:57     ` [Outreachy kernel] " Julia Lawall
  5 siblings, 1 reply; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 10:35 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes  __func__ from dev_err.
dev_err includes the function name in the log printout, so there is no
need to include it manually.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 77189cc..0bfd268 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
 	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
 		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
 
-		dev_err(ep->udc->dev, "udc:  *** %s, bat bmAttributes\n", __func__);
+		dev_err(ep->udc->dev, "bat bmAttributes\n");
 		return -EINVAL;
 	}
 
@@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
 	if ((udc->driver == NULL)
 		|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
 
-		dev_err(udc->dev, " *** %s, udc !!\n", __func__);
+		dev_err(udc->dev, "udc !!\n");
 		return -ESHUTDOWN;
 	}
 
@@ -2778,7 +2778,7 @@ static int nbu2ss_ep_queue(
 	}
 
 	if (unlikely(!udc->driver)) {
-		dev_err(udc->dev, "%s, bogus device state %p\n", __func__, udc->driver);
+		dev_err(udc->dev, "bogus device state %p\n", udc->driver);
 		return -ESHUTDOWN;
 	}
 
@@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
 
 		result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
 		if (result < 0) {
-			dev_err(udc->dev, " *** %s, result = %d\n", __func__, result);
+			dev_err(udc->dev, "result = %d\n", result);
 			list_del(&req->queue);
 		} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
 #ifdef USE_DMA
@@ -2907,7 +2907,7 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
 
 	udc = ep->udc;
 	if (!udc) {
-		dev_err(ep->udc->dev, "udc: *** %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "bad udc\n");
 		return -EINVAL;
 	}
 
@@ -2961,7 +2961,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 
 	udc = ep->udc;
 	if (!udc) {
-		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "bad udc\n");
 		return -EINVAL;
 	}
 
@@ -3009,7 +3009,7 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
 
 	udc = ep->udc;
 	if (!udc) {
-		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "bad udc\n");
 		return;
 	}
 
@@ -3059,7 +3059,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "udc == NULL\n");
 		return -EINVAL;
 	}
 
@@ -3089,7 +3089,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "udc == NULL\n");
 		return -EINVAL;
 	}
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Outreachy kernel] [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging
  2015-02-27 10:35   ` [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
@ 2015-02-27 10:57     ` Julia Lawall
  2015-02-27 11:22       ` Haneen Mohammed
  0 siblings, 1 reply; 18+ messages in thread
From: Julia Lawall @ 2015-02-27 10:57 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: outreachy-kernel

Maybe you can try using Coccinelle to find this problem more generally.

julia

On Fri, 27 Feb 2015, Haneen Mohammed wrote:

> This patch removes  __func__ from dev_err.
> dev_err includes the function name in the log printout, so there is no
> need to include it manually.
>
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> ---
>  drivers/staging/emxx_udc/emxx_udc.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index 77189cc..0bfd268 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
>  	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
>  		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
>
> -		dev_err(ep->udc->dev, "udc:  *** %s, bat bmAttributes\n", __func__);
> +		dev_err(ep->udc->dev, "bat bmAttributes\n");
>  		return -EINVAL;
>  	}
>
> @@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
>  	if ((udc->driver == NULL)
>  		|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
>
> -		dev_err(udc->dev, " *** %s, udc !!\n", __func__);
> +		dev_err(udc->dev, "udc !!\n");
>  		return -ESHUTDOWN;
>  	}
>
> @@ -2778,7 +2778,7 @@ static int nbu2ss_ep_queue(
>  	}
>
>  	if (unlikely(!udc->driver)) {
> -		dev_err(udc->dev, "%s, bogus device state %p\n", __func__, udc->driver);
> +		dev_err(udc->dev, "bogus device state %p\n", udc->driver);
>  		return -ESHUTDOWN;
>  	}
>
> @@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
>
>  		result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
>  		if (result < 0) {
> -			dev_err(udc->dev, " *** %s, result = %d\n", __func__, result);
> +			dev_err(udc->dev, "result = %d\n", result);
>  			list_del(&req->queue);
>  		} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
>  #ifdef USE_DMA
> @@ -2907,7 +2907,7 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
>
>  	udc = ep->udc;
>  	if (!udc) {
> -		dev_err(ep->udc->dev, "udc: *** %s, bad udc\n", __func__);
> +		dev_err(ep->udc->dev, "bad udc\n");
>  		return -EINVAL;
>  	}
>
> @@ -2961,7 +2961,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
>
>  	udc = ep->udc;
>  	if (!udc) {
> -		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
> +		dev_err(ep->udc->dev, "bad udc\n");
>  		return -EINVAL;
>  	}
>
> @@ -3009,7 +3009,7 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
>
>  	udc = ep->udc;
>  	if (!udc) {
> -		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
> +		dev_err(ep->udc->dev, "bad udc\n");
>  		return;
>  	}
>
> @@ -3059,7 +3059,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
>
>  	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
>  	if (udc == NULL) {
> -		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
> +		dev_err(&pgadget->dev, "udc == NULL\n");
>  		return -EINVAL;
>  	}
>
> @@ -3089,7 +3089,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
>
>  	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
>  	if (udc == NULL) {
> -		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
> +		dev_err(&pgadget->dev, "udc == NULL\n");
>  		return -EINVAL;
>  	}
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425033356-20933-1-git-send-email-hamohammed.sa%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Outreachy kernel] [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err
  2015-02-27 10:31   ` [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err Haneen Mohammed
@ 2015-02-27 10:59     ` Julia Lawall
  2015-02-27 11:42       ` Haneen Mohammed
  0 siblings, 1 reply; 18+ messages in thread
From: Julia Lawall @ 2015-02-27 10:59 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: outreachy-kernel

On Fri, 27 Feb 2015, Haneen Mohammed wrote:

> This patch removes half custom printk macros ERR and replace it with

Removing the macro would seem like remomving the definition.  Here you are
removing the uses.  That could be more clear.

> pr_err, for no appropriate struct device *dev field where found for dev_err.
> Issue addressed by checkpathc.pl.
>
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> ---
> v6: Justify the use of pr_err instead of dev_err.
>
>  drivers/staging/emxx_udc/emxx_udc.c | 56 ++++++++++++++++++-------------------
>  1 file changed, 28 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index f2ddad3..094e018 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -115,7 +115,7 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
>  	pr_info("=== %s()\n", __func__);
>
>  	if (udc == NULL) {
> -		ERR("%s udc == NULL\n", __func__);
> +		pr_err("udc: %s udc == NULL\n", __func__);
>  		return;
>  	}
>
> @@ -2258,7 +2258,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)

Are you sure that there is no appropriate field in the nbu2ss_udc
structure?

julia

>  	u32	reg_dt;
>
>  	if (!udc) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2612,13 +2612,13 @@ static int nbu2ss_ep_enable(
>  	struct nbu2ss_udc	*udc;
>
>  	if ((_ep == NULL) || (desc == NULL)) {
> -		ERR(" *** %s, bad param\n", __func__);
> +		pr_err("udc: *** %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
>  	ep = container_of(_ep, struct nbu2ss_ep, ep);
>  	if ((ep == NULL) || (ep->udc == NULL)) {
> -		ERR(" *** %s, ep == NULL !!\n", __func__);
> +		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
>  	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
>  		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
>
> -		ERR(" *** %s, bat bmAttributes\n", __func__);
> +		pr_err("udc:  *** %s, bat bmAttributes\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2672,13 +2672,13 @@ static int nbu2ss_ep_disable(struct usb_ep *_ep)
>  	unsigned long		flags;
>
>  	if (_ep == NULL) {
> -		ERR(" *** %s, bad param\n", __func__);
> +		pr_err("udc:  *** %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
>  	ep = container_of(_ep, struct nbu2ss_ep, ep);
>  	if ((ep == NULL) || (ep->udc == NULL)) {
> -		ERR(" *** %s, ep == NULL !!\n", __func__);
> +		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2742,10 +2742,10 @@ static int nbu2ss_ep_queue(
>  	/* catch various bogus parameters */
>  	if ((_ep == NULL) || (_req == NULL)) {
>  		if (_ep == NULL)
> -			ERR("*** %s --- _ep == NULL\n", __func__);
> +			pr_err("udc: *** %s --- _ep == NULL\n", __func__);
>
>  		if (_req == NULL)
> -			ERR("*** %s --- _req == NULL\n", __func__);
> +			pr_err("udc: *** %s --- _req == NULL\n", __func__);
>
>  		return -EINVAL;
>  	}
> @@ -2756,13 +2756,13 @@ static int nbu2ss_ep_queue(
>  	     || !list_empty(&req->queue))) {
>
>  		if (!_req->complete)
> -			ERR("*** %s --- !_req->complete\n", __func__);
> +			pr_err("udc: *** %s --- !_req->complete\n", __func__);
>
>  		if (!_req->buf)
> -			ERR("*** %s --- !_req->buf\n", __func__);
> +			pr_err("udc: *** %s --- !_req->buf\n", __func__);
>
>  		if (!list_empty(&req->queue))
> -			ERR("*** %s --- !list_empty(&req->queue)\n", __func__);
> +			pr_err("udc: *** %s --- !list_empty(&req->queue)\n", __func__);
>
>  		return -EINVAL;
>  	}
> @@ -2849,13 +2849,13 @@ static int nbu2ss_ep_dequeue(
>
>  	/* catch various bogus parameters */
>  	if ((_ep == NULL) || (_req == NULL)) {
> -		/* ERR("%s, bad param(1)\n", __func__); */
> +		/* pr_err("udc: %s, bad param(1)\n", __func__); */
>  		return -EINVAL;
>  	}
>
>  	ep = container_of(_ep, struct nbu2ss_ep, ep);
>  	if (!ep) {
> -		ERR("%s, ep == NULL !!\n", __func__);
> +		pr_err("udc: %s, ep == NULL !!\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2895,19 +2895,19 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (!_ep) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
>  	ep = container_of(_ep, struct nbu2ss_ep, ep);
>  	if (!ep) {
> -		ERR("%s, bad ep\n", __func__);
> +		pr_err("udc: %s, bad ep\n", __func__);
>  		return -EINVAL;
>  	}
>
>  	udc = ep->udc;
>  	if (!udc) {
> -		ERR(" *** %s, bad udc\n", __func__);
> +		pr_err("udc: *** %s, bad udc\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2949,19 +2949,19 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (!_ep) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
>  	ep = container_of(_ep, struct nbu2ss_ep, ep);
>  	if (!ep) {
> -		ERR("%s, bad ep\n", __func__);
> +		pr_err("udc: %s, bad ep\n", __func__);
>  		return -EINVAL;
>  	}
>
>  	udc = ep->udc;
>  	if (!udc) {
> -		ERR("%s, bad udc\n", __func__);
> +		pr_err("udc: %s, bad udc\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -2997,19 +2997,19 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (!_ep) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return;
>  	}
>
>  	ep = container_of(_ep, struct nbu2ss_ep, ep);
>  	if (!_ep) {
> -		ERR("%s, bad ep\n", __func__);
> +		pr_err("udc: %s, bad ep\n", __func__);
>  		return;
>  	}
>
>  	udc = ep->udc;
>  	if (!udc) {
> -		ERR("%s, bad udc\n", __func__);
> +		pr_err("udc: %s, bad udc\n", __func__);
>  		return;
>  	}
>
> @@ -3053,7 +3053,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (pgadget == NULL) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -3083,7 +3083,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (pgadget == NULL) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("%s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -3123,7 +3123,7 @@ static int nbu2ss_gad_set_selfpowered(struct usb_gadget *pgadget,
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (pgadget == NULL) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -3152,7 +3152,7 @@ static int nbu2ss_gad_vbus_draw(struct usb_gadget *pgadget, unsigned mA)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (pgadget == NULL) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
> @@ -3174,7 +3174,7 @@ static int nbu2ss_gad_pullup(struct usb_gadget *pgadget, int is_on)
>  /*	INFO("=== %s()\n", __func__); */
>
>  	if (pgadget == NULL) {
> -		ERR("%s, bad param\n", __func__);
> +		pr_err("udc: %s, bad param\n", __func__);
>  		return -EINVAL;
>  	}
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425033066-20762-1-git-send-email-hamohammed.sa%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Outreachy kernel] [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging
  2015-02-27 10:57     ` [Outreachy kernel] " Julia Lawall
@ 2015-02-27 11:22       ` Haneen Mohammed
  0 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 11:22 UTC (permalink / raw)
  To: Julia Lawall, outreachy-kernel

Ok, I'll try that out.

On Fri, Feb 27, 2015 at 11:57:15AM +0100, Julia Lawall wrote:
> Maybe you can try using Coccinelle to find this problem more generally.
> 
> julia
> 
> On Fri, 27 Feb 2015, Haneen Mohammed wrote:
> 
> > This patch removes  __func__ from dev_err.
> > dev_err includes the function name in the log printout, so there is no
> > need to include it manually.
> >
> > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> > ---
> >  drivers/staging/emxx_udc/emxx_udc.c | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> > index 77189cc..0bfd268 100644
> > --- a/drivers/staging/emxx_udc/emxx_udc.c
> > +++ b/drivers/staging/emxx_udc/emxx_udc.c
> > @@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
> >  	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
> >  		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
> >
> > -		dev_err(ep->udc->dev, "udc:  *** %s, bat bmAttributes\n", __func__);
> > +		dev_err(ep->udc->dev, "bat bmAttributes\n");
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
> >  	if ((udc->driver == NULL)
> >  		|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
> >
> > -		dev_err(udc->dev, " *** %s, udc !!\n", __func__);
> > +		dev_err(udc->dev, "udc !!\n");
> >  		return -ESHUTDOWN;
> >  	}
> >
> > @@ -2778,7 +2778,7 @@ static int nbu2ss_ep_queue(
> >  	}
> >
> >  	if (unlikely(!udc->driver)) {
> > -		dev_err(udc->dev, "%s, bogus device state %p\n", __func__, udc->driver);
> > +		dev_err(udc->dev, "bogus device state %p\n", udc->driver);
> >  		return -ESHUTDOWN;
> >  	}
> >
> > @@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
> >
> >  		result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
> >  		if (result < 0) {
> > -			dev_err(udc->dev, " *** %s, result = %d\n", __func__, result);
> > +			dev_err(udc->dev, "result = %d\n", result);
> >  			list_del(&req->queue);
> >  		} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
> >  #ifdef USE_DMA
> > @@ -2907,7 +2907,7 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
> >
> >  	udc = ep->udc;
> >  	if (!udc) {
> > -		dev_err(ep->udc->dev, "udc: *** %s, bad udc\n", __func__);
> > +		dev_err(ep->udc->dev, "bad udc\n");
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2961,7 +2961,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
> >
> >  	udc = ep->udc;
> >  	if (!udc) {
> > -		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
> > +		dev_err(ep->udc->dev, "bad udc\n");
> >  		return -EINVAL;
> >  	}
> >
> > @@ -3009,7 +3009,7 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
> >
> >  	udc = ep->udc;
> >  	if (!udc) {
> > -		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
> > +		dev_err(ep->udc->dev, "bad udc\n");
> >  		return;
> >  	}
> >
> > @@ -3059,7 +3059,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
> >
> >  	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
> >  	if (udc == NULL) {
> > -		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
> > +		dev_err(&pgadget->dev, "udc == NULL\n");
> >  		return -EINVAL;
> >  	}
> >
> > @@ -3089,7 +3089,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
> >
> >  	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
> >  	if (udc == NULL) {
> > -		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
> > +		dev_err(&pgadget->dev, "udc == NULL\n");
> >  		return -EINVAL;
> >  	}
> >
> > --
> > 1.9.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425033356-20933-1-git-send-email-hamohammed.sa%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Outreachy kernel] [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err
  2015-02-27 10:59     ` [Outreachy kernel] " Julia Lawall
@ 2015-02-27 11:42       ` Haneen Mohammed
  0 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-02-27 11:42 UTC (permalink / raw)
  To: Julia Lawall, outreachy-kernel

On Fri, Feb 27, 2015 at 11:59:57AM +0100, Julia Lawall wrote:
> On Fri, 27 Feb 2015, Haneen Mohammed wrote:
> 
> > This patch removes half custom printk macros ERR and replace it with
> 
> Removing the macro would seem like remomving the definition.  Here you are
> removing the uses.  That could be more clear.
> 
> > pr_err, for no appropriate struct device *dev field where found for dev_err.
> > Issue addressed by checkpathc.pl.
> >
> > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> > ---
> > v6: Justify the use of pr_err instead of dev_err.
> >
> >  drivers/staging/emxx_udc/emxx_udc.c | 56 ++++++++++++++++++-------------------
> >  1 file changed, 28 insertions(+), 28 deletions(-)
> >
> > diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> > index f2ddad3..094e018 100644
> > --- a/drivers/staging/emxx_udc/emxx_udc.c
> > +++ b/drivers/staging/emxx_udc/emxx_udc.c
> > @@ -115,7 +115,7 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
> >  	pr_info("=== %s()\n", __func__);
> >
> >  	if (udc == NULL) {
> > -		ERR("%s udc == NULL\n", __func__);
> > +		pr_err("udc: %s udc == NULL\n", __func__);
> >  		return;
> >  	}
> >
> > @@ -2258,7 +2258,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
> 
> Are you sure that there is no appropriate field in the nbu2ss_udc
> structure?
> 
> julia
> 
nbu2ss_udc structure in the following function has a dev field.
 "static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)"
But I thought I can't use dev_err in the following because if udc is
null then udc->dev would be null, so I used pr_err instead.
        if (udc == NULL) {
		pr_err("udc: %s udc == NULL\n", __func__);

Or that is fine and using dev_err(udc->dev, even if udc is null  wouldn't affect the program?

Thanks,
Haneen
> >  	u32	reg_dt;
> >
> >  	if (!udc) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2612,13 +2612,13 @@ static int nbu2ss_ep_enable(
> >  	struct nbu2ss_udc	*udc;
> >
> >  	if ((_ep == NULL) || (desc == NULL)) {
> > -		ERR(" *** %s, bad param\n", __func__);
> > +		pr_err("udc: *** %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> >  	ep = container_of(_ep, struct nbu2ss_ep, ep);
> >  	if ((ep == NULL) || (ep->udc == NULL)) {
> > -		ERR(" *** %s, ep == NULL !!\n", __func__);
> > +		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
> >  	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
> >  		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
> >
> > -		ERR(" *** %s, bat bmAttributes\n", __func__);
> > +		pr_err("udc:  *** %s, bat bmAttributes\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2672,13 +2672,13 @@ static int nbu2ss_ep_disable(struct usb_ep *_ep)
> >  	unsigned long		flags;
> >
> >  	if (_ep == NULL) {
> > -		ERR(" *** %s, bad param\n", __func__);
> > +		pr_err("udc:  *** %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> >  	ep = container_of(_ep, struct nbu2ss_ep, ep);
> >  	if ((ep == NULL) || (ep->udc == NULL)) {
> > -		ERR(" *** %s, ep == NULL !!\n", __func__);
> > +		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2742,10 +2742,10 @@ static int nbu2ss_ep_queue(
> >  	/* catch various bogus parameters */
> >  	if ((_ep == NULL) || (_req == NULL)) {
> >  		if (_ep == NULL)
> > -			ERR("*** %s --- _ep == NULL\n", __func__);
> > +			pr_err("udc: *** %s --- _ep == NULL\n", __func__);
> >
> >  		if (_req == NULL)
> > -			ERR("*** %s --- _req == NULL\n", __func__);
> > +			pr_err("udc: *** %s --- _req == NULL\n", __func__);
> >
> >  		return -EINVAL;
> >  	}
> > @@ -2756,13 +2756,13 @@ static int nbu2ss_ep_queue(
> >  	     || !list_empty(&req->queue))) {
> >
> >  		if (!_req->complete)
> > -			ERR("*** %s --- !_req->complete\n", __func__);
> > +			pr_err("udc: *** %s --- !_req->complete\n", __func__);
> >
> >  		if (!_req->buf)
> > -			ERR("*** %s --- !_req->buf\n", __func__);
> > +			pr_err("udc: *** %s --- !_req->buf\n", __func__);
> >
> >  		if (!list_empty(&req->queue))
> > -			ERR("*** %s --- !list_empty(&req->queue)\n", __func__);
> > +			pr_err("udc: *** %s --- !list_empty(&req->queue)\n", __func__);
> >
> >  		return -EINVAL;
> >  	}
> > @@ -2849,13 +2849,13 @@ static int nbu2ss_ep_dequeue(
> >
> >  	/* catch various bogus parameters */
> >  	if ((_ep == NULL) || (_req == NULL)) {
> > -		/* ERR("%s, bad param(1)\n", __func__); */
> > +		/* pr_err("udc: %s, bad param(1)\n", __func__); */
> >  		return -EINVAL;
> >  	}
> >
> >  	ep = container_of(_ep, struct nbu2ss_ep, ep);
> >  	if (!ep) {
> > -		ERR("%s, ep == NULL !!\n", __func__);
> > +		pr_err("udc: %s, ep == NULL !!\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2895,19 +2895,19 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (!_ep) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> >  	ep = container_of(_ep, struct nbu2ss_ep, ep);
> >  	if (!ep) {
> > -		ERR("%s, bad ep\n", __func__);
> > +		pr_err("udc: %s, bad ep\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> >  	udc = ep->udc;
> >  	if (!udc) {
> > -		ERR(" *** %s, bad udc\n", __func__);
> > +		pr_err("udc: *** %s, bad udc\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2949,19 +2949,19 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (!_ep) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> >  	ep = container_of(_ep, struct nbu2ss_ep, ep);
> >  	if (!ep) {
> > -		ERR("%s, bad ep\n", __func__);
> > +		pr_err("udc: %s, bad ep\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> >  	udc = ep->udc;
> >  	if (!udc) {
> > -		ERR("%s, bad udc\n", __func__);
> > +		pr_err("udc: %s, bad udc\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -2997,19 +2997,19 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (!_ep) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return;
> >  	}
> >
> >  	ep = container_of(_ep, struct nbu2ss_ep, ep);
> >  	if (!_ep) {
> > -		ERR("%s, bad ep\n", __func__);
> > +		pr_err("udc: %s, bad ep\n", __func__);
> >  		return;
> >  	}
> >
> >  	udc = ep->udc;
> >  	if (!udc) {
> > -		ERR("%s, bad udc\n", __func__);
> > +		pr_err("udc: %s, bad udc\n", __func__);
> >  		return;
> >  	}
> >
> > @@ -3053,7 +3053,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (pgadget == NULL) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -3083,7 +3083,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (pgadget == NULL) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("%s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -3123,7 +3123,7 @@ static int nbu2ss_gad_set_selfpowered(struct usb_gadget *pgadget,
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (pgadget == NULL) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -3152,7 +3152,7 @@ static int nbu2ss_gad_vbus_draw(struct usb_gadget *pgadget, unsigned mA)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (pgadget == NULL) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > @@ -3174,7 +3174,7 @@ static int nbu2ss_gad_pullup(struct usb_gadget *pgadget, int is_on)
> >  /*	INFO("=== %s()\n", __func__); */
> >
> >  	if (pgadget == NULL) {
> > -		ERR("%s, bad param\n", __func__);
> > +		pr_err("udc: %s, bad param\n", __func__);
> >  		return -EINVAL;
> >  	}
> >
> > --
> > 1.9.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425033066-20762-1-git-send-email-hamohammed.sa%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v9 0/4] emxx_udc: Fix checkpatch.pl warnings
  2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
@ 2015-03-01 20:53 ` Haneen Mohammed
  2015-03-01 20:55 ` [PATCH v9 1/4] Staging: emxx_udc: Fix do not add new typedefs and remove volatile Haneen Mohammed
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-03-01 20:53 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patchset fixes the following coding style issues found by checkpatch.pl:
Do not add new typedefs.
Use of volatile is usually wrong.
printk(KERNEL_ERR not prefered.

Changes in v9:
- Edit patches commit msg
- Merged two patches into one "the removal of the use of macro"
- Justify the use of pr_err
Changes in v8:
- Edit first patch subject line.
Changes in v7:
- Add missing first patch in v6: removal of typedefs and volatile.
Changes in v6:
- Merged two patches into one: remove typedef and volatile.
- Justified the use of pr_err instead of dev_err.
Changes in v5:
- Fix spelling mistakes
- Justify the removal of volatile
- Replaced pr_err with dev_err when possible
Changes in v4:
- Patchset broken into smaller pathces
Changes in v3:
- Create patchset from two patches
Changes in v2:
- First patch reversion 

Haneen Mohammed (4):
  Staging: emxx_udc: Fix do not add new typedefs and remove volatile
  Staging: emxx_udc: Replace custom printk macro ERR with dev_err or
    pr_err
  Staging: emxx_udc: Remove custom printk macro ERR
  Staging: emxx_udc: Clean dev_err() logging

 drivers/staging/emxx_udc/emxx_udc.c | 142 ++++++++++++++++++------------------
 drivers/staging/emxx_udc/emxx_udc.h |  27 ++++---
 2 files changed, 84 insertions(+), 85 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v9 1/4] Staging: emxx_udc: Fix do not add new typedefs and remove volatile
  2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
  2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
  2015-03-01 20:53 ` [PATCH v9 0/4] emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
@ 2015-03-01 20:55 ` Haneen Mohammed
  2015-03-02  1:12   ` [Outreachy kernel] " Greg KH
  2015-03-01 21:00 ` [PATCH v9 2/4] Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_err Haneen Mohammed
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Haneen Mohammed @ 2015-03-01 20:55 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch fixes the following checkpatch.pl warnings:"do not add new
typedefs" and "Use of volatile is usually wrong".
Remove typedefs keyword and rename identifiers appropriately.
Remove volatile from union usb_regs_access
Update related  files.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v9: nothing
v8: Edit subject line.
v7: nothing.
v6: merge two patches into one. removal of typedefs and of volatile.
v5: nothing
v4: Replace struct with volatile union for usb_reg_access.
v3: Removed all typedefs and created patchset from emxx_udc.
v2: Removed typedefs appropriately and changed related file.

 drivers/staging/emxx_udc/emxx_udc.c | 60 ++++++++++++++++++-------------------
 drivers/staging/emxx_udc/emxx_udc.h | 26 ++++++++--------
 2 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 4be646c..f2ddad3 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -201,7 +201,7 @@ static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc)
 	u32		num, buf_type;
 	u32		data, last_ram_adr, use_ram_size;
 
-	PT_EP_REGS	p_ep_regs;
+	struct ep_regs *p_ep_regs;
 
 	last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2;
 	use_ram_size = 0;
@@ -394,7 +394,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 {
 	u32		num;
 	u32		data;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (udc->vbus_active == 0)
 		return;		/* VBUS OFF */
@@ -425,7 +425,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 /* Abort DMA */
 static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 {
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	_nbu2ss_bitclr(&preg->EP_DCR[ep->epnum-1].EP_DCR1, DCR1_EPn_REQEN);
 	mdelay(DMA_DISABLE_TIME);	/* DCR1_EPn_REQEN Clear */
@@ -443,7 +443,7 @@ static void _nbu2ss_ep_in_end(
 {
 	u32		data;
 	u32		num;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (length >= sizeof(u32))
 		return;
@@ -567,7 +567,7 @@ static int EP0_out_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 	u32		i;
 	int		nret   = 0;
 	u32		iWordLength = 0;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access *pBuf32 = (union usb_reg_access *)pBuf;
 
 	/*------------------------------------------------------------*/
 	/* Read Length */
@@ -592,8 +592,8 @@ static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 {
 	u32		i;
 	u32		iReadSize = 0;
-	USB_REG_ACCESS  Temp32;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access  Temp32;
+	union usb_reg_access  *pBuf32 = (union usb_reg_access *)pBuf;
 
 	if ((0 < length) && (length < sizeof(u32))) {
 		Temp32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
@@ -613,7 +613,7 @@ static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 	u32		iMaxLength   = EP0_PACKETSIZE;
 	u32		iWordLength  = 0;
 	u32		iWriteLength = 0;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access  *pBuf32 = (union usb_reg_access *)pBuf;
 
 	/*------------------------------------------------------------*/
 	/* Transfer Length */
@@ -638,8 +638,8 @@ static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 static int EP0_in_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 iRemainSize)
 {
 	u32		i;
-	USB_REG_ACCESS Temp32;
-	USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
+	union usb_reg_access  Temp32;
+	union usb_reg_access  *pBuf32 = (union usb_reg_access *)pBuf;
 
 	if ((0 < iRemainSize) && (iRemainSize < sizeof(u32))) {
 		for (i = 0 ; i < iRemainSize ; i++)
@@ -840,7 +840,7 @@ static int _nbu2ss_out_dma(
 	u32		burst = 1;
 	u32		data;
 	int		result = -EINVAL;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
@@ -900,10 +900,10 @@ static int _nbu2ss_epn_out_pio(
 	u32		i;
 	u32		data;
 	u32		iWordLength;
-	USB_REG_ACCESS	Temp32;
-	USB_REG_ACCESS	*pBuf32;
+	union usb_reg_access	Temp32;
+	union usb_reg_access	*pBuf32;
 	int		result = 0;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
@@ -912,7 +912,7 @@ static int _nbu2ss_epn_out_pio(
 		return 0;
 
 	pBuffer = (u8 *)req->req.buf;
-	pBuf32 = (USB_REG_ACCESS *)(pBuffer + req->req.actual);
+	pBuf32 = (union usb_reg_access *)(pBuffer + req->req.actual);
 
 	iWordLength = length / sizeof(u32);
 	if (iWordLength > 0) {
@@ -988,7 +988,7 @@ static int _nbu2ss_epn_out_transfer(
 	u32		num;
 	u32		iRecvLength;
 	int		result = 1;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (ep->epnum == 0)
 		return -EINVAL;
@@ -1051,7 +1051,7 @@ static int _nbu2ss_in_dma(
 	u32		iWriteLength;
 	u32		data;
 	int		result = -EINVAL;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
@@ -1123,17 +1123,17 @@ static int _nbu2ss_epn_in_pio(
 	u32		i;
 	u32		data;
 	u32		iWordLength;
-	USB_REG_ACCESS	Temp32;
-	USB_REG_ACCESS	*pBuf32 = NULL;
+	union usb_reg_access	Temp32;
+	union usb_reg_access	*pBuf32 = NULL;
 	int		result = 0;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return 1;		/* DMA is forwarded */
 
 	if (length > 0) {
 		pBuffer = (u8 *)req->req.buf;
-		pBuf32 = (USB_REG_ACCESS *)(pBuffer + req->req.actual);
+		pBuf32 = (union usb_reg_access *)(pBuffer + req->req.actual);
 
 		iWordLength = length / sizeof(u32);
 		if (iWordLength > 0) {
@@ -1347,7 +1347,7 @@ static void _nbu2ss_set_endpoint_stall(
 	u8		num, epnum;
 	u32		data;
 	struct nbu2ss_ep *ep;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
 		if (bstall) {
@@ -1471,7 +1471,7 @@ static int _nbu2ss_get_ep_stall(struct nbu2ss_udc *udc, u8 ep_adrs)
 {
 	u8		epnum;
 	u32		data = 0, bit_data;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	epnum = ep_adrs & ~USB_ENDPOINT_DIR_MASK;
 	if (epnum == 0) {
@@ -1566,7 +1566,7 @@ static void _nbu2ss_epn_set_stall(
 	u32	regdata;
 	int	limit_cnt = 0;
 
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (ep->direct == USB_DIR_IN) {
 		for (limit_cnt = 0
@@ -1994,7 +1994,7 @@ static inline void _nbu2ss_epn_in_int(
 	int	result = 0;
 	u32	status;
 
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (req->dma_flag)
 		return;		/* DMA is forwarded */
@@ -2090,7 +2090,7 @@ static inline void _nbu2ss_epn_out_dma_int(
 	u32		num;
 	u32		dmacnt, ep_dmacnt;
 	u32		mpkt;
-	PT_FC_REGS	preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	num = ep->epnum - 1;
 
@@ -2293,7 +2293,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 /*-------------------------------------------------------------------------*/
 static void _nbu2ss_fifo_flush(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
 {
-	PT_FC_REGS	p = udc->p_regs;
+	struct fc_regs	*p = udc->p_regs;
 
 	if (udc->vbus_active == 0)
 		return;
@@ -2536,7 +2536,7 @@ static irqreturn_t _nbu2ss_udc_irq(int irq, void *_udc)
 	u32	epnum, int_bit;
 
 	struct nbu2ss_udc	*udc = (struct nbu2ss_udc *)_udc;
-	PT_FC_REGS		preg = udc->p_regs;
+	struct fc_regs	*preg = udc->p_regs;
 
 	if (gpio_get_value(VBUS_VALUE) == 0) {
 		_nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW);
@@ -2944,7 +2944,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 	struct nbu2ss_ep	*ep;
 	struct nbu2ss_udc	*udc;
 	unsigned long		flags;
-	PT_FC_REGS		preg;
+	struct fc_regs		*preg;
 
 /*	INFO("=== %s()\n", __func__); */
 
@@ -3341,7 +3341,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 				  0, driver_name, udc);
 
 	/* IO Memory */
-	udc->p_regs = (PT_FC_REGS)mmio_base;
+	udc->p_regs = (struct fc_regs *)mmio_base;
 
 	/* USB Function Controller Interrupt */
 	if (status != 0) {
diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
index 202e2dc..c21f211 100644
--- a/drivers/staging/emxx_udc/emxx_udc.h
+++ b/drivers/staging/emxx_udc/emxx_udc.h
@@ -474,8 +474,8 @@
 
 /*===========================================================================*/
 /* Struct */
-/*------- T_EP_REGS */
-typedef struct _T_EP_REGS {
+/*------- ep_regs */
+struct ep_regs {
 	u32 EP_CONTROL;			/* EP Control */
 	u32 EP_STATUS;			/* EP Status */
 	u32 EP_INT_ENA;			/* EP Interrupt Enable */
@@ -484,18 +484,18 @@ typedef struct _T_EP_REGS {
 	u32 EP_LEN_DCNT;		/* EP Length & DMA count */
 	u32 EP_READ;			/* EP Read */
 	u32 EP_WRITE;			/* EP Write */
-} T_EP_REGS, *PT_EP_REGS;
+};
 
-/*------- T_EP_DCR */
-typedef struct _T_EP_DCR {
+/*------- ep_dcr */
+struct ep_dcr {
 	u32 EP_DCR1;			/* EP_DCR1 */
 	u32 EP_DCR2;			/* EP_DCR2 */
 	u32 EP_TADR;			/* EP_TADR */
 	u32 Reserved;			/* Reserved */
-} T_EP_DCR, *PT_EP_DCR;
+};
 
 /*------- Function Registers */
-typedef struct _T_FC_REGS {
+struct fc_regs {
 	u32 USB_CONTROL;		/* (0x0000) USB Control */
 	u32 USB_STATUS;			/* (0x0004) USB Status */
 	u32 USB_ADDRESS;		/* (0x0008) USB Address */
@@ -513,7 +513,7 @@ typedef struct _T_FC_REGS {
 	u32 EP0_READ;			/* (0x0038) EP0 Read */
 	u32 EP0_WRITE;			/* (0x003C) EP0 Write */
 
-	T_EP_REGS EP_REGS[REG_EP_NUM];	/* Endpoint Register */
+	struct ep_regs EP_REGS[REG_EP_NUM];	/* Endpoint Register */
 
 	u8 Reserved220[0x1000-0x220];	/* (0x0220:0x0FFF) Reserved */
 
@@ -531,11 +531,11 @@ typedef struct _T_FC_REGS {
 
 	u8 Reserved1028[0x110-0x28];	/* (0x1028:0x110F) Reserved */
 
-	T_EP_DCR EP_DCR[REG_EP_NUM];	/* */
+	struct ep_dcr EP_DCR[REG_EP_NUM];	/* */
 
 	u8 Reserved1200[0x1000-0x200];	/* Reserved */
 
-} __attribute__ ((aligned(32))) T_FC_REGS, *PT_FC_REGS;
+} __attribute__ ((aligned(32)));
 
 
 
@@ -631,16 +631,16 @@ struct nbu2ss_udc {
 
 	u32		curr_config;	/* Current Configuration Number */
 
-	PT_FC_REGS		p_regs;
+	struct fc_regs		*p_regs;
 };
 
 /* USB register access structure */
-typedef volatile union {
+union usb_reg_access {
 	struct {
 		unsigned char	DATA[4];
 	} byte;
 	unsigned int		dw;
-} USB_REG_ACCESS;
+};
 
 /*-------------------------------------------------------------------------*/
 #define ERR(stuff...)		printk(KERN_ERR "udc: " stuff)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v9 2/4] Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_err
  2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
                   ` (2 preceding siblings ...)
  2015-03-01 20:55 ` [PATCH v9 1/4] Staging: emxx_udc: Fix do not add new typedefs and remove volatile Haneen Mohammed
@ 2015-03-01 21:00 ` Haneen Mohammed
  2015-03-01 21:03 ` [PATCH v9 3/4] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
  2015-03-01 21:04 ` [PATCH v9 4/4] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-03-01 21:00 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes the use of custom printk macros ERR and replace it with
dev_err, or pr_err in the following cases:
- if no appropriate struct device *dev field where found for dev_err.
- or dev could be null eg. "dev_err(udc->dev" not possible inside "if (udc == null)"
Issue addressed by checkpathc.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v9: merged two patches into one, and justify the use of pr_err.  

 drivers/staging/emxx_udc/emxx_udc.c | 82 ++++++++++++++++++-------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index f2ddad3..77189cc 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -115,7 +115,7 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
 	pr_info("=== %s()\n", __func__);
 
 	if (udc == NULL) {
-		ERR("%s udc == NULL\n", __func__);
+		pr_err("udc: %s udc == NULL\n", __func__);
 		return;
 	}
 
@@ -808,7 +808,7 @@ static int _nbu2ss_ep0_out_transfer(
 		return 0;		/* Short Packet Transfer End */
 
 	if (req->req.actual > req->req.length) {
-		ERR(" *** Overrun Error\n");
+		dev_err(udc->dev, " *** Overrun Error\n");
 		return -EOVERFLOW;
 	}
 
@@ -1026,8 +1026,8 @@ static int _nbu2ss_epn_out_transfer(
 	}
 
 	if (req->req.actual > req->req.length) {
-		ERR(" *** Overrun Error\n");
-		ERR(" *** actual = %d, length = %d\n",
+		dev_err(udc->dev, " *** Overrun Error\n");
+		dev_err(udc->dev, " *** actual = %d, length = %d\n",
 			req->req.actual, req->req.length);
 		result = -EOVERFLOW;
 	}
@@ -1638,7 +1638,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
 		_nbu2ss_ep0_in_transfer(udc, &udc->ep[0], &udc->ep0_req);
 
 	} else {
-		ERR("*** Error GET_STATUS\n");
+		dev_err(udc->dev, "*** Error GET_STATUS\n");
 	}
 
 	return result;
@@ -2258,7 +2258,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 	u32	reg_dt;
 
 	if (!udc) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2350,7 +2350,7 @@ static int _nbu2ss_enable_controller(struct nbu2ss_udc *udc)
 		waitcnt++;
 		udelay(1);	/* 1us wait */
 		if (waitcnt == EPC_PLL_LOCK_COUNT) {
-			ERR("*** Reset Cancel failed\n");
+			dev_err(udc->dev, "*** Reset Cancel failed\n");
 			return -EINVAL;
 		}
 	};
@@ -2612,13 +2612,13 @@ static int nbu2ss_ep_enable(
 	struct nbu2ss_udc	*udc;
 
 	if ((_ep == NULL) || (desc == NULL)) {
-		ERR(" *** %s, bad param\n", __func__);
+		pr_err("udc: *** %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if ((ep == NULL) || (ep->udc == NULL)) {
-		ERR(" *** %s, ep == NULL !!\n", __func__);
+		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
 	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
 		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
 
-		ERR(" *** %s, bat bmAttributes\n", __func__);
+		dev_err(ep->udc->dev, "udc:  *** %s, bat bmAttributes\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
 	if ((udc->driver == NULL)
 		|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
 
-		ERR(" *** %s, udc !!\n", __func__);
+		dev_err(udc->dev, " *** %s, udc !!\n", __func__);
 		return -ESHUTDOWN;
 	}
 
@@ -2672,13 +2672,13 @@ static int nbu2ss_ep_disable(struct usb_ep *_ep)
 	unsigned long		flags;
 
 	if (_ep == NULL) {
-		ERR(" *** %s, bad param\n", __func__);
+		pr_err("udc:  *** %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if ((ep == NULL) || (ep->udc == NULL)) {
-		ERR(" *** %s, ep == NULL !!\n", __func__);
+		pr_err("udc:  *** %s, ep == NULL !!\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2742,10 +2742,10 @@ static int nbu2ss_ep_queue(
 	/* catch various bogus parameters */
 	if ((_ep == NULL) || (_req == NULL)) {
 		if (_ep == NULL)
-			ERR("*** %s --- _ep == NULL\n", __func__);
+			pr_err("udc: *** %s --- _ep == NULL\n", __func__);
 
 		if (_req == NULL)
-			ERR("*** %s --- _req == NULL\n", __func__);
+			pr_err("udc: *** %s --- _req == NULL\n", __func__);
 
 		return -EINVAL;
 	}
@@ -2756,13 +2756,13 @@ static int nbu2ss_ep_queue(
 	     || !list_empty(&req->queue))) {
 
 		if (!_req->complete)
-			ERR("*** %s --- !_req->complete\n", __func__);
+			pr_err("udc: *** %s --- !_req->complete\n", __func__);
 
 		if (!_req->buf)
-			ERR("*** %s --- !_req->buf\n", __func__);
+			pr_err("udc: *** %s --- !_req->buf\n", __func__);
 
 		if (!list_empty(&req->queue))
-			ERR("*** %s --- !list_empty(&req->queue)\n", __func__);
+			pr_err("udc: *** %s --- !list_empty(&req->queue)\n", __func__);
 
 		return -EINVAL;
 	}
@@ -2773,12 +2773,12 @@ static int nbu2ss_ep_queue(
 /*	INFO("=== %s(ep%d), zero=%d\n", __func__, ep->epnum, _req->zero); */
 
 	if (udc->vbus_active == 0) {
-		pr_info("Can't ep_queue (VBUS OFF)\n");
+		dev_info(udc->dev, "Can't ep_queue (VBUS OFF)\n");
 		return -ESHUTDOWN;
 	}
 
 	if (unlikely(!udc->driver)) {
-		ERR("%s, bogus device state %p\n", __func__, udc->driver);
+		dev_err(udc->dev, "%s, bogus device state %p\n", __func__, udc->driver);
 		return -ESHUTDOWN;
 	}
 
@@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
 
 		result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
 		if (result < 0) {
-			ERR(" *** %s, result = %d\n", __func__, result);
+			dev_err(udc->dev, " *** %s, result = %d\n", __func__, result);
 			list_del(&req->queue);
 		} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
 #ifdef USE_DMA
@@ -2849,13 +2849,13 @@ static int nbu2ss_ep_dequeue(
 
 	/* catch various bogus parameters */
 	if ((_ep == NULL) || (_req == NULL)) {
-		/* ERR("%s, bad param(1)\n", __func__); */
+		/* pr_err("udc: %s, bad param(1)\n", __func__); */
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!ep) {
-		ERR("%s, ep == NULL !!\n", __func__);
+		pr_err("udc: %s, ep == NULL !!\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2895,19 +2895,19 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (!_ep) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!ep) {
-		ERR("%s, bad ep\n", __func__);
+		pr_err("udc: %s, bad ep\n", __func__);
 		return -EINVAL;
 	}
 
 	udc = ep->udc;
 	if (!udc) {
-		ERR(" *** %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "udc: *** %s, bad udc\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2949,19 +2949,19 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (!_ep) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!ep) {
-		ERR("%s, bad ep\n", __func__);
+		pr_err("udc: %s, bad ep\n", __func__);
 		return -EINVAL;
 	}
 
 	udc = ep->udc;
 	if (!udc) {
-		ERR("%s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
 		return -EINVAL;
 	}
 
@@ -2997,19 +2997,19 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (!_ep) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return;
 	}
 
 	ep = container_of(_ep, struct nbu2ss_ep, ep);
 	if (!_ep) {
-		ERR("%s, bad ep\n", __func__);
+		pr_err("udc: %s, bad ep\n", __func__);
 		return;
 	}
 
 	udc = ep->udc;
 	if (!udc) {
-		ERR("%s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
 		return;
 	}
 
@@ -3053,13 +3053,13 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		ERR("%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3083,13 +3083,13 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("%s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		ERR("%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3123,7 +3123,7 @@ static int nbu2ss_gad_set_selfpowered(struct usb_gadget *pgadget,
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3152,7 +3152,7 @@ static int nbu2ss_gad_vbus_draw(struct usb_gadget *pgadget, unsigned mA)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3174,7 +3174,7 @@ static int nbu2ss_gad_pullup(struct usb_gadget *pgadget, int is_on)
 /*	INFO("=== %s()\n", __func__); */
 
 	if (pgadget == NULL) {
-		ERR("%s, bad param\n", __func__);
+		pr_err("udc: %s, bad param\n", __func__);
 		return -EINVAL;
 	}
 
@@ -3345,7 +3345,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 
 	/* USB Function Controller Interrupt */
 	if (status != 0) {
-		ERR("request_irq(USB_UDC_IRQ_1) failed\n");
+		dev_err(udc->dev, "request_irq(USB_UDC_IRQ_1) failed\n");
 		goto cleanup1;
 	}
 
@@ -3365,7 +3365,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 				udc);
 
 	if (status != 0) {
-		ERR("request_irq(INT_VBUS) failed\n");
+		dev_err(udc->dev, "request_irq(INT_VBUS) failed\n");
 		goto cleanup1;
 	}
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v9 3/4] Staging: emxx_udc: Remove custom printk macro ERR
  2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
                   ` (3 preceding siblings ...)
  2015-03-01 21:00 ` [PATCH v9 2/4] Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_err Haneen Mohammed
@ 2015-03-01 21:03 ` Haneen Mohammed
  2015-03-01 21:04 ` [PATCH v9 4/4] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-03-01 21:03 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes custom printk macro ERR.
All the calls to this macro were replaced by de_err and pr_err.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v9: nothing

 drivers/staging/emxx_udc/emxx_udc.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
index c21f211..f4a94c3 100644
--- a/drivers/staging/emxx_udc/emxx_udc.h
+++ b/drivers/staging/emxx_udc/emxx_udc.h
@@ -643,6 +643,5 @@ union usb_reg_access {
 };
 
 /*-------------------------------------------------------------------------*/
-#define ERR(stuff...)		printk(KERN_ERR "udc: " stuff)
 
 #endif  /* _LINUX_EMXX_H */
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v9 4/4] Staging: emxx_udc: Clean dev_err() logging
  2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
                   ` (4 preceding siblings ...)
  2015-03-01 21:03 ` [PATCH v9 3/4] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
@ 2015-03-01 21:04 ` Haneen Mohammed
  5 siblings, 0 replies; 18+ messages in thread
From: Haneen Mohammed @ 2015-03-01 21:04 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes  __func__ from dev_err.
dev_err includes the function name in the log printout, so there is no
need to include it manually.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 77189cc..0bfd268 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
 	if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
 		|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
 
-		dev_err(ep->udc->dev, "udc:  *** %s, bat bmAttributes\n", __func__);
+		dev_err(ep->udc->dev, "bat bmAttributes\n");
 		return -EINVAL;
 	}
 
@@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
 	if ((udc->driver == NULL)
 		|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
 
-		dev_err(udc->dev, " *** %s, udc !!\n", __func__);
+		dev_err(udc->dev, "udc !!\n");
 		return -ESHUTDOWN;
 	}
 
@@ -2778,7 +2778,7 @@ static int nbu2ss_ep_queue(
 	}
 
 	if (unlikely(!udc->driver)) {
-		dev_err(udc->dev, "%s, bogus device state %p\n", __func__, udc->driver);
+		dev_err(udc->dev, "bogus device state %p\n", udc->driver);
 		return -ESHUTDOWN;
 	}
 
@@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
 
 		result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
 		if (result < 0) {
-			dev_err(udc->dev, " *** %s, result = %d\n", __func__, result);
+			dev_err(udc->dev, "result = %d\n", result);
 			list_del(&req->queue);
 		} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
 #ifdef USE_DMA
@@ -2907,7 +2907,7 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
 
 	udc = ep->udc;
 	if (!udc) {
-		dev_err(ep->udc->dev, "udc: *** %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "bad udc\n");
 		return -EINVAL;
 	}
 
@@ -2961,7 +2961,7 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 
 	udc = ep->udc;
 	if (!udc) {
-		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "bad udc\n");
 		return -EINVAL;
 	}
 
@@ -3009,7 +3009,7 @@ static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
 
 	udc = ep->udc;
 	if (!udc) {
-		dev_err(ep->udc->dev, "udc: %s, bad udc\n", __func__);
+		dev_err(ep->udc->dev, "bad udc\n");
 		return;
 	}
 
@@ -3059,7 +3059,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "udc == NULL\n");
 		return -EINVAL;
 	}
 
@@ -3089,7 +3089,7 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
 
 	udc = container_of(pgadget, struct nbu2ss_udc, gadget);
 	if (udc == NULL) {
-		dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__);
+		dev_err(&pgadget->dev, "udc == NULL\n");
 		return -EINVAL;
 	}
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Outreachy kernel] [PATCH v9 1/4] Staging: emxx_udc: Fix do not add new typedefs and remove volatile
  2015-03-01 20:55 ` [PATCH v9 1/4] Staging: emxx_udc: Fix do not add new typedefs and remove volatile Haneen Mohammed
@ 2015-03-02  1:12   ` Greg KH
  0 siblings, 0 replies; 18+ messages in thread
From: Greg KH @ 2015-03-02  1:12 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: outreachy-kernel

On Sun, Mar 01, 2015 at 11:55:46PM +0300, Haneen Mohammed wrote:
> This patch fixes the following checkpatch.pl warnings:"do not add new
> typedefs" and "Use of volatile is usually wrong".
> Remove typedefs keyword and rename identifiers appropriately.
> Remove volatile from union usb_regs_access
> Update related  files.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

This patch doesn't apply to my tree, can you refresh the whole series
and resend?

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-03-02  1:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27  9:48 [PATCH v6 0/4] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
2015-02-27 10:01 ` [PATCH v7 0/5] " Haneen Mohammed
2015-02-27 10:26   ` [PATCH v8 " Haneen Mohammed
2015-02-27 10:28   ` [PATCH v8 1/5] Staging: emxx_udc: Fix do not add new typedefs remove and volatile Haneen Mohammed
2015-02-27 10:31   ` [PATCH v8 2/5] Staging: emxx_udc: Replace custom printk macro ERR with pr_err Haneen Mohammed
2015-02-27 10:59     ` [Outreachy kernel] " Julia Lawall
2015-02-27 11:42       ` Haneen Mohammed
2015-02-27 10:32   ` [PATCH v8 3/5] Staging: emxx_udc: Replace custom printk macro ERR with dev_err Haneen Mohammed
2015-02-27 10:34   ` [PATCH v8 4/5] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
2015-02-27 10:35   ` [PATCH v8 5/5] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
2015-02-27 10:57     ` [Outreachy kernel] " Julia Lawall
2015-02-27 11:22       ` Haneen Mohammed
2015-03-01 20:53 ` [PATCH v9 0/4] emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
2015-03-01 20:55 ` [PATCH v9 1/4] Staging: emxx_udc: Fix do not add new typedefs and remove volatile Haneen Mohammed
2015-03-02  1:12   ` [Outreachy kernel] " Greg KH
2015-03-01 21:00 ` [PATCH v9 2/4] Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_err Haneen Mohammed
2015-03-01 21:03 ` [PATCH v9 3/4] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
2015-03-01 21:04 ` [PATCH v9 4/4] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.