Skip to content

Commit

Permalink
can: gw: Remove pointless casts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Graf authored and Marc Kleine-Budde committed Jul 10, 2012
1 parent 1da0faa commit 5d91efa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/can/gw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 5d91efa

Please sign in to comment.