All of lore.kernel.org
 help / color / mirror / Atom feed
From: dev.dragon@bk.ru
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Dmitrii Wolf <dev.dragon@bk.ru>
Subject: [PATCH] Staging: wimax: i2400m: fixing several coding style issues.
Date: Sun, 31 Jan 2021 23:42:50 +0300	[thread overview]
Message-ID: <20210131204250.112299-1-dev.dragon@bk.ru> (raw)

From: Dmitrii Wolf <dev.dragon@bk.ru>

Fixed a coding style issues.

Signed-off-by: Dmitrii Wolf <dev.dragon@bk.ru>
---
 drivers/staging/wimax/i2400m/debugfs.c |  2 +-
 drivers/staging/wimax/i2400m/netdev.c  |  2 +-
 drivers/staging/wimax/i2400m/rx.c      | 23 +++++++++++------------
 drivers/staging/wimax/i2400m/usb.c     |  2 +-
 4 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wimax/i2400m/debugfs.c b/drivers/staging/wimax/i2400m/debugfs.c
index 1c640b41ea4c..4e6e1e3f015e 100644
--- a/drivers/staging/wimax/i2400m/debugfs.c
+++ b/drivers/staging/wimax/i2400m/debugfs.c
@@ -170,7 +170,7 @@ int debugfs_i2400m_reset_set(void *data, u64 val)
 	int result;
 	struct i2400m *i2400m = data;
 	enum i2400m_reset_type rt = val;
-	switch(rt) {
+	switch (rt) {
 	case I2400M_RT_WARM:
 	case I2400M_RT_COLD:
 	case I2400M_RT_BUS:
diff --git a/drivers/staging/wimax/i2400m/netdev.c b/drivers/staging/wimax/i2400m/netdev.c
index 8339d600e77b..0895a2e441d3 100644
--- a/drivers/staging/wimax/i2400m/netdev.c
+++ b/drivers/staging/wimax/i2400m/netdev.c
@@ -523,7 +523,7 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb,
 
 	d_fnstart(2, dev, "(i2400m %p skb %p [%u] cs %d)\n",
 		  i2400m, skb, skb->len, cs);
-	switch(cs) {
+	switch (cs) {
 	case I2400M_CS_IPV4_0:
 	case I2400M_CS_IPV4:
 		i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev,
diff --git a/drivers/staging/wimax/i2400m/rx.c b/drivers/staging/wimax/i2400m/rx.c
index c9fb619a9e01..807bd3db69e9 100644
--- a/drivers/staging/wimax/i2400m/rx.c
+++ b/drivers/staging/wimax/i2400m/rx.c
@@ -485,8 +485,7 @@ struct i2400m_roq_data {
  * store the sequence number (sn) and the cs (packet type) coming from
  * the RX payload header from the device.
  */
-struct i2400m_roq
-{
+struct i2400m_roq {
 	unsigned ws;
 	struct sk_buff_head queue;
 	struct i2400m_roq_log *log;
@@ -556,7 +555,7 @@ void i2400m_roq_log_entry_print(struct i2400m *i2400m, unsigned index,
 {
 	struct device *dev = i2400m_dev(i2400m);
 
-	switch(e->type) {
+	switch (e->type) {
 	case I2400M_RO_TYPE_RESET:
 		dev_err(dev, "q#%d reset           ws %u cnt %u sn %u/%u"
 			" - new nws %u\n",
@@ -764,9 +763,9 @@ unsigned __i2400m_roq_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
 				 new_nws);
 			__skb_unlink(skb_itr, &roq->queue);
 			i2400m_net_erx(i2400m, skb_itr, roq_data_itr->cs);
-		}
-		else
+		} else {
 			break;	/* rest of packets all nsn_itr > nws */
+		}
 	}
 	roq->ws = sn;
 	return new_nws;
@@ -819,7 +818,7 @@ void i2400m_roq_reset(struct i2400m *i2400m, struct i2400m_roq *roq)
  */
 static
 void i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq,
-		      struct sk_buff * skb, unsigned lbn)
+		struct sk_buff *skb, unsigned lbn)
 {
 	struct device *dev = i2400m_dev(i2400m);
 	unsigned nsn, len;
@@ -882,7 +881,7 @@ void i2400m_roq_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
  */
 static
 void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
-				struct sk_buff * skb, unsigned sn)
+		struct sk_buff *skb, unsigned sn)
 {
 	struct device *dev = i2400m_dev(i2400m);
 	unsigned nsn, old_ws, len;
@@ -1046,7 +1045,7 @@ void i2400m_rx_edata(struct i2400m *i2400m, struct sk_buff *skb_rx,
 			 ro_type, ro_cin, roq->ws, ro_sn,
 			 __i2400m_roq_nsn(roq, ro_sn), size);
 		d_dump(2, dev, payload, size);
-		switch(ro_type) {
+		switch (ro_type) {
 		case I2400M_RO_TYPE_RESET:
 			i2400m_roq_reset(i2400m, roq);
 			kfree_skb(skb);	/* no data here */
@@ -1068,9 +1067,9 @@ void i2400m_rx_edata(struct i2400m *i2400m, struct sk_buff *skb_rx,
 		spin_lock_irqsave(&i2400m->rx_lock, flags);
 		kref_put(&i2400m->rx_roq_refcount, i2400m_rx_roq_destroy);
 		spin_unlock_irqrestore(&i2400m->rx_lock, flags);
-	}
-	else
+	} else {
 		i2400m_net_erx(i2400m, skb, cs);
+	}
 error_skb_clone:
 error:
 	d_fnend(2, dev, "(i2400m %p skb_rx %p single %u payload %p "
@@ -1346,7 +1345,7 @@ int i2400m_rx_setup(struct i2400m *i2400m)
 {
 	int result = 0;
 
-	i2400m->rx_reorder = i2400m_rx_reorder_disabled? 0 : 1;
+	i2400m->rx_reorder = i2400m_rx_reorder_disabled ? 0 : 1;
 	if (i2400m->rx_reorder) {
 		unsigned itr;
 		struct i2400m_roq_log *rd;
@@ -1365,7 +1364,7 @@ int i2400m_rx_setup(struct i2400m *i2400m)
 			goto error_roq_log_alloc;
 		}
 
-		for(itr = 0; itr < I2400M_RO_CIN + 1; itr++) {
+		for (itr = 0; itr < I2400M_RO_CIN + 1; itr++) {
 			__i2400m_roq_init(&i2400m->rx_roq[itr]);
 			i2400m->rx_roq[itr].log = &rd[itr];
 		}
diff --git a/drivers/staging/wimax/i2400m/usb.c b/drivers/staging/wimax/i2400m/usb.c
index f250d03ce7c7..3bb8c32414c2 100644
--- a/drivers/staging/wimax/i2400m/usb.c
+++ b/drivers/staging/wimax/i2400m/usb.c
@@ -327,7 +327,7 @@ int i2400mu_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt)
 }
 
 static void i2400mu_get_drvinfo(struct net_device *net_dev,
-                                struct ethtool_drvinfo *info)
+		struct ethtool_drvinfo *info)
 {
 	struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
 	struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m);
-- 
2.25.1


             reply	other threads:[~2021-01-31 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31 20:42 dev.dragon [this message]
2021-02-01  4:16 ` [PATCH] Staging: wimax: i2400m: fixing several coding style issues Joe Perches
2021-02-07 19:11   ` [96e8740] [PATCH 2/2] Staging: wimax: i2400m: some readability improvements dev.dragon
2021-02-08  6:49     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210131204250.112299-1-dev.dragon@bk.ru \
    --to=dev.dragon@bk.ru \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.