diff mbox

[OPW,kernel] staging:sbe-2t3e3: Remove typedefs in 2t3e3.h

Message ID 20140308114705.GA13542@himangi-Inspiron-N5110gmail.com
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI March 8, 2014, 11:47 a.m. UTC
This patch fixes the checkpatch.pl warning: "WARNING: do not add new
typedefs" by removing the typedefs and changing the files where it was
used.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
 drivers/staging/sbe-2t3e3/2t3e3.h |   12 ++++++------
 drivers/staging/sbe-2t3e3/dc.c    |    6 ++++--
 drivers/staging/sbe-2t3e3/intr.c  |    4 ++--
 3 files changed, 12 insertions(+), 10 deletions(-)

Comments

gregkh@linuxfoundation.org March 9, 2014, 4:27 a.m. UTC | #1
On Sat, Mar 08, 2014 at 05:17:05PM +0530, Himangi Saraogi wrote:
> This patch fixes the checkpatch.pl warning: "WARNING: do not add new
> typedefs" by removing the typedefs and changing the files where it was
> used.
> 
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> ---
>  drivers/staging/sbe-2t3e3/2t3e3.h |   12 ++++++------
>  drivers/staging/sbe-2t3e3/dc.c    |    6 ++++--
>  drivers/staging/sbe-2t3e3/intr.c  |    4 ++--
>  3 files changed, 12 insertions(+), 10 deletions(-)

This patch doesn't apply either :(
diff mbox

Patch

diff --git a/drivers/staging/sbe-2t3e3/2t3e3.h b/drivers/staging/sbe-2t3e3/2t3e3.h
index ccad049..142429e 100644
--- a/drivers/staging/sbe-2t3e3/2t3e3.h
+++ b/drivers/staging/sbe-2t3e3/2t3e3.h
@@ -613,12 +613,12 @@ 
  * descriptor list and data buffer
  *
  **********************************************************************/
-typedef struct {
+struct t3e3_rx_desc_t {
 	u32 rdes0;
 	u32 rdes1;
 	u32 rdes2;
 	u32 rdes3;
-} t3e3_rx_desc_t;
+};
 
 #define SBE_2T3E3_RX_DESC_RING_SIZE			64
 
@@ -648,12 +648,12 @@  typedef struct {
 
 /*********************/
 
-typedef struct {
+struct t3e3_tx_desc_t {
 	u32 tdes0;
 	u32 tdes1;
 	u32 tdes2;
 	u32 tdes3;
-} t3e3_tx_desc_t;
+};
 
 #define SBE_2T3E3_TX_DESC_RING_SIZE			256
 
@@ -723,12 +723,12 @@  struct channel {
 		u32 interrupt_enable_mask;
 
 		/* receive chain/ring */
-		t3e3_rx_desc_t *rx_ring;
+		struct t3e3_rx_desc_t *rx_ring;
 		struct sk_buff *rx_data[SBE_2T3E3_RX_DESC_RING_SIZE];
 		u32 rx_ring_current_read;
 
 		/* transmit chain/ring */
-		t3e3_tx_desc_t *tx_ring;
+		struct t3e3_tx_desc_t *tx_ring;
 		struct sk_buff *tx_data[SBE_2T3E3_TX_DESC_RING_SIZE];
 		u32 tx_ring_current_read;
 		u32 tx_ring_current_write;
diff --git a/drivers/staging/sbe-2t3e3/dc.c b/drivers/staging/sbe-2t3e3/dc.c
index 42ae67c..c1e9fef 100644
--- a/drivers/staging/sbe-2t3e3/dc.c
+++ b/drivers/staging/sbe-2t3e3/dc.c
@@ -316,13 +316,15 @@  static int dc_init_descriptor_list(struct channel *sc)
 
 	if (sc->ether.rx_ring == NULL)
 		sc->ether.rx_ring = kcalloc(SBE_2T3E3_RX_DESC_RING_SIZE,
-					    sizeof(t3e3_rx_desc_t), GFP_KERNEL);
+					    sizeof(struct t3e3_rx_desc_t),
+					    GFP_KERNEL);
 	if (sc->ether.rx_ring == NULL)
 		return -ENOMEM;
 
 	if (sc->ether.tx_ring == NULL)
 		sc->ether.tx_ring = kcalloc(SBE_2T3E3_TX_DESC_RING_SIZE,
-					    sizeof(t3e3_tx_desc_t), GFP_KERNEL);
+					    sizeof(struct t3e3_tx_desc_t),
+					    GFP_KERNEL);
 	if (sc->ether.tx_ring == NULL) {
 		kfree(sc->ether.rx_ring);
 		sc->ether.rx_ring = NULL;
diff --git a/drivers/staging/sbe-2t3e3/intr.c b/drivers/staging/sbe-2t3e3/intr.c
index efdeb75..ecc2991 100644
--- a/drivers/staging/sbe-2t3e3/intr.c
+++ b/drivers/staging/sbe-2t3e3/intr.c
@@ -118,7 +118,7 @@  void dc_intr_rx(struct channel *sc)
 {
 	u32 current_read;
 	u32 error_mask, error;
-	t3e3_rx_desc_t *current_desc;
+	struct t3e3_rx_desc_t *current_desc;
 	struct sk_buff *m, *m2;
 	unsigned rcv_len;
 
@@ -292,7 +292,7 @@  void dc_intr_tx(struct channel *sc)
 {
 	u32 current_read, current_write;
 	u32 last_segment, error;
-	t3e3_tx_desc_t *current_desc;
+	struct t3e3_tx_desc_t *current_desc;
 
 	spin_lock(&sc->ether.tx_lock);