Re: [PATCH 1/3] extcon: intel-cht-wc: Make error messages consistent
From: Chanwoo Choi
Date: Tue Apr 04 2017 - 07:58:54 EST
On 2017ë 04ì 04ì 17:53, Hans de Goede wrote:
> Hi,
>
> On 04-04-17 08:19, Chanwoo Choi wrote:
>> Hi,
>>
>> The intel-cht-wc.c[1] was merged on only extcon-next branch.
>> I think that this patch better to be squashed with patch[1].
>> [1] commit 6786e42f31637 ("extcon: intel-cht-wc: Add Intel Cherry Trail Whiskey Cove PMIC extcon driver")
>>
>> How about it?
>
> That is fine with me.
OK. Applied it.
>
> Regards,
>
> Hans
>
>
>
>>
>> On 2017ë 04ì 03ì 20:26, Hans de Goede wrote:
>>> Before this commit the error messages were a mix of "Failed to ..." and
>>> "Error ...ing ...".
>>>
>>> This commit makes all the error messages consistently use "Error ...ing".
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
>>> ---
>>> drivers/extcon/extcon-intel-cht-wc.c | 8 ++++----
>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/extcon/extcon-intel-cht-wc.c b/drivers/extcon/extcon-intel-cht-wc.c
>>> index 0a05cc3..f1c43af 100644
>>> --- a/drivers/extcon/extcon-intel-cht-wc.c
>>> +++ b/drivers/extcon/extcon-intel-cht-wc.c
>>> @@ -252,7 +252,7 @@ static int cht_wc_extcon_sw_control(struct cht_wc_extcon_data *ext, bool enable)
>>> val = enable ? mask : 0;
>>> ret = regmap_update_bits(ext->regmap, CHT_WC_CHGRCTRL0, mask, val);
>>> if (ret)
>>> - dev_err(ext->dev, "Failed setting sw control: %d\n", ret);
>>> + dev_err(ext->dev, "Error setting sw control: %d\n", ret);
>>>
>>> return ret;
>>> }
>>> @@ -288,7 +288,7 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
>>> /* Register extcon device */
>>> ret = devm_extcon_dev_register(ext->dev, ext->edev);
>>> if (ret) {
>>> - dev_err(ext->dev, "Failed to register extcon device\n");
>>> + dev_err(ext->dev, "Error registering extcon device: %d\n", ret);
>>> goto disable_sw_control;
>>> }
>>>
>>> @@ -301,7 +301,7 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
>>> ret = devm_request_threaded_irq(ext->dev, irq, NULL, cht_wc_extcon_isr,
>>> IRQF_ONESHOT, pdev->name, ext);
>>> if (ret) {
>>> - dev_err(ext->dev, "Failed to request interrupt\n");
>>> + dev_err(ext->dev, "Error requesting interrupt: %d\n", ret);
>>> goto disable_sw_control;
>>> }
>>>
>>> @@ -310,7 +310,7 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
>>> (int)~(CHT_WC_PWRSRC_VBUS | CHT_WC_PWRSRC_ID_GND |
>>> CHT_WC_PWRSRC_ID_FLOAT));
>>> if (ret) {
>>> - dev_err(ext->dev, "Failed to write the irq-mask: %d\n", ret);
>>> + dev_err(ext->dev, "Error writing irq-mask: %d\n", ret);
>>> goto disable_sw_control;
>>> }
>>>
>>
>>
>
>
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics