aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-06-04 08:44:18 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-06 12:31:33 -0400
commitc2fd03a0115a244c5f622453b2b1f038ed5700a6 (patch)
tree55c6a15e0ab898f15b08dfe4dcba4db55dc2af9b /drivers/net/irda
parent2c208890c6d4e16076c6664137703ec813e8fa6c (diff)
drivers: net: Remove casts to same type
Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r--drivers/net/irda/ali-ircc.c6
-rw-r--r--drivers/net/irda/au1k_ir.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index dcc80d652b78..84872043b5c6 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -1017,7 +1017,7 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
1017{ 1017{
1018 1018
1019 int iobase; 1019 int iobase;
1020 struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv; 1020 struct ali_ircc_cb *self = priv;
1021 struct net_device *dev; 1021 struct net_device *dev;
1022 1022
1023 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); 1023 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
@@ -1052,7 +1052,7 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
1052 */ 1052 */
1053static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed) 1053static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
1054{ 1054{
1055 struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv; 1055 struct ali_ircc_cb *self = priv;
1056 unsigned long flags; 1056 unsigned long flags;
1057 int iobase; 1057 int iobase;
1058 int fcr; /* FIFO control reg */ 1058 int fcr; /* FIFO control reg */
@@ -1121,7 +1121,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
1121static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) 1121static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
1122{ 1122{
1123 1123
1124 struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv; 1124 struct ali_ircc_cb *self = priv;
1125 int iobase,dongle_id; 1125 int iobase,dongle_id;
1126 int tmp = 0; 1126 int tmp = 0;
1127 1127
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index fc503aa5288e..e09417df8f39 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -794,7 +794,7 @@ static int __devinit au1k_irda_net_init(struct net_device *dev)
794 794
795 /* allocate the data buffers */ 795 /* allocate the data buffers */
796 aup->db[0].vaddr = 796 aup->db[0].vaddr =
797 (void *)dma_alloc(MAX_BUF_SIZE * 2 * NUM_IR_DESC, &temp); 797 dma_alloc(MAX_BUF_SIZE * 2 * NUM_IR_DESC, &temp);
798 if (!aup->db[0].vaddr) 798 if (!aup->db[0].vaddr)
799 goto out3; 799 goto out3;
800 800