From: Chanwoo Choi <cw00.choi@samsung.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: myungjoo.ham@samsung.com, patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal
Date: Mon, 04 Nov 2013 18:41:41 +0900 [thread overview]
Message-ID: <52776BD5.7080607@samsung.com> (raw)
In-Reply-To: <20131104092102.GC30879@opensource.wolfsonmicro.com>
On 11/04/2013 06:21 PM, Charles Keepax wrote:
> On Mon, Nov 04, 2013 at 09:32:50AM +0900, Chanwoo Choi wrote:
>> The arizona_hpdet_do_id() return only either -EAGIN or 0(zero).
>> extcon-arizona driver could never execute 'goto done;' statement.
>>
>> ret = arizona_hpdet_do_id(info, &reading, &mic);
>> if (ret == -EAGAIN) {
>> goto out;
>> } else if (ret < 0) {
>> goto done;
>> }
>
> True that else if is redundant at the moment, but personally I
> would be inclined to leave it in, it feels safer against possible
> future edits of arizona_hpdet_do_id. It would be reasonable for
> someone to assume that other return values are acceptable whilst
> editing it but they would then not be handled.
I know your intention. But, I cannot apply this patch for potential issue.
Also, we have to fix below dead code after returning arizona_hpdet_do_id()
>> } else if (ret < 0) {
>> goto done;
>> }
Thanks,
Chanwoo Choi
prev parent reply other threads:[~2013-11-04 9:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 16:19 Charles Keepax
2013-10-27 16:19 ` [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal Charles Keepax
2013-11-04 0:38 ` Chanwoo Choi
2013-11-04 9:11 ` Charles Keepax
2013-11-04 0:32 ` [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Chanwoo Choi
2013-11-04 9:21 ` Charles Keepax
2013-11-04 9:41 ` Chanwoo Choi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52776BD5.7080607@samsung.com \
--to=cw00.choi@samsung.com \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome