mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-04 10:09:06 +00:00
can: gw: remove unnecessary blank lines, add suggested blank lines
This patch removes unnecessary blank lines, and adds suggested ones, so that checkpatch doesn't complain anymore. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
465c0deb10
commit
f62564f5e3
15
net/can/gw.c
15
net/can/gw.c
@ -111,7 +111,6 @@ struct cf_mod {
|
|||||||
u32 uid;
|
u32 uid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* So far we just support CAN -> CAN routing and frame modifications.
|
/* So far we just support CAN -> CAN routing and frame modifications.
|
||||||
*
|
*
|
||||||
* The internal can_can_gw structure contains data and attributes for
|
* The internal can_can_gw structure contains data and attributes for
|
||||||
@ -268,7 +267,6 @@ static void cgw_csum_crc8_rel(struct can_frame *cf, struct cgw_csum_crc8 *crc8)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (crc8->profile) {
|
switch (crc8->profile) {
|
||||||
|
|
||||||
case CGW_CRC8PRF_1U8:
|
case CGW_CRC8PRF_1U8:
|
||||||
crc = crc8->crctab[crc^crc8->profile_data[0]];
|
crc = crc8->crctab[crc^crc8->profile_data[0]];
|
||||||
break;
|
break;
|
||||||
@ -281,7 +279,6 @@ static void cgw_csum_crc8_rel(struct can_frame *cf, struct cgw_csum_crc8 *crc8)
|
|||||||
crc = crc8->crctab[crc^(cf->can_id & 0xFF)^
|
crc = crc8->crctab[crc^(cf->can_id & 0xFF)^
|
||||||
(cf->can_id >> 8 & 0xFF)];
|
(cf->can_id >> 8 & 0xFF)];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cf->data[crc8->result_idx] = crc^crc8->final_xor_val;
|
cf->data[crc8->result_idx] = crc^crc8->final_xor_val;
|
||||||
@ -296,7 +293,6 @@ static void cgw_csum_crc8_pos(struct can_frame *cf, struct cgw_csum_crc8 *crc8)
|
|||||||
crc = crc8->crctab[crc^cf->data[i]];
|
crc = crc8->crctab[crc^cf->data[i]];
|
||||||
|
|
||||||
switch (crc8->profile) {
|
switch (crc8->profile) {
|
||||||
|
|
||||||
case CGW_CRC8PRF_1U8:
|
case CGW_CRC8PRF_1U8:
|
||||||
crc = crc8->crctab[crc^crc8->profile_data[0]];
|
crc = crc8->crctab[crc^crc8->profile_data[0]];
|
||||||
break;
|
break;
|
||||||
@ -323,7 +319,6 @@ static void cgw_csum_crc8_neg(struct can_frame *cf, struct cgw_csum_crc8 *crc8)
|
|||||||
crc = crc8->crctab[crc^cf->data[i]];
|
crc = crc8->crctab[crc^cf->data[i]];
|
||||||
|
|
||||||
switch (crc8->profile) {
|
switch (crc8->profile) {
|
||||||
|
|
||||||
case CGW_CRC8PRF_1U8:
|
case CGW_CRC8PRF_1U8:
|
||||||
crc = crc8->crctab[crc^crc8->profile_data[0]];
|
crc = crc8->crctab[crc^crc8->profile_data[0]];
|
||||||
break;
|
break;
|
||||||
@ -478,14 +473,12 @@ static int cgw_notifier(struct notifier_block *nb,
|
|||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
|
|
||||||
if (msg == NETDEV_UNREGISTER) {
|
if (msg == NETDEV_UNREGISTER) {
|
||||||
|
|
||||||
struct cgw_job *gwj = NULL;
|
struct cgw_job *gwj = NULL;
|
||||||
struct hlist_node *nx;
|
struct hlist_node *nx;
|
||||||
|
|
||||||
ASSERT_RTNL();
|
ASSERT_RTNL();
|
||||||
|
|
||||||
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
|
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
|
||||||
|
|
||||||
if (gwj->src.dev == dev || gwj->dst.dev == dev) {
|
if (gwj->src.dev == dev || gwj->dst.dev == dev) {
|
||||||
hlist_del(&gwj->list);
|
hlist_del(&gwj->list);
|
||||||
cgw_unregister_filter(net, gwj);
|
cgw_unregister_filter(net, gwj);
|
||||||
@ -583,7 +576,6 @@ static int cgw_put_job(struct sk_buff *skb, struct cgw_job *gwj, int type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gwj->gwtype == CGW_TYPE_CAN_CAN) {
|
if (gwj->gwtype == CGW_TYPE_CAN_CAN) {
|
||||||
|
|
||||||
if (gwj->ccgw.filter.can_id || gwj->ccgw.filter.can_mask) {
|
if (gwj->ccgw.filter.can_id || gwj->ccgw.filter.can_mask) {
|
||||||
if (nla_put(skb, CGW_FILTER, sizeof(struct can_filter),
|
if (nla_put(skb, CGW_FILTER, sizeof(struct can_filter),
|
||||||
&gwj->ccgw.filter) < 0)
|
&gwj->ccgw.filter) < 0)
|
||||||
@ -737,7 +729,6 @@ static int cgw_parse_attr(struct nlmsghdr *nlh, struct cf_mod *mod,
|
|||||||
|
|
||||||
/* check for checksum operations after CAN frame modifications */
|
/* check for checksum operations after CAN frame modifications */
|
||||||
if (modidx) {
|
if (modidx) {
|
||||||
|
|
||||||
if (tb[CGW_CS_CRC8]) {
|
if (tb[CGW_CS_CRC8]) {
|
||||||
struct cgw_csum_crc8 *c = nla_data(tb[CGW_CS_CRC8]);
|
struct cgw_csum_crc8 *c = nla_data(tb[CGW_CS_CRC8]);
|
||||||
|
|
||||||
@ -790,10 +781,9 @@ static int cgw_parse_attr(struct nlmsghdr *nlh, struct cf_mod *mod,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gwtype == CGW_TYPE_CAN_CAN) {
|
if (gwtype == CGW_TYPE_CAN_CAN) {
|
||||||
|
|
||||||
/* check CGW_TYPE_CAN_CAN specific attributes */
|
/* check CGW_TYPE_CAN_CAN specific attributes */
|
||||||
|
|
||||||
struct can_can_gw *ccgw = (struct can_can_gw *)gwtypeattr;
|
struct can_can_gw *ccgw = (struct can_can_gw *)gwtypeattr;
|
||||||
|
|
||||||
memset(ccgw, 0, sizeof(*ccgw));
|
memset(ccgw, 0, sizeof(*ccgw));
|
||||||
|
|
||||||
/* check for can_filter in attributes */
|
/* check for can_filter in attributes */
|
||||||
@ -854,12 +844,10 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (mod.uid) {
|
if (mod.uid) {
|
||||||
|
|
||||||
ASSERT_RTNL();
|
ASSERT_RTNL();
|
||||||
|
|
||||||
/* check for updating an existing job with identical uid */
|
/* check for updating an existing job with identical uid */
|
||||||
hlist_for_each_entry(gwj, &net->can.cgw_list, list) {
|
hlist_for_each_entry(gwj, &net->can.cgw_list, list) {
|
||||||
|
|
||||||
if (gwj->mod.uid != mod.uid)
|
if (gwj->mod.uid != mod.uid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -980,7 +968,6 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||||||
|
|
||||||
/* remove only the first matching entry */
|
/* remove only the first matching entry */
|
||||||
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
|
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
|
||||||
|
|
||||||
if (gwj->flags != r->flags)
|
if (gwj->flags != r->flags)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user