Skip to content

Commit 34825e5

Browse files
committed
extcon: Fix the checkpatch warning
This patch fixes the checkpatch warning about coding style. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
1 parent f68a834 commit 34825e5

7 files changed

Lines changed: 10 additions & 20 deletions

File tree

drivers/extcon/extcon-max14577.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,6 @@ static void max14577_muic_irq_work(struct work_struct *work)
539539
dev_err(info->dev, "failed to handle MUIC interrupt\n");
540540

541541
mutex_unlock(&info->mutex);
542-
543-
return;
544542
}
545543

546544
/*
@@ -730,8 +728,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
730728
muic_irq->name, info);
731729
if (ret) {
732730
dev_err(&pdev->dev,
733-
"failed: irq request (IRQ: %d,"
734-
" error :%d)\n",
731+
"failed: irq request (IRQ: %d, error :%d)\n",
735732
muic_irq->irq, ret);
736733
return ret;
737734
}

drivers/extcon/extcon-max77693.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,8 +1019,6 @@ static void max77693_muic_irq_work(struct work_struct *work)
10191019
dev_err(info->dev, "failed to handle MUIC interrupt\n");
10201020

10211021
mutex_unlock(&info->mutex);
1022-
1023-
return;
10241022
}
10251023

10261024
static irqreturn_t max77693_muic_irq_handler(int irq, void *data)
@@ -1171,8 +1169,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
11711169
muic_irq->name, info);
11721170
if (ret) {
11731171
dev_err(&pdev->dev,
1174-
"failed: irq request (IRQ: %d,"
1175-
" error :%d)\n",
1172+
"failed: irq request (IRQ: %d, error :%d)\n",
11761173
muic_irq->irq, ret);
11771174
return ret;
11781175
}

drivers/extcon/extcon-max8997.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,6 @@ static void max8997_muic_irq_work(struct work_struct *work)
579579
dev_err(info->dev, "failed to handle MUIC interrupt\n");
580580

581581
mutex_unlock(&info->mutex);
582-
583-
return;
584582
}
585583

586584
static irqreturn_t max8997_muic_irq_handler(int irq, void *data)
@@ -689,8 +687,7 @@ static int max8997_muic_probe(struct platform_device *pdev)
689687
muic_irq->name, info);
690688
if (ret) {
691689
dev_err(&pdev->dev,
692-
"failed: irq request (IRQ: %d,"
693-
" error :%d)\n",
690+
"failed: irq request (IRQ: %d, error :%d)\n",
694691
muic_irq->irq, ret);
695692
goto err_irq;
696693
}

drivers/extcon/extcon-rt8973a.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,8 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
582582
return -EINVAL;
583583

584584
info = devm_kzalloc(&i2c->dev, sizeof(*info), GFP_KERNEL);
585-
if (!info) {
586-
dev_err(&i2c->dev, "failed to allocate memory\n");
585+
if (!info)
587586
return -ENOMEM;
588-
}
589587
i2c_set_clientdata(i2c, info);
590588

591589
info->dev = &i2c->dev;
@@ -681,7 +679,7 @@ static int rt8973a_muic_i2c_remove(struct i2c_client *i2c)
681679
return 0;
682680
}
683681

684-
static struct of_device_id rt8973a_dt_match[] = {
682+
static const struct of_device_id rt8973a_dt_match[] = {
685683
{ .compatible = "richtek,rt8973a-muic" },
686684
{ },
687685
};

drivers/extcon/extcon-sm5502.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
359359
break;
360360
default:
361361
dev_dbg(info->dev,
362-
"cannot identify the cable type: adc(0x%x) "
363-
"dev_type1(0x%x)\n", adc, dev_type1);
362+
"cannot identify the cable type: adc(0x%x)\n",
363+
adc);
364364
return -EINVAL;
365365
};
366366
break;
@@ -659,7 +659,7 @@ static int sm5502_muic_i2c_remove(struct i2c_client *i2c)
659659
return 0;
660660
}
661661

662-
static struct of_device_id sm5502_dt_match[] = {
662+
static const struct of_device_id sm5502_dt_match[] = {
663663
{ .compatible = "siliconmitus,sm5502-muic" },
664664
{ },
665665
};

drivers/extcon/extcon-usb-gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static int usb_extcon_resume(struct device *dev)
214214
static SIMPLE_DEV_PM_OPS(usb_extcon_pm_ops,
215215
usb_extcon_suspend, usb_extcon_resume);
216216

217-
static struct of_device_id usb_extcon_dt_match[] = {
217+
static const struct of_device_id usb_extcon_dt_match[] = {
218218
{ .compatible = "linux,extcon-usb-gpio", },
219219
{ /* sentinel */ }
220220
};

drivers/extcon/extcon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr,
158158
/* Optional callback given by the user */
159159
if (edev->print_name) {
160160
int ret = edev->print_name(edev, buf);
161+
161162
if (ret >= 0)
162163
return ret;
163164
}

0 commit comments

Comments
 (0)