Commit 8adc8c56 authored by Pavel Pisa's avatar Pavel Pisa
Browse files

driver: correct some problems reported by make checkpatch.


Signed-off-by: Pavel Pisa's avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
parent 7a265ed8
......@@ -50,7 +50,7 @@ MODULE_DESCRIPTION("CTU CAN FD interface");
#define DRV_NAME "ctucanfd"
static const char *ctucan_state_strings[] = {
static const char * const ctucan_state_strings[] = {
"CAN_STATE_ERROR_ACTIVE",
"CAN_STATE_ERROR_WARNING",
"CAN_STATE_ERROR_PASSIVE",
......@@ -164,14 +164,14 @@ static int ctucan_set_secondary_sample_point(struct net_device *ndev)
}
// Use for bit-rates above 1 Mbits/s
if (dbt->bitrate > 1000000){
if (dbt->bitrate > 1000000) {
ssp_ena = true;
// Calculate SSP in minimal time quanta
ssp_offset = (priv->can.clock.freq / 1000) *
dbt->sample_point / dbt->bitrate;
if (ssp_offset > 127){
if (ssp_offset > 127) {
netdev_warn(ndev, "SSP offset saturated to 127\n");
ssp_offset = 127;
}
......
......@@ -767,7 +767,7 @@ void ctucan_hw_configure_ssp(struct ctucan_hw_priv *priv, bool enable_ssp,
union ctu_can_fd_trv_delay_ssp_cfg ssp_cfg;
ssp_cfg.u32 = 0;
if (enable_ssp){
if (enable_ssp) {
if (use_trv_delay)
ssp_cfg.s.ssp_src = SSP_SRC_MEAS_N_OFFSET;
else
......
......@@ -223,7 +223,7 @@ static int ctucan_pci_probe(struct pci_dev *pdev,
return 0;
err_free_board:
err_free_board:
pci_set_drvdata(pdev, NULL);
kfree(bdata);
err_pci_iounmap_bar0:
......
......@@ -97,7 +97,8 @@ static int ctucan_platform_probe(struct platform_device *pdev)
if (ret < 0)
platform_set_drvdata(pdev, NULL);
err:
err:
return ret;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment