All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Remove declarations of new typedef in
@ 2019-10-11  6:02 ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, devel, linux-kernel, Wambui Karuga

This patchset removes various typedef declarations of new data types
in drivers/staging/octeon/octeon-stubs.h.
The series also changes their old uses with the new declaration
format.

Wambui Karuga (5):
  staging: octeon: remove typedef declaration for cvmx_wqe_t
  staging: octeon: remove typedef declaration for
    cvmx_helper_link_info_t
  staging: octeon: remove typedef declaration for cvmx_fau_reg_32_t
  staging: octeon: remove typedef declartion for
    cvmx_pko_command_word0_t
  staging: octeon: remove typedef declaration for cvmx_fau_op_size_t

 drivers/staging/octeon/ethernet-mdio.c   |  6 +--
 drivers/staging/octeon/ethernet-rgmii.c  |  4 +-
 drivers/staging/octeon/ethernet-rx.c     |  6 +--
 drivers/staging/octeon/ethernet-tx.c     |  4 +-
 drivers/staging/octeon/ethernet.c        |  6 +--
 drivers/staging/octeon/octeon-ethernet.h |  2 +-
 drivers/staging/octeon/octeon-stubs.h    | 56 ++++++++++++------------
 7 files changed, 43 insertions(+), 41 deletions(-)

-- 
2.23.0



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

* [PATCH 0/5] Remove declarations of new typedef in
@ 2019-10-11  6:02 ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, gregkh, linux-kernel, Wambui Karuga

This patchset removes various typedef declarations of new data types
in drivers/staging/octeon/octeon-stubs.h.
The series also changes their old uses with the new declaration
format.

Wambui Karuga (5):
  staging: octeon: remove typedef declaration for cvmx_wqe_t
  staging: octeon: remove typedef declaration for
    cvmx_helper_link_info_t
  staging: octeon: remove typedef declaration for cvmx_fau_reg_32_t
  staging: octeon: remove typedef declartion for
    cvmx_pko_command_word0_t
  staging: octeon: remove typedef declaration for cvmx_fau_op_size_t

 drivers/staging/octeon/ethernet-mdio.c   |  6 +--
 drivers/staging/octeon/ethernet-rgmii.c  |  4 +-
 drivers/staging/octeon/ethernet-rx.c     |  6 +--
 drivers/staging/octeon/ethernet-tx.c     |  4 +-
 drivers/staging/octeon/ethernet.c        |  6 +--
 drivers/staging/octeon/octeon-ethernet.h |  2 +-
 drivers/staging/octeon/octeon-stubs.h    | 56 ++++++++++++------------
 7 files changed, 43 insertions(+), 41 deletions(-)

-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
  2019-10-11  6:02 ` Wambui Karuga
@ 2019-10-11  6:02   ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, devel, linux-kernel, Wambui Karuga

Remove typedef declaration from struct cvmx_wqe_t in
drivers/staging/octeon/octeon-stubs.h.
Also replace its previous uses with new struct declaration.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/ethernet-rx.c  |  6 +++---
 drivers/staging/octeon/ethernet-tx.c  |  2 +-
 drivers/staging/octeon/ethernet.c     |  2 +-
 drivers/staging/octeon/octeon-stubs.h | 22 +++++++++++-----------
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 0e65955c746b..63e15a70f3e7 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -60,7 +60,7 @@ static irqreturn_t cvm_oct_do_interrupt(int irq, void *napi_id)
  *
  * Returns Non-zero if the packet can be dropped, zero otherwise.
  */
-static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
+static inline int cvm_oct_check_rcv_error(struct cvmx_wqe_t *work)
 {
 	int port;
 
@@ -135,7 +135,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
 	return 0;
 }
 
-static void copy_segments_to_skb(cvmx_wqe_t *work, struct sk_buff *skb)
+static void copy_segments_to_skb(struct cvmx_wqe_t *work, struct sk_buff *skb)
 {
 	int segments = work->word2.s.bufs;
 	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
@@ -215,7 +215,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget)
 		struct sk_buff *skb = NULL;
 		struct sk_buff **pskb = NULL;
 		int skb_in_hw;
-		cvmx_wqe_t *work;
+		struct cvmx_wqe_t *work;
 		int port;
 
 		if (USE_ASYNC_IOBDMA && did_work_request)
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index c64728fc21f2..7ececfac0701 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -515,7 +515,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
 	void *copy_location;
 
 	/* Get a work queue entry */
-	cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
+	struct cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
 
 	if (unlikely(!work)) {
 		printk_ratelimited("%s: Failed to allocate a work queue entry\n",
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index cf8e9a23ebf9..3de209b7d0ec 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -172,7 +172,7 @@ static void cvm_oct_configure_common_hw(void)
  */
 int cvm_oct_free_work(void *work_queue_entry)
 {
-	cvmx_wqe_t *work = work_queue_entry;
+	struct cvmx_wqe_t *work = work_queue_entry;
 
 	int segments = work->word2.s.bufs;
 	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index b2e3c72205dd..fd7522f70f7e 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -183,13 +183,13 @@ union cvmx_buf_ptr {
 	} s;
 };
 
-typedef struct {
+struct cvmx_wqe_t {
 	union cvmx_wqe_word0 word0;
 	union cvmx_wqe_word1 word1;
 	union cvmx_pip_wqe_word2 word2;
 	union cvmx_buf_ptr packet_ptr;
 	uint8_t packet_data[96];
-} cvmx_wqe_t;
+};
 
 typedef union {
 	uint64_t u64;
@@ -1198,7 +1198,7 @@ static inline uint64_t cvmx_scratch_read64(uint64_t address)
 static inline void cvmx_scratch_write64(uint64_t address, uint64_t value)
 { }
 
-static inline int cvmx_wqe_get_grp(cvmx_wqe_t *work)
+static inline int cvmx_wqe_get_grp(struct cvmx_wqe_t *work)
 {
 	return 0;
 }
@@ -1345,14 +1345,14 @@ static inline void cvmx_pow_work_request_async(int scr_addr,
 						       cvmx_pow_wait_t wait)
 { }
 
-static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
+static inline struct cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
 {
-	cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
+	struct cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
 
 	return wqe;
 }
 
-static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
+static inline struct cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
 {
 	return (void *)(unsigned long)wait;
 }
@@ -1390,21 +1390,21 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
 	return ret;
 }
 
-static inline void cvmx_wqe_set_port(cvmx_wqe_t *work, int port)
+static inline void cvmx_wqe_set_port(struct cvmx_wqe_t *work, int port)
 { }
 
-static inline void cvmx_wqe_set_qos(cvmx_wqe_t *work, int qos)
+static inline void cvmx_wqe_set_qos(struct cvmx_wqe_t *work, int qos)
 { }
 
-static inline int cvmx_wqe_get_qos(cvmx_wqe_t *work)
+static inline int cvmx_wqe_get_qos(struct cvmx_wqe_t *work)
 {
 	return 0;
 }
 
-static inline void cvmx_wqe_set_grp(cvmx_wqe_t *work, int grp)
+static inline void cvmx_wqe_set_grp(struct cvmx_wqe_t *work, int grp)
 { }
 
-static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag,
+static inline void cvmx_pow_work_submit(struct cvmx_wqe_t *wqp, uint32_t tag,
 					enum cvmx_pow_tag_type tag_type,
 					uint64_t qos, uint64_t grp)
 { }
-- 
2.23.0



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

* [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
@ 2019-10-11  6:02   ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, gregkh, linux-kernel, Wambui Karuga

Remove typedef declaration from struct cvmx_wqe_t in
drivers/staging/octeon/octeon-stubs.h.
Also replace its previous uses with new struct declaration.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/ethernet-rx.c  |  6 +++---
 drivers/staging/octeon/ethernet-tx.c  |  2 +-
 drivers/staging/octeon/ethernet.c     |  2 +-
 drivers/staging/octeon/octeon-stubs.h | 22 +++++++++++-----------
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 0e65955c746b..63e15a70f3e7 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -60,7 +60,7 @@ static irqreturn_t cvm_oct_do_interrupt(int irq, void *napi_id)
  *
  * Returns Non-zero if the packet can be dropped, zero otherwise.
  */
-static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
+static inline int cvm_oct_check_rcv_error(struct cvmx_wqe_t *work)
 {
 	int port;
 
@@ -135,7 +135,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
 	return 0;
 }
 
-static void copy_segments_to_skb(cvmx_wqe_t *work, struct sk_buff *skb)
+static void copy_segments_to_skb(struct cvmx_wqe_t *work, struct sk_buff *skb)
 {
 	int segments = work->word2.s.bufs;
 	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
@@ -215,7 +215,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget)
 		struct sk_buff *skb = NULL;
 		struct sk_buff **pskb = NULL;
 		int skb_in_hw;
-		cvmx_wqe_t *work;
+		struct cvmx_wqe_t *work;
 		int port;
 
 		if (USE_ASYNC_IOBDMA && did_work_request)
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index c64728fc21f2..7ececfac0701 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -515,7 +515,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
 	void *copy_location;
 
 	/* Get a work queue entry */
-	cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
+	struct cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
 
 	if (unlikely(!work)) {
 		printk_ratelimited("%s: Failed to allocate a work queue entry\n",
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index cf8e9a23ebf9..3de209b7d0ec 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -172,7 +172,7 @@ static void cvm_oct_configure_common_hw(void)
  */
 int cvm_oct_free_work(void *work_queue_entry)
 {
-	cvmx_wqe_t *work = work_queue_entry;
+	struct cvmx_wqe_t *work = work_queue_entry;
 
 	int segments = work->word2.s.bufs;
 	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index b2e3c72205dd..fd7522f70f7e 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -183,13 +183,13 @@ union cvmx_buf_ptr {
 	} s;
 };
 
-typedef struct {
+struct cvmx_wqe_t {
 	union cvmx_wqe_word0 word0;
 	union cvmx_wqe_word1 word1;
 	union cvmx_pip_wqe_word2 word2;
 	union cvmx_buf_ptr packet_ptr;
 	uint8_t packet_data[96];
-} cvmx_wqe_t;
+};
 
 typedef union {
 	uint64_t u64;
@@ -1198,7 +1198,7 @@ static inline uint64_t cvmx_scratch_read64(uint64_t address)
 static inline void cvmx_scratch_write64(uint64_t address, uint64_t value)
 { }
 
-static inline int cvmx_wqe_get_grp(cvmx_wqe_t *work)
+static inline int cvmx_wqe_get_grp(struct cvmx_wqe_t *work)
 {
 	return 0;
 }
@@ -1345,14 +1345,14 @@ static inline void cvmx_pow_work_request_async(int scr_addr,
 						       cvmx_pow_wait_t wait)
 { }
 
-static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
+static inline struct cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
 {
-	cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
+	struct cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
 
 	return wqe;
 }
 
-static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
+static inline struct cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
 {
 	return (void *)(unsigned long)wait;
 }
@@ -1390,21 +1390,21 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
 	return ret;
 }
 
-static inline void cvmx_wqe_set_port(cvmx_wqe_t *work, int port)
+static inline void cvmx_wqe_set_port(struct cvmx_wqe_t *work, int port)
 { }
 
-static inline void cvmx_wqe_set_qos(cvmx_wqe_t *work, int qos)
+static inline void cvmx_wqe_set_qos(struct cvmx_wqe_t *work, int qos)
 { }
 
-static inline int cvmx_wqe_get_qos(cvmx_wqe_t *work)
+static inline int cvmx_wqe_get_qos(struct cvmx_wqe_t *work)
 {
 	return 0;
 }
 
-static inline void cvmx_wqe_set_grp(cvmx_wqe_t *work, int grp)
+static inline void cvmx_wqe_set_grp(struct cvmx_wqe_t *work, int grp)
 { }
 
-static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag,
+static inline void cvmx_pow_work_submit(struct cvmx_wqe_t *wqp, uint32_t tag,
 					enum cvmx_pow_tag_type tag_type,
 					uint64_t qos, uint64_t grp)
 { }
-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t
  2019-10-11  6:02 ` Wambui Karuga
@ 2019-10-11  6:02   ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, devel, linux-kernel, Wambui Karuga

Remove declaration of union cvmx_helper_link_info_t as typedef in
drivers/staging/octeon/octeon-stubs.h.
Also replace its previous uses with new union declaration.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/ethernet-mdio.c   |  6 +++---
 drivers/staging/octeon/ethernet-rgmii.c  |  4 ++--
 drivers/staging/octeon/ethernet.c        |  4 ++--
 drivers/staging/octeon/octeon-ethernet.h |  2 +-
 drivers/staging/octeon/octeon-stubs.h    | 10 +++++-----
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index ffac0c4b3f5c..847081549373 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -65,7 +65,7 @@ int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 }
 
 void cvm_oct_note_carrier(struct octeon_ethernet *priv,
-			  cvmx_helper_link_info_t li)
+			  union cvmx_helper_link_info_t li)
 {
 	if (li.s.link_up) {
 		pr_notice_ratelimited("%s: %u Mbps %s duplex, port %d, queue %d\n",
@@ -81,7 +81,7 @@ void cvm_oct_note_carrier(struct octeon_ethernet *priv,
 void cvm_oct_adjust_link(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 
 	link_info.u64		= 0;
 	link_info.s.link_up	= dev->phydev->link ? 1 : 0;
@@ -106,7 +106,7 @@ int cvm_oct_common_stop(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
 	int interface = INTERFACE(priv->port);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	union cvmx_gmxx_prtx_cfg gmx_cfg;
 	int index = INDEX(priv->port);
 
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c
index d91fd5ce9e68..f815be830ce0 100644
--- a/drivers/staging/octeon/ethernet-rgmii.c
+++ b/drivers/staging/octeon/ethernet-rgmii.c
@@ -53,7 +53,7 @@ static void cvm_oct_set_hw_preamble(struct octeon_ethernet *priv, bool enable)
 static void cvm_oct_check_preamble_errors(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	unsigned long flags;
 
 	link_info.u64 = priv->link_info;
@@ -103,7 +103,7 @@ static void cvm_oct_check_preamble_errors(struct net_device *dev)
 static void cvm_oct_rgmii_poll(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	bool status_change;
 
 	link_info = cvmx_helper_link_get(priv->port);
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 3de209b7d0ec..1f7a7ebe1a60 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -460,7 +460,7 @@ int cvm_oct_common_open(struct net_device *dev,
 	struct octeon_ethernet *priv = netdev_priv(dev);
 	int interface = INTERFACE(priv->port);
 	int index = INDEX(priv->port);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	int rv;
 
 	rv = cvm_oct_phy_setup_device(dev);
@@ -496,7 +496,7 @@ int cvm_oct_common_open(struct net_device *dev,
 void cvm_oct_link_poll(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 
 	link_info = cvmx_helper_link_get(priv->port);
 	if (link_info.u64 == priv->link_info)
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index 042220d86d33..5a0d754b0c70 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -91,7 +91,7 @@ int cvm_oct_common_stop(struct net_device *dev);
 int cvm_oct_common_open(struct net_device *dev,
 			void (*link_poll)(struct net_device *));
 void cvm_oct_note_carrier(struct octeon_ethernet *priv,
-			  cvmx_helper_link_info_t li);
+			  union cvmx_helper_link_info_t li);
 void cvm_oct_link_poll(struct net_device *dev);
 
 extern int always_use_pow;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index fd7522f70f7e..78f42597cee5 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -191,7 +191,7 @@ struct cvmx_wqe_t {
 	uint8_t packet_data[96];
 };
 
-typedef union {
+union cvmx_helper_link_info_t {
 	uint64_t u64;
 	struct {
 		uint64_t reserved_20_63:44;
@@ -199,7 +199,7 @@ typedef union {
 		uint64_t full_duplex:1;	    /**< 1 if the link is full duplex */
 		uint64_t speed:18;	    /**< Speed of the link in Mbps */
 	} s;
-} cvmx_helper_link_info_t;
+};
 
 typedef enum {
 	CVMX_FAU_REG_32_START	= 0,
@@ -1267,15 +1267,15 @@ static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int
 	return 0;
 }
 
-static inline cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
+static inline union cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
 {
-	cvmx_helper_link_info_t ret = { .u64 = 0 };
+	union cvmx_helper_link_info_t ret = { .u64 = 0 };
 
 	return ret;
 }
 
 static inline int cvmx_helper_link_set(int ipd_port,
-				cvmx_helper_link_info_t link_info)
+				       union cvmx_helper_link_info_t link_info)
 {
 	return 0;
 }
-- 
2.23.0



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

* [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t
@ 2019-10-11  6:02   ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, gregkh, linux-kernel, Wambui Karuga

Remove declaration of union cvmx_helper_link_info_t as typedef in
drivers/staging/octeon/octeon-stubs.h.
Also replace its previous uses with new union declaration.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/ethernet-mdio.c   |  6 +++---
 drivers/staging/octeon/ethernet-rgmii.c  |  4 ++--
 drivers/staging/octeon/ethernet.c        |  4 ++--
 drivers/staging/octeon/octeon-ethernet.h |  2 +-
 drivers/staging/octeon/octeon-stubs.h    | 10 +++++-----
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index ffac0c4b3f5c..847081549373 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -65,7 +65,7 @@ int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 }
 
 void cvm_oct_note_carrier(struct octeon_ethernet *priv,
-			  cvmx_helper_link_info_t li)
+			  union cvmx_helper_link_info_t li)
 {
 	if (li.s.link_up) {
 		pr_notice_ratelimited("%s: %u Mbps %s duplex, port %d, queue %d\n",
@@ -81,7 +81,7 @@ void cvm_oct_note_carrier(struct octeon_ethernet *priv,
 void cvm_oct_adjust_link(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 
 	link_info.u64		= 0;
 	link_info.s.link_up	= dev->phydev->link ? 1 : 0;
@@ -106,7 +106,7 @@ int cvm_oct_common_stop(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
 	int interface = INTERFACE(priv->port);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	union cvmx_gmxx_prtx_cfg gmx_cfg;
 	int index = INDEX(priv->port);
 
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c
index d91fd5ce9e68..f815be830ce0 100644
--- a/drivers/staging/octeon/ethernet-rgmii.c
+++ b/drivers/staging/octeon/ethernet-rgmii.c
@@ -53,7 +53,7 @@ static void cvm_oct_set_hw_preamble(struct octeon_ethernet *priv, bool enable)
 static void cvm_oct_check_preamble_errors(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	unsigned long flags;
 
 	link_info.u64 = priv->link_info;
@@ -103,7 +103,7 @@ static void cvm_oct_check_preamble_errors(struct net_device *dev)
 static void cvm_oct_rgmii_poll(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	bool status_change;
 
 	link_info = cvmx_helper_link_get(priv->port);
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 3de209b7d0ec..1f7a7ebe1a60 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -460,7 +460,7 @@ int cvm_oct_common_open(struct net_device *dev,
 	struct octeon_ethernet *priv = netdev_priv(dev);
 	int interface = INTERFACE(priv->port);
 	int index = INDEX(priv->port);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 	int rv;
 
 	rv = cvm_oct_phy_setup_device(dev);
@@ -496,7 +496,7 @@ int cvm_oct_common_open(struct net_device *dev,
 void cvm_oct_link_poll(struct net_device *dev)
 {
 	struct octeon_ethernet *priv = netdev_priv(dev);
-	cvmx_helper_link_info_t link_info;
+	union cvmx_helper_link_info_t link_info;
 
 	link_info = cvmx_helper_link_get(priv->port);
 	if (link_info.u64 == priv->link_info)
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index 042220d86d33..5a0d754b0c70 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -91,7 +91,7 @@ int cvm_oct_common_stop(struct net_device *dev);
 int cvm_oct_common_open(struct net_device *dev,
 			void (*link_poll)(struct net_device *));
 void cvm_oct_note_carrier(struct octeon_ethernet *priv,
-			  cvmx_helper_link_info_t li);
+			  union cvmx_helper_link_info_t li);
 void cvm_oct_link_poll(struct net_device *dev);
 
 extern int always_use_pow;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index fd7522f70f7e..78f42597cee5 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -191,7 +191,7 @@ struct cvmx_wqe_t {
 	uint8_t packet_data[96];
 };
 
-typedef union {
+union cvmx_helper_link_info_t {
 	uint64_t u64;
 	struct {
 		uint64_t reserved_20_63:44;
@@ -199,7 +199,7 @@ typedef union {
 		uint64_t full_duplex:1;	    /**< 1 if the link is full duplex */
 		uint64_t speed:18;	    /**< Speed of the link in Mbps */
 	} s;
-} cvmx_helper_link_info_t;
+};
 
 typedef enum {
 	CVMX_FAU_REG_32_START	= 0,
@@ -1267,15 +1267,15 @@ static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int
 	return 0;
 }
 
-static inline cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
+static inline union cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
 {
-	cvmx_helper_link_info_t ret = { .u64 = 0 };
+	union cvmx_helper_link_info_t ret = { .u64 = 0 };
 
 	return ret;
 }
 
 static inline int cvmx_helper_link_set(int ipd_port,
-				cvmx_helper_link_info_t link_info)
+				       union cvmx_helper_link_info_t link_info)
 {
 	return 0;
 }
-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 3/5] staging: octeon: remove typedef declaration for cvmx_fau_reg_32_t
  2019-10-11  6:02 ` Wambui Karuga
@ 2019-10-11  6:02   ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, devel, linux-kernel, Wambui Karuga

Remove typedef declaration for enum cvmx_fau_reg_32_t in
drivers/staging/octeon/octeon-stubs.h.
Also replace its previous uses with new declaration format.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/octeon-stubs.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 78f42597cee5..1725d54523de 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -201,9 +201,9 @@ union cvmx_helper_link_info_t {
 	} s;
 };
 
-typedef enum {
+enum cvmx_fau_reg_32_t {
 	CVMX_FAU_REG_32_START	= 0,
-} cvmx_fau_reg_32_t;
+};
 
 typedef enum {
 	CVMX_FAU_OP_SIZE_8 = 0,
@@ -1178,16 +1178,18 @@ union cvmx_gmxx_rxx_rx_inbnd {
 	} s;
 };
 
-static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg,
+static inline int32_t cvmx_fau_fetch_and_add32(enum cvmx_fau_reg_32_t reg,
 					       int32_t value)
 {
 	return value;
 }
 
-static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value)
+static inline void cvmx_fau_atomic_add32(enum cvmx_fau_reg_32_t reg,
+					 int32_t value)
 { }
 
-static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value)
+static inline void cvmx_fau_atomic_write32(enum cvmx_fau_reg_32_t reg,
+					   int32_t value)
 { }
 
 static inline uint64_t cvmx_scratch_read64(uint64_t address)
@@ -1364,7 +1366,7 @@ static inline int cvmx_spi_restart_interface(int interface,
 }
 
 static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
-						  cvmx_fau_reg_32_t reg,
+						  enum cvmx_fau_reg_32_t reg,
 						  int32_t value)
 { }
 
-- 
2.23.0



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

* [PATCH 3/5] staging: octeon: remove typedef declaration for cvmx_fau_reg_32_t
@ 2019-10-11  6:02   ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, gregkh, linux-kernel, Wambui Karuga

Remove typedef declaration for enum cvmx_fau_reg_32_t in
drivers/staging/octeon/octeon-stubs.h.
Also replace its previous uses with new declaration format.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/octeon-stubs.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 78f42597cee5..1725d54523de 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -201,9 +201,9 @@ union cvmx_helper_link_info_t {
 	} s;
 };
 
-typedef enum {
+enum cvmx_fau_reg_32_t {
 	CVMX_FAU_REG_32_START	= 0,
-} cvmx_fau_reg_32_t;
+};
 
 typedef enum {
 	CVMX_FAU_OP_SIZE_8 = 0,
@@ -1178,16 +1178,18 @@ union cvmx_gmxx_rxx_rx_inbnd {
 	} s;
 };
 
-static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg,
+static inline int32_t cvmx_fau_fetch_and_add32(enum cvmx_fau_reg_32_t reg,
 					       int32_t value)
 {
 	return value;
 }
 
-static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value)
+static inline void cvmx_fau_atomic_add32(enum cvmx_fau_reg_32_t reg,
+					 int32_t value)
 { }
 
-static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value)
+static inline void cvmx_fau_atomic_write32(enum cvmx_fau_reg_32_t reg,
+					   int32_t value)
 { }
 
 static inline uint64_t cvmx_scratch_read64(uint64_t address)
@@ -1364,7 +1366,7 @@ static inline int cvmx_spi_restart_interface(int interface,
 }
 
 static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
-						  cvmx_fau_reg_32_t reg,
+						  enum cvmx_fau_reg_32_t reg,
 						  int32_t value)
 { }
 
-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 4/5] staging: octeon: remove typedef declartion for cvmx_pko_command_word0_t
  2019-10-11  6:02 ` Wambui Karuga
@ 2019-10-11  6:02   ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, devel, linux-kernel, Wambui Karuga

Removes addition of new typedef declaration for
cvmx_pko_command_word0_t in drivers/staging/octeon/octeon-stubs.h.
Also replace previous instances with new union declaration.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/ethernet-tx.c  | 2 +-
 drivers/staging/octeon/octeon-stubs.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 7ececfac0701..f88d8e6f5292 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -127,7 +127,7 @@ static void cvm_oct_free_tx_skbs(struct net_device *dev)
  */
 int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-	cvmx_pko_command_word0_t pko_command;
+	union cvmx_pko_command_word0_t pko_command;
 	union cvmx_buf_ptr hw_buffer;
 	u64 old_scratch;
 	u64 old_scratch2;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 1725d54523de..06e6a0223416 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -1137,7 +1137,7 @@ union cvmx_npi_rsl_int_blocks {
 	} cn50xx;
 };
 
-typedef union {
+union  cvmx_pko_command_word0_t {
 	uint64_t u64;
 	struct {
 	        uint64_t total_bytes:16;
@@ -1157,7 +1157,7 @@ typedef union {
 	        uint64_t size0:2;
 	        uint64_t size1:2;
 	} s;
-} cvmx_pko_command_word0_t;
+};
 
 union cvmx_ciu_timx {
 	uint64_t u64;
@@ -1384,7 +1384,7 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue,
 { }
 
 static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
-		uint64_t queue, cvmx_pko_command_word0_t pko_command,
+		uint64_t queue, union cvmx_pko_command_word0_t pko_command,
 		union cvmx_buf_ptr packet, cvmx_pko_lock_t use_locking)
 {
 	cvmx_pko_status_t ret = 0;
-- 
2.23.0



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

* [PATCH 4/5] staging: octeon: remove typedef declartion for cvmx_pko_command_word0_t
@ 2019-10-11  6:02   ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, gregkh, linux-kernel, Wambui Karuga

Removes addition of new typedef declaration for
cvmx_pko_command_word0_t in drivers/staging/octeon/octeon-stubs.h.
Also replace previous instances with new union declaration.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/ethernet-tx.c  | 2 +-
 drivers/staging/octeon/octeon-stubs.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 7ececfac0701..f88d8e6f5292 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -127,7 +127,7 @@ static void cvm_oct_free_tx_skbs(struct net_device *dev)
  */
 int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-	cvmx_pko_command_word0_t pko_command;
+	union cvmx_pko_command_word0_t pko_command;
 	union cvmx_buf_ptr hw_buffer;
 	u64 old_scratch;
 	u64 old_scratch2;
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 1725d54523de..06e6a0223416 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -1137,7 +1137,7 @@ union cvmx_npi_rsl_int_blocks {
 	} cn50xx;
 };
 
-typedef union {
+union  cvmx_pko_command_word0_t {
 	uint64_t u64;
 	struct {
 	        uint64_t total_bytes:16;
@@ -1157,7 +1157,7 @@ typedef union {
 	        uint64_t size0:2;
 	        uint64_t size1:2;
 	} s;
-} cvmx_pko_command_word0_t;
+};
 
 union cvmx_ciu_timx {
 	uint64_t u64;
@@ -1384,7 +1384,7 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue,
 { }
 
 static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
-		uint64_t queue, cvmx_pko_command_word0_t pko_command,
+		uint64_t queue, union cvmx_pko_command_word0_t pko_command,
 		union cvmx_buf_ptr packet, cvmx_pko_lock_t use_locking)
 {
 	cvmx_pko_status_t ret = 0;
-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 5/5] staging: octeon: remove typedef declaration for cvmx_fau_op_size_t
  2019-10-11  6:02 ` Wambui Karuga
@ 2019-10-11  6:02   ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, devel, linux-kernel, Wambui Karuga

Remove addition of new typedef for enum cvmx_fau_op_size_t
in drivers/staging/octeon/octeon-stubs.h.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/octeon-stubs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 06e6a0223416..a0aa99e7b757 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -205,12 +205,12 @@ enum cvmx_fau_reg_32_t {
 	CVMX_FAU_REG_32_START	= 0,
 };
 
-typedef enum {
+enum cvmx_fau_op_size_t {
 	CVMX_FAU_OP_SIZE_8 = 0,
 	CVMX_FAU_OP_SIZE_16 = 1,
 	CVMX_FAU_OP_SIZE_32 = 2,
 	CVMX_FAU_OP_SIZE_64 = 3
-} cvmx_fau_op_size_t;
+};
 
 typedef enum {
 	CVMX_SPI_MODE_UNKNOWN = 0,
-- 
2.23.0



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

* [PATCH 5/5] staging: octeon: remove typedef declaration for cvmx_fau_op_size_t
@ 2019-10-11  6:02   ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  6:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, gregkh, linux-kernel, Wambui Karuga

Remove addition of new typedef for enum cvmx_fau_op_size_t
in drivers/staging/octeon/octeon-stubs.h.
Issue found by checkpatch.pl

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/staging/octeon/octeon-stubs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 06e6a0223416..a0aa99e7b757 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -205,12 +205,12 @@ enum cvmx_fau_reg_32_t {
 	CVMX_FAU_REG_32_START	= 0,
 };
 
-typedef enum {
+enum cvmx_fau_op_size_t {
 	CVMX_FAU_OP_SIZE_8 = 0,
 	CVMX_FAU_OP_SIZE_16 = 1,
 	CVMX_FAU_OP_SIZE_32 = 2,
 	CVMX_FAU_OP_SIZE_64 = 3
-} cvmx_fau_op_size_t;
+};
 
 typedef enum {
 	CVMX_SPI_MODE_UNKNOWN = 0,
-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [Outreachy kernel] [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
  2019-10-11  6:02   ` Wambui Karuga
@ 2019-10-11  6:18     ` Julia Lawall
  -1 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-10-11  6:18 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: outreachy-kernel, gregkh, devel, linux-kernel



On Fri, 11 Oct 2019, Wambui Karuga wrote:

> Remove typedef declaration from struct cvmx_wqe_t in

You can remove the _t from the name as well.

> drivers/staging/octeon/octeon-stubs.h.

It's not really necessary to give the name of the file in the log message,
as it can easily be seen below.

julia

> Also replace its previous uses with new struct declaration.
> Issue found by checkpatch.pl
>
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
> ---
>  drivers/staging/octeon/ethernet-rx.c  |  6 +++---
>  drivers/staging/octeon/ethernet-tx.c  |  2 +-
>  drivers/staging/octeon/ethernet.c     |  2 +-
>  drivers/staging/octeon/octeon-stubs.h | 22 +++++++++++-----------
>  4 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> index 0e65955c746b..63e15a70f3e7 100644
> --- a/drivers/staging/octeon/ethernet-rx.c
> +++ b/drivers/staging/octeon/ethernet-rx.c
> @@ -60,7 +60,7 @@ static irqreturn_t cvm_oct_do_interrupt(int irq, void *napi_id)
>   *
>   * Returns Non-zero if the packet can be dropped, zero otherwise.
>   */
> -static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
> +static inline int cvm_oct_check_rcv_error(struct cvmx_wqe_t *work)
>  {
>  	int port;
>
> @@ -135,7 +135,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
>  	return 0;
>  }
>
> -static void copy_segments_to_skb(cvmx_wqe_t *work, struct sk_buff *skb)
> +static void copy_segments_to_skb(struct cvmx_wqe_t *work, struct sk_buff *skb)
>  {
>  	int segments = work->word2.s.bufs;
>  	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
> @@ -215,7 +215,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget)
>  		struct sk_buff *skb = NULL;
>  		struct sk_buff **pskb = NULL;
>  		int skb_in_hw;
> -		cvmx_wqe_t *work;
> +		struct cvmx_wqe_t *work;
>  		int port;
>
>  		if (USE_ASYNC_IOBDMA && did_work_request)
> diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
> index c64728fc21f2..7ececfac0701 100644
> --- a/drivers/staging/octeon/ethernet-tx.c
> +++ b/drivers/staging/octeon/ethernet-tx.c
> @@ -515,7 +515,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
>  	void *copy_location;
>
>  	/* Get a work queue entry */
> -	cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
> +	struct cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
>
>  	if (unlikely(!work)) {
>  		printk_ratelimited("%s: Failed to allocate a work queue entry\n",
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index cf8e9a23ebf9..3de209b7d0ec 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -172,7 +172,7 @@ static void cvm_oct_configure_common_hw(void)
>   */
>  int cvm_oct_free_work(void *work_queue_entry)
>  {
> -	cvmx_wqe_t *work = work_queue_entry;
> +	struct cvmx_wqe_t *work = work_queue_entry;
>
>  	int segments = work->word2.s.bufs;
>  	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
> diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
> index b2e3c72205dd..fd7522f70f7e 100644
> --- a/drivers/staging/octeon/octeon-stubs.h
> +++ b/drivers/staging/octeon/octeon-stubs.h
> @@ -183,13 +183,13 @@ union cvmx_buf_ptr {
>  	} s;
>  };
>
> -typedef struct {
> +struct cvmx_wqe_t {
>  	union cvmx_wqe_word0 word0;
>  	union cvmx_wqe_word1 word1;
>  	union cvmx_pip_wqe_word2 word2;
>  	union cvmx_buf_ptr packet_ptr;
>  	uint8_t packet_data[96];
> -} cvmx_wqe_t;
> +};
>
>  typedef union {
>  	uint64_t u64;
> @@ -1198,7 +1198,7 @@ static inline uint64_t cvmx_scratch_read64(uint64_t address)
>  static inline void cvmx_scratch_write64(uint64_t address, uint64_t value)
>  { }
>
> -static inline int cvmx_wqe_get_grp(cvmx_wqe_t *work)
> +static inline int cvmx_wqe_get_grp(struct cvmx_wqe_t *work)
>  {
>  	return 0;
>  }
> @@ -1345,14 +1345,14 @@ static inline void cvmx_pow_work_request_async(int scr_addr,
>  						       cvmx_pow_wait_t wait)
>  { }
>
> -static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
> +static inline struct cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
>  {
> -	cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
> +	struct cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
>
>  	return wqe;
>  }
>
> -static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
> +static inline struct cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
>  {
>  	return (void *)(unsigned long)wait;
>  }
> @@ -1390,21 +1390,21 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
>  	return ret;
>  }
>
> -static inline void cvmx_wqe_set_port(cvmx_wqe_t *work, int port)
> +static inline void cvmx_wqe_set_port(struct cvmx_wqe_t *work, int port)
>  { }
>
> -static inline void cvmx_wqe_set_qos(cvmx_wqe_t *work, int qos)
> +static inline void cvmx_wqe_set_qos(struct cvmx_wqe_t *work, int qos)
>  { }
>
> -static inline int cvmx_wqe_get_qos(cvmx_wqe_t *work)
> +static inline int cvmx_wqe_get_qos(struct cvmx_wqe_t *work)
>  {
>  	return 0;
>  }
>
> -static inline void cvmx_wqe_set_grp(cvmx_wqe_t *work, int grp)
> +static inline void cvmx_wqe_set_grp(struct cvmx_wqe_t *work, int grp)
>  { }
>
> -static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag,
> +static inline void cvmx_pow_work_submit(struct cvmx_wqe_t *wqp, uint32_t tag,
>  					enum cvmx_pow_tag_type tag_type,
>  					uint64_t qos, uint64_t grp)
>  { }
> --
> 2.23.0
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1b16bc880fee5711f96ed82741f8268e4dac1ae6.1570773209.git.wambui.karugax%40gmail.com.
>


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

* Re: [Outreachy kernel] [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
@ 2019-10-11  6:18     ` Julia Lawall
  0 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-10-11  6:18 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: devel, outreachy-kernel, linux-kernel, gregkh



On Fri, 11 Oct 2019, Wambui Karuga wrote:

> Remove typedef declaration from struct cvmx_wqe_t in

You can remove the _t from the name as well.

> drivers/staging/octeon/octeon-stubs.h.

It's not really necessary to give the name of the file in the log message,
as it can easily be seen below.

julia

> Also replace its previous uses with new struct declaration.
> Issue found by checkpatch.pl
>
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
> ---
>  drivers/staging/octeon/ethernet-rx.c  |  6 +++---
>  drivers/staging/octeon/ethernet-tx.c  |  2 +-
>  drivers/staging/octeon/ethernet.c     |  2 +-
>  drivers/staging/octeon/octeon-stubs.h | 22 +++++++++++-----------
>  4 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
> index 0e65955c746b..63e15a70f3e7 100644
> --- a/drivers/staging/octeon/ethernet-rx.c
> +++ b/drivers/staging/octeon/ethernet-rx.c
> @@ -60,7 +60,7 @@ static irqreturn_t cvm_oct_do_interrupt(int irq, void *napi_id)
>   *
>   * Returns Non-zero if the packet can be dropped, zero otherwise.
>   */
> -static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
> +static inline int cvm_oct_check_rcv_error(struct cvmx_wqe_t *work)
>  {
>  	int port;
>
> @@ -135,7 +135,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
>  	return 0;
>  }
>
> -static void copy_segments_to_skb(cvmx_wqe_t *work, struct sk_buff *skb)
> +static void copy_segments_to_skb(struct cvmx_wqe_t *work, struct sk_buff *skb)
>  {
>  	int segments = work->word2.s.bufs;
>  	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
> @@ -215,7 +215,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget)
>  		struct sk_buff *skb = NULL;
>  		struct sk_buff **pskb = NULL;
>  		int skb_in_hw;
> -		cvmx_wqe_t *work;
> +		struct cvmx_wqe_t *work;
>  		int port;
>
>  		if (USE_ASYNC_IOBDMA && did_work_request)
> diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
> index c64728fc21f2..7ececfac0701 100644
> --- a/drivers/staging/octeon/ethernet-tx.c
> +++ b/drivers/staging/octeon/ethernet-tx.c
> @@ -515,7 +515,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
>  	void *copy_location;
>
>  	/* Get a work queue entry */
> -	cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
> +	struct cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
>
>  	if (unlikely(!work)) {
>  		printk_ratelimited("%s: Failed to allocate a work queue entry\n",
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index cf8e9a23ebf9..3de209b7d0ec 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -172,7 +172,7 @@ static void cvm_oct_configure_common_hw(void)
>   */
>  int cvm_oct_free_work(void *work_queue_entry)
>  {
> -	cvmx_wqe_t *work = work_queue_entry;
> +	struct cvmx_wqe_t *work = work_queue_entry;
>
>  	int segments = work->word2.s.bufs;
>  	union cvmx_buf_ptr segment_ptr = work->packet_ptr;
> diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
> index b2e3c72205dd..fd7522f70f7e 100644
> --- a/drivers/staging/octeon/octeon-stubs.h
> +++ b/drivers/staging/octeon/octeon-stubs.h
> @@ -183,13 +183,13 @@ union cvmx_buf_ptr {
>  	} s;
>  };
>
> -typedef struct {
> +struct cvmx_wqe_t {
>  	union cvmx_wqe_word0 word0;
>  	union cvmx_wqe_word1 word1;
>  	union cvmx_pip_wqe_word2 word2;
>  	union cvmx_buf_ptr packet_ptr;
>  	uint8_t packet_data[96];
> -} cvmx_wqe_t;
> +};
>
>  typedef union {
>  	uint64_t u64;
> @@ -1198,7 +1198,7 @@ static inline uint64_t cvmx_scratch_read64(uint64_t address)
>  static inline void cvmx_scratch_write64(uint64_t address, uint64_t value)
>  { }
>
> -static inline int cvmx_wqe_get_grp(cvmx_wqe_t *work)
> +static inline int cvmx_wqe_get_grp(struct cvmx_wqe_t *work)
>  {
>  	return 0;
>  }
> @@ -1345,14 +1345,14 @@ static inline void cvmx_pow_work_request_async(int scr_addr,
>  						       cvmx_pow_wait_t wait)
>  { }
>
> -static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
> +static inline struct cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr)
>  {
> -	cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
> +	struct cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr;
>
>  	return wqe;
>  }
>
> -static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
> +static inline struct cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
>  {
>  	return (void *)(unsigned long)wait;
>  }
> @@ -1390,21 +1390,21 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port,
>  	return ret;
>  }
>
> -static inline void cvmx_wqe_set_port(cvmx_wqe_t *work, int port)
> +static inline void cvmx_wqe_set_port(struct cvmx_wqe_t *work, int port)
>  { }
>
> -static inline void cvmx_wqe_set_qos(cvmx_wqe_t *work, int qos)
> +static inline void cvmx_wqe_set_qos(struct cvmx_wqe_t *work, int qos)
>  { }
>
> -static inline int cvmx_wqe_get_qos(cvmx_wqe_t *work)
> +static inline int cvmx_wqe_get_qos(struct cvmx_wqe_t *work)
>  {
>  	return 0;
>  }
>
> -static inline void cvmx_wqe_set_grp(cvmx_wqe_t *work, int grp)
> +static inline void cvmx_wqe_set_grp(struct cvmx_wqe_t *work, int grp)
>  { }
>
> -static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag,
> +static inline void cvmx_pow_work_submit(struct cvmx_wqe_t *wqp, uint32_t tag,
>  					enum cvmx_pow_tag_type tag_type,
>  					uint64_t qos, uint64_t grp)
>  { }
> --
> 2.23.0
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1b16bc880fee5711f96ed82741f8268e4dac1ae6.1570773209.git.wambui.karugax%40gmail.com.
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [Outreachy kernel] [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
  2019-10-11  6:18     ` Julia Lawall
@ 2019-10-11  8:59       ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  8:59 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel, gregkh, devel, linux-kernel

On Fri, Oct 11, 2019 at 08:18:25AM +0200, Julia Lawall wrote:
> 
> 
> On Fri, 11 Oct 2019, Wambui Karuga wrote:
> 
> > Remove typedef declaration from struct cvmx_wqe_t in
> 
> You can remove the _t from the name as well.
Should I remove the _t from all the enums/structs?
> 
> > drivers/staging/octeon/octeon-stubs.h.
> 
> It's not really necessary to give the name of the file in the log message,
> as it can easily be seen below.
> 
> julia
> 
Okay, thought it would be clearer for the commit messages/git log.
Thanks


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

* Re: [Outreachy kernel] [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
@ 2019-10-11  8:59       ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  8:59 UTC (permalink / raw)
  To: Julia Lawall; +Cc: devel, outreachy-kernel, linux-kernel, gregkh

On Fri, Oct 11, 2019 at 08:18:25AM +0200, Julia Lawall wrote:
> 
> 
> On Fri, 11 Oct 2019, Wambui Karuga wrote:
> 
> > Remove typedef declaration from struct cvmx_wqe_t in
> 
> You can remove the _t from the name as well.
Should I remove the _t from all the enums/structs?
> 
> > drivers/staging/octeon/octeon-stubs.h.
> 
> It's not really necessary to give the name of the file in the log message,
> as it can easily be seen below.
> 
> julia
> 
Okay, thought it would be clearer for the commit messages/git log.
Thanks
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/5] Remove declarations of new typedef in
  2019-10-11  6:02 ` Wambui Karuga
@ 2019-10-11  9:01   ` Greg KH
  -1 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2019-10-11  9:01 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: outreachy-kernel, devel, linux-kernel

On Fri, Oct 11, 2019 at 09:02:37AM +0300, Wambui Karuga wrote:
> This patchset removes various typedef declarations of new data types
> in drivers/staging/octeon/octeon-stubs.h.
> The series also changes their old uses with the new declaration
> format.

The subject line of this email seems to be lacking something :)

thanks,

greg k-h


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

* Re: [PATCH 0/5] Remove declarations of new typedef in
@ 2019-10-11  9:01   ` Greg KH
  0 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2019-10-11  9:01 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: devel, outreachy-kernel, linux-kernel

On Fri, Oct 11, 2019 at 09:02:37AM +0300, Wambui Karuga wrote:
> This patchset removes various typedef declarations of new data types
> in drivers/staging/octeon/octeon-stubs.h.
> The series also changes their old uses with the new declaration
> format.

The subject line of this email seems to be lacking something :)

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t
  2019-10-11  6:02   ` Wambui Karuga
@ 2019-10-11  9:02     ` Greg KH
  -1 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2019-10-11  9:02 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: outreachy-kernel, devel, linux-kernel

On Fri, Oct 11, 2019 at 09:02:39AM +0300, Wambui Karuga wrote:
> -typedef union {
> +union cvmx_helper_link_info_t {

I agree with Julia, all of the "_t" needs to be dropped as that is
pointless.  It's a holdover from the original name where "_t" was trying
to say that this is a typedef.  Gotta love abuse of hungarian notation
:(

Please redo this patch series and resend.

thanks,

greg k-h


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

* Re: [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t
@ 2019-10-11  9:02     ` Greg KH
  0 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2019-10-11  9:02 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: devel, outreachy-kernel, linux-kernel

On Fri, Oct 11, 2019 at 09:02:39AM +0300, Wambui Karuga wrote:
> -typedef union {
> +union cvmx_helper_link_info_t {

I agree with Julia, all of the "_t" needs to be dropped as that is
pointless.  It's a holdover from the original name where "_t" was trying
to say that this is a typedef.  Gotta love abuse of hungarian notation
:(

Please redo this patch series and resend.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/5] Remove declarations of new typedef in
  2019-10-11  9:01   ` Greg KH
@ 2019-10-11  9:24     ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  9:24 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel, devel, linux-kernel

On Fri, Oct 11, 2019 at 11:01:00AM +0200, Greg KH wrote:
> On Fri, Oct 11, 2019 at 09:02:37AM +0300, Wambui Karuga wrote:
> > This patchset removes various typedef declarations of new data types
> > in drivers/staging/octeon/octeon-stubs.h.
> > The series also changes their old uses with the new declaration
> > format.
> 
> The subject line of this email seems to be lacking something :)
> 
> thanks,
> 
> greg k-h
The ending of this sentence seems to have been cut-off. Sorry!

Thanks.
Wambui Karuga


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

* Re: [PATCH 0/5] Remove declarations of new typedef in
@ 2019-10-11  9:24     ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  9:24 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, outreachy-kernel, linux-kernel

On Fri, Oct 11, 2019 at 11:01:00AM +0200, Greg KH wrote:
> On Fri, Oct 11, 2019 at 09:02:37AM +0300, Wambui Karuga wrote:
> > This patchset removes various typedef declarations of new data types
> > in drivers/staging/octeon/octeon-stubs.h.
> > The series also changes their old uses with the new declaration
> > format.
> 
> The subject line of this email seems to be lacking something :)
> 
> thanks,
> 
> greg k-h
The ending of this sentence seems to have been cut-off. Sorry!

Thanks.
Wambui Karuga
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t
  2019-10-11  9:02     ` Greg KH
@ 2019-10-11  9:26       ` Wambui Karuga
  -1 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  9:26 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel, devel, linux-kernel, Julia Lawall

On Fri, Oct 11, 2019 at 11:02:13AM +0200, Greg KH wrote:
> On Fri, Oct 11, 2019 at 09:02:39AM +0300, Wambui Karuga wrote:
> > -typedef union {
> > +union cvmx_helper_link_info_t {
> 
> I agree with Julia, all of the "_t" needs to be dropped as that is
> pointless.  It's a holdover from the original name where "_t" was trying
> to say that this is a typedef.  Gotta love abuse of hungarian notation
> :(
> 
> Please redo this patch series and resend.
> 
Great, I'll send an updated patch.
Thanks,
Wambui


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

* Re: [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t
@ 2019-10-11  9:26       ` Wambui Karuga
  0 siblings, 0 replies; 26+ messages in thread
From: Wambui Karuga @ 2019-10-11  9:26 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, outreachy-kernel, linux-kernel, Julia Lawall

On Fri, Oct 11, 2019 at 11:02:13AM +0200, Greg KH wrote:
> On Fri, Oct 11, 2019 at 09:02:39AM +0300, Wambui Karuga wrote:
> > -typedef union {
> > +union cvmx_helper_link_info_t {
> 
> I agree with Julia, all of the "_t" needs to be dropped as that is
> pointless.  It's a holdover from the original name where "_t" was trying
> to say that this is a typedef.  Gotta love abuse of hungarian notation
> :(
> 
> Please redo this patch series and resend.
> 
Great, I'll send an updated patch.
Thanks,
Wambui
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [Outreachy kernel] [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
  2019-10-11  8:59       ` Wambui Karuga
@ 2019-10-11 10:58         ` Dan Carpenter
  -1 siblings, 0 replies; 26+ messages in thread
From: Dan Carpenter @ 2019-10-11 10:58 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: Julia Lawall, devel, outreachy-kernel, linux-kernel, gregkh

On Fri, Oct 11, 2019 at 11:59:52AM +0300, Wambui Karuga wrote:
> On Fri, Oct 11, 2019 at 08:18:25AM +0200, Julia Lawall wrote:
> > 
> > 
> > On Fri, 11 Oct 2019, Wambui Karuga wrote:
> > 
> > > Remove typedef declaration from struct cvmx_wqe_t in
> > 
> > You can remove the _t from the name as well.
> Should I remove the _t from all the enums/structs?

The _t means typedef (sort of, generally).

regards,
dan carpenter



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

* Re: [Outreachy kernel] [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t
@ 2019-10-11 10:58         ` Dan Carpenter
  0 siblings, 0 replies; 26+ messages in thread
From: Dan Carpenter @ 2019-10-11 10:58 UTC (permalink / raw)
  To: Wambui Karuga; +Cc: devel, Julia Lawall, gregkh, linux-kernel, outreachy-kernel

On Fri, Oct 11, 2019 at 11:59:52AM +0300, Wambui Karuga wrote:
> On Fri, Oct 11, 2019 at 08:18:25AM +0200, Julia Lawall wrote:
> > 
> > 
> > On Fri, 11 Oct 2019, Wambui Karuga wrote:
> > 
> > > Remove typedef declaration from struct cvmx_wqe_t in
> > 
> > You can remove the _t from the name as well.
> Should I remove the _t from all the enums/structs?

The _t means typedef (sort of, generally).

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2019-10-11 10:58 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11  6:02 [PATCH 0/5] Remove declarations of new typedef in Wambui Karuga
2019-10-11  6:02 ` Wambui Karuga
2019-10-11  6:02 ` [PATCH 1/5] staging: octeon: remove typedef declaration for cvmx_wqe_t Wambui Karuga
2019-10-11  6:02   ` Wambui Karuga
2019-10-11  6:18   ` [Outreachy kernel] " Julia Lawall
2019-10-11  6:18     ` Julia Lawall
2019-10-11  8:59     ` Wambui Karuga
2019-10-11  8:59       ` Wambui Karuga
2019-10-11 10:58       ` Dan Carpenter
2019-10-11 10:58         ` Dan Carpenter
2019-10-11  6:02 ` [PATCH 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t Wambui Karuga
2019-10-11  6:02   ` Wambui Karuga
2019-10-11  9:02   ` Greg KH
2019-10-11  9:02     ` Greg KH
2019-10-11  9:26     ` Wambui Karuga
2019-10-11  9:26       ` Wambui Karuga
2019-10-11  6:02 ` [PATCH 3/5] staging: octeon: remove typedef declaration for cvmx_fau_reg_32_t Wambui Karuga
2019-10-11  6:02   ` Wambui Karuga
2019-10-11  6:02 ` [PATCH 4/5] staging: octeon: remove typedef declartion for cvmx_pko_command_word0_t Wambui Karuga
2019-10-11  6:02   ` Wambui Karuga
2019-10-11  6:02 ` [PATCH 5/5] staging: octeon: remove typedef declaration for cvmx_fau_op_size_t Wambui Karuga
2019-10-11  6:02   ` Wambui Karuga
2019-10-11  9:01 ` [PATCH 0/5] Remove declarations of new typedef in Greg KH
2019-10-11  9:01   ` Greg KH
2019-10-11  9:24   ` Wambui Karuga
2019-10-11  9:24     ` Wambui Karuga

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.