Patchwork [U-Boot,2/2] serial: arm_dcc: Fix compilation warning and remove unneeded initialization

login
register
mail settings
Submitter Michal Simek
Date Jan. 23, 2013, 9:40 a.m.
Message ID <1358934007-14928-3-git-send-email-michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/214867/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Michal Simek - Jan. 23, 2013, 9:40 a.m.
- arm_dcc_dev is already initialized.
- Remove unused rc variable
Warning log:
arm_dcc.c: In function 'drv_arm_dcc_init':
arm_dcc.c:145:6: warning: unused variable 'rc' [-Wunused-variable]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/serial/arm_dcc.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
Marek Vasut - Jan. 26, 2013, 5:44 a.m.
Dear Michal Simek,

> - arm_dcc_dev is already initialized.
> - Remove unused rc variable
> Warning log:
> arm_dcc.c: In function 'drv_arm_dcc_init':
> arm_dcc.c:145:6: warning: unused variable 'rc' [-Wunused-variable]
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

Patch

diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c
index 812dcf0..c217c88 100644
--- a/drivers/serial/arm_dcc.c
+++ b/drivers/serial/arm_dcc.c
@@ -142,11 +142,6 @@  static struct stdio_dev arm_dcc_dev;
 
 int drv_arm_dcc_init(void)
 {
-	int rc;
-
-	/* Device initialization */
-	memset(&arm_dcc_dev, 0, sizeof(arm_dcc_dev));
-
 	strcpy(arm_dcc_dev.name, "dcc");
 	arm_dcc_dev.ext = 0;	/* No extensions */
 	arm_dcc_dev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_OUTPUT;