linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, dianders@chromium.org,
	gregkh@linuxfoundation.org, naveenkrishna.ch@gmail.com,
	lars@metafoo.de, grundler@chromium.org, cpgs@samsung.com
Subject: Re: [PATCH v6] iio: exynos_adc: use wait_for_completion_timeout instead of interruptible
Date: Sun, 10 Nov 2013 13:48:35 +0100	[thread overview]
Message-ID: <4523891.jQuDssBx5e@flatron> (raw)
In-Reply-To: <1383644730-23228-1-git-send-email-ch.naveen@samsung.com>

Hi Naveen,

On Tuesday 05 of November 2013 15:15:30 Naveen Krishna Chatradhi wrote:
> 1. The irq routine is so simple (just one register read) shouldn't be
> long Hence, reduce the timeout to 100milli secs,

I believe that the timeout value depends mostly on maximum conversion time 
and interrupt handler complexity is not very significant here.

> 2. With 100ms of wait time, interruptible is very much unnecessary.
>    Hence, use wait_for_completion_timeout instead of
>    wait_for_completion_interruptible_timeout
> 3. Reset software if a timeout happens.
> 4. Add reinit_completion() before the wait_for_completion_timeout in
> raw_read()

All the four points listed above, even just by the form they are written 
in, suggest that they should be separate four patches.

In addition, patch description should explain why such change is needed, 
i.e. what it fixes, improves or prepares the code for.

> Note: submitted for review at
> https://patchwork.kernel.org/patch/2279591/
> 

This should not be located in patch description, but rather in comments 
section below, as is the change log.

> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Cc: Doug Anderson <dianders@chromium.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Reviewed-on: https://chromium-review.googlesource.com/172724
> Reviewed-by: Doug Anderson <dianders@chromium.org>
> ---
> Changes since v1:
> As per discussion at
> http://marc.info/?l=linux-kernel&m=136517637228869&w=3
> 
> Changes since v2:
> None.
> Rebased and reposting.
> 
> Changes since v3:
> 1. commit message change and
> 2. removed an unncessary assignment
> 
> Changes since v4:
> Moved INIT_COMPLETION call to the starting of the function
> 
> Changes since v5:
> INIT_COMPLETION was replaced by reinit_completion
> ("tree-wide: use reinit_completion instead of INIT_COMPLETION").
> Use it to avoid the following build error:
> undefined identifier 'INIT_COMPLETION'

Not really a comment to the patch, but rather a suggestion for future:

It is more convenient to read the change log if it goes from newest to 
oldest order.

Otherwise the changes alone look good.

Best regards,
Tomasz


      reply	other threads:[~2013-11-10 12:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 16:26 [RFC: PATCH 2/2] iio: adc: exynos_adc: Handle timeout and race conditions Naveen Krishna Chatradhi
2013-03-15 21:53 ` Lars-Peter Clausen
2013-03-16  0:37   ` Doug Anderson
2013-03-16 14:41     ` Lars-Peter Clausen
2013-04-03 17:06       ` Doug Anderson
2013-04-05  8:53         ` Lars-Peter Clausen
2013-04-05 14:56           ` Doug Anderson
2013-04-05 16:38             ` Lars-Peter Clausen
2013-04-04  3:59 ` [PATCH 14/14] temp: iio: adc: exynos_adc: Handle timeout issues Naveen Krishna Chatradhi
2013-04-04  4:09   ` Naveen Krishna Ch
2013-04-04  4:06 ` [PATCH] " Naveen Krishna Chatradhi
2013-04-13  4:36   ` Naveen Krishna Ch
2013-04-15 16:01     ` Doug Anderson
2013-05-02 18:01   ` [PATCH v2] " Naveen Krishna Chatradhi
2013-05-02 18:10     ` Tomasz Figa
2013-05-02 18:22       ` Naveen Krishna Ch
2013-05-02 18:36         ` Tomasz Figa
2013-10-11  8:23   ` [PATCH v3] iio: exynos_adc: use wait_for_completion_timeout instead of interruptible Naveen Krishna Chatradhi
2013-10-11 14:30     ` Lars-Peter Clausen
2013-10-12  6:40       ` Naveen Krishna Ch
2013-10-15  5:15     ` [PATCH v4] " Naveen Krishna Chatradhi
2013-10-25 15:42       ` Doug Anderson
2013-10-28  5:41     ` [PATCH v5] " Naveen Krishna Chatradhi
2013-11-05  9:45     ` [PATCH v6] " Naveen Krishna Chatradhi
2013-11-10 12:48       ` Tomasz Figa [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=4523891.jQuDssBx5e@flatron \
    --to=tomasz.figa@gmail.com \
    --cc=ch.naveen@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=grundler@chromium.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=naveenkrishna.ch@gmail.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;
as well as URLs for NNTP newsgroup(s).