lindent, remove debug print
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>pull/106/head^2
parent
bedbd3788f
commit
96b6e75947
|
|
@ -317,7 +317,9 @@ static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res)
|
|||
nl_msg->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifaddrmsg));
|
||||
parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
|
||||
|
||||
if (strncmp((char *)RTA_DATA(tb[IFLA_IFNAME]), name, sizeof(name)) != 0)
|
||||
if (strncmp
|
||||
((char *)RTA_DATA(tb[IFLA_IFNAME]), name,
|
||||
sizeof(name)) != 0)
|
||||
continue;
|
||||
|
||||
if (tb[IFLA_LINKINFO])
|
||||
|
|
@ -383,7 +385,8 @@ static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res)
|
|||
sizeof(struct can_clock));
|
||||
ret = 0;
|
||||
} else
|
||||
fprintf(stderr, "no clock parameter data found\n");
|
||||
fprintf(stderr,
|
||||
"no clock parameter data found\n");
|
||||
|
||||
break;
|
||||
default:
|
||||
|
|
@ -515,7 +518,6 @@ int can_do_start(const char *name)
|
|||
|
||||
int can_do_stop(const char *name)
|
||||
{
|
||||
|
||||
return set_link(name, IF_DOWN, NULL);
|
||||
}
|
||||
|
||||
|
|
@ -533,8 +535,7 @@ int can_do_restart(const char *name)
|
|||
goto err_out;
|
||||
} else if (state != CAN_STATE_BUS_OFF) {
|
||||
fprintf(stderr,
|
||||
"Device is not in BUS_OFF,"
|
||||
" no use to restart\n");
|
||||
"Device is not in BUS_OFF," " no use to restart\n");
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
|
|
@ -607,14 +608,15 @@ int can_set_bitrate(const char *name, __u32 bitrate)
|
|||
return can_set_bittiming(name, &bt);
|
||||
}
|
||||
|
||||
int can_set_bitrate_samplepoint(const char *name, __u32 bitrate, __u32 sample_point)
|
||||
int can_set_bitrate_samplepoint(const char *name, __u32 bitrate,
|
||||
__u32 sample_point)
|
||||
{
|
||||
struct can_bittiming bt;
|
||||
|
||||
memset(&bt, 0, sizeof(bt));
|
||||
bt.bitrate = bitrate;
|
||||
bt.sample_point = sample_point;
|
||||
printf("%s: sample_point %u\n", __func__,bt.sample_point);
|
||||
|
||||
return can_set_bittiming(name, &bt);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue