mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: ozwpan: Remove unneeded variable initializer
@ 2013-08-15 11:00 Rupesh Gujare
  2013-08-15 11:00 ` [PATCH 2/2] staging: ozwpan: Remove extra variable Rupesh Gujare
  0 siblings, 1 reply; 2+ messages in thread
From: Rupesh Gujare @ 2013-08-15 11:00 UTC (permalink / raw)
  To: devel; +Cc: linux-usb, linux-kernel, gregkh

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

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
 drivers/staging/ozwpan/ozhcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 4cd08da..9a374fd 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -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;
 
-- 
1.7.9.5


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

* [PATCH 2/2] staging: ozwpan: Remove extra variable.
  2013-08-15 11:00 [PATCH 1/2] staging: ozwpan: Remove unneeded variable initializer Rupesh Gujare
@ 2013-08-15 11:00 ` Rupesh Gujare
  0 siblings, 0 replies; 2+ messages in thread
From: Rupesh Gujare @ 2013-08-15 11:00 UTC (permalink / raw)
  To: devel; +Cc: linux-usb, linux-kernel, gregkh

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

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
---
 drivers/staging/ozwpan/ozhcd.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 9a374fd..2b67107 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -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;
-- 
1.7.9.5


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

end of thread, other threads:[~2013-08-15 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15 11:00 [PATCH 1/2] staging: ozwpan: Remove unneeded variable initializer Rupesh Gujare
2013-08-15 11:00 ` [PATCH 2/2] staging: ozwpan: Remove extra variable Rupesh Gujare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®