Skip to contentSkip to conversation

Staging: dgnc: Remove useless type conversion

PATCH New Bhumika Goyal 1 participant 1 message Oct 8, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: dgnc: Remove useless type conversion

Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle:

@@
type t;
t *p;
t a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)

---
 drivers/staging/dgnc/dgnc_mgmt.c | 4 ++--
 drivers/staging/dgnc/dgnc_neo.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/dgnc/dgnc_mgmt.c +2 -2
index 683c098..ecfd1df 100644
@@ -143,8 +143,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		di.info_bdtype = dgnc_board[brd]->dpatype;
 		di.info_bdstate = dgnc_board[brd]->dpastatus;
 		di.info_ioport = 0;
-		di.info_physaddr = (ulong)dgnc_board[brd]->membase;
-		di.info_physsize = (ulong)dgnc_board[brd]->membase
+		di.info_physaddr = dgnc_board[brd]->membase;
+		di.info_physsize = dgnc_board[brd]->membase
 			- dgnc_board[brd]->membase_end;
 		if (dgnc_board[brd]->state != BOARD_FAILED)
 			di.info_nports = dgnc_board[brd]->nasync;
drivers/staging/dgnc/dgnc_neo.c +1 -1
index 5becb37..c6b2c37 100644
@@ -1267,7 +1267,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
 
 		memcpy_fromio(ch->ch_rqueue + head,
 			      &ch->ch_neo_uart->txrxburst, 1);
-		ch->ch_equeue[head] = (unsigned char)linestatus;
+		ch->ch_equeue[head] = linestatus;
 
 		/* Ditch any remaining linestatus value. */
 		linestatus = 0;
Signature · 1 line
1.9.1