Skip to contentSkip to conversation

staging: ozwpan: Remove unneeded variable initializer

PATCH New Rupesh Gujare 1 participant 2 messages Aug 15, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: ozwpan: Remove unneeded variable initializer

We are assigning value to hport before returning, there is no need to initialize it.

---
 drivers/staging/ozwpan/ozhcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ozwpan/ozhcd.c +1 -1
index 4cd08da..9a374fd 100644
@@ -663,7 +663,7 @@ static inline void oz_hcd_put(struct oz_hcd *ozhcd)
 struct oz_port *oz_hcd_pd_arrived(void *hpd)
 {
 	int i;
-	struct oz_port *hport = NULL;
+	struct oz_port *hport;
 	struct oz_hcd *ozhcd;
 	struct oz_endpoint *ep;
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 staging: ozwpan: Remove extra variable.

We should not use extra variable just to copy pointer value, renaming parameter name serves pupose & removes extra variable.

---
 drivers/staging/ozwpan/ozhcd.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ozwpan/ozhcd.c +1 -2
index 9a374fd..2b67107 100644
@@ -720,9 +720,8 @@ err_put:
  * polled. We release the reference we hold on the PD.
  * Context: softirq
  */
-void oz_hcd_pd_departed(struct oz_port *hport)
+void oz_hcd_pd_departed(struct oz_port *port)
 {
-	struct oz_port *port = hport;
 	struct oz_hcd *ozhcd;
 	void *hpd;
 	struct oz_endpoint *ep = NULL;
Signature · 1 line
1.7.9.5