]> Pileus Git - ~andy/linux/commitdiff
can: gw: Remove pointless casts
authorThomas Graf <tgraf@suug.ch>
Thu, 5 Jul 2012 12:19:58 +0000 (14:19 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 10 Jul 2012 20:36:17 +0000 (22:36 +0200)
No need to cast return value of nla_data()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/gw.c

index 20c36e10ce8586095082d5f0e53c4b9ccf1e20ff..b54d5e695b034b8abbd3c0dc083fc74c5d1cf15e 100644 (file)
@@ -661,8 +661,7 @@ static int cgw_parse_attr(struct nlmsghdr *nlh, struct cf_mod *mod,
        if (modidx) {
 
                if (tb[CGW_CS_CRC8]) {
-                       struct cgw_csum_crc8 *c = (struct cgw_csum_crc8 *)\
-                               nla_data(tb[CGW_CS_CRC8]);
+                       struct cgw_csum_crc8 *c = nla_data(tb[CGW_CS_CRC8]);
 
                        err = cgw_chk_csum_parms(c->from_idx, c->to_idx,
                                                 c->result_idx);
@@ -686,8 +685,7 @@ static int cgw_parse_attr(struct nlmsghdr *nlh, struct cf_mod *mod,
                }
 
                if (tb[CGW_CS_XOR]) {
-                       struct cgw_csum_xor *c = (struct cgw_csum_xor *)\
-                               nla_data(tb[CGW_CS_XOR]);
+                       struct cgw_csum_xor *c = nla_data(tb[CGW_CS_XOR]);
 
                        err = cgw_chk_csum_parms(c->from_idx, c->to_idx,
                                                 c->result_idx);