Skip to contentSkip to conversation

usb: mtu3: declare functions static

PATCH In review Sudip Mukherjee 2 participants 2 messages Nov 13, 2016 – Nov 14, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: mtu3: declare functions static

The only user of the functions mtu3_irq() and gpd_ring_empty() are in the same file. They can be declared as static.

---
 drivers/usb/mtu3/mtu3_core.c | 2 +-
 drivers/usb/mtu3/mtu3_qmu.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/mtu3/mtu3_core.c +1 -1
index 520e55a..603b7f84 100644
@@ -696,7 +696,7 @@ static irqreturn_t mtu3_u2_common_isr(struct mtu3 *mtu)
 	return IRQ_HANDLED;
 }
 
-irqreturn_t mtu3_irq(int irq, void *data)
+static irqreturn_t mtu3_irq(int irq, void *data)
 {
 	struct mtu3 *mtu = (struct mtu3 *)data;
 	unsigned long flags;
drivers/usb/mtu3/mtu3_qmu.c +1 -1
index a6dd292..7d9ba8a 100644
@@ -168,7 +168,7 @@ static struct qmu_gpd *advance_deq_gpd(struct mtu3_gpd_ring *ring)
 }
 
 /* check if a ring is emtpy */
-int gpd_ring_empty(struct mtu3_gpd_ring *ring)
+static int gpd_ring_empty(struct mtu3_gpd_ring *ring)
 {
 	struct qmu_gpd *enq = ring->enqueue;
 	struct qmu_gpd *next;
Signature · 1 line
1.9.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 27 lines · Sudip Mukherjee

The only user of the functions mtu3_irq() and gpd_ring_empty() are in the same file. They can be declared as static.

---
 drivers/usb/mtu3/mtu3_core.c | 2 +-
 drivers/usb/mtu3/mtu3_qmu.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/mtu3/mtu3_core.c +1 -1
index 520e55a..603b7f84 100644
@@ -696,7 +696,7 @@ static irqreturn_t mtu3_u2_common_isr(struct mtu3 *mtu)
 	return IRQ_HANDLED;
 }
 
-irqreturn_t mtu3_irq(int irq, void *data)
+static irqreturn_t mtu3_irq(int irq, void *data)
 {
 	struct mtu3 *mtu = (struct mtu3 *)data;
 	unsigned long flags;
drivers/usb/mtu3/mtu3_qmu.c +0 -0
index a6dd292..7d9ba8a 100644

drivers/usb/mtu3/mtu3_qmu.c static struct qmu_gpd *advance_deq_gpd(struct mtu3_gpd_ring *ring) · line 174

Quoted 8 lines
drivers/usb/mtu3/mtu3_qmu.c +1 -1
@@ -168,7 +168,7 @@ static struct qmu_gpd *advance_deq_gpd(struct mtu3_gpd_ring *ring)
 }
 
 /* check if a ring is emtpy */
-int gpd_ring_empty(struct mtu3_gpd_ring *ring)
+static int gpd_ring_empty(struct mtu3_gpd_ring *ring)
 {
 	struct qmu_gpd *enq = ring->enqueue;
 	struct qmu_gpd *next;

It's my carelessness.

Thanks