linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
To: ext Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2] i2c: davinci: Refactor i2c_davinci_wait_bus_not_busy()
Date: Tue, 09 Jun 2015 12:54:25 +0200	[thread overview]
Message-ID: <5576C5E1.1010302@nokia.com> (raw)
In-Reply-To: <20150602155344.GE2661@katana>

Hello Wolfram,

On 02/06/15 17:53, ext Wolfram Sang wrote:
>> There are several problems in the function:
>> > - "to_cnt" variable does nothing
>> > - schedule_timeout() call without setting current state does nothing
>> > - "allow_sleep" parameter is not really used
>> > 
>> > Refactor the function so that it really tries to wait. In case of timeout try
>> > to recover the bus.
>> > 
>> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> Don't you get a build warning?
> 
> drivers/i2c/busses/i2c-davinci.c: In function 'i2c_davinci_wait_bus_not_busy':
> drivers/i2c/busses/i2c-davinci.c:364:18: warning: passing argument 1 of 'i2c_recover_bus' from incompatible pointer type
>   i2c_recover_bus(dev);
>                   ^
> In file included from drivers/i2c/busses/i2c-davinci.c:26:0:
> include/linux/i2c.h:446:5: note: expected 'struct i2c_adapter *' but argument is of type 'struct davinci_i2c_dev *'
>  int i2c_recover_bus(struct i2c_adapter *adap);

oh, this is awful copy-paster error... I'll re-send!

-- 
Best regards,
Alexander Sverdlin.

  reply	other threads:[~2015-06-09 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 13:03 [PATCH v2] i2c: davinci: Refactor i2c_davinci_wait_bus_not_busy() Alexander Sverdlin
     [not found] ` <55534BA0.3000506-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-05-14 11:19   ` Grygorii.Strashko-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
2015-06-02 15:53   ` Wolfram Sang
2015-06-09 10:54     ` Alexander Sverdlin [this message]
2015-06-09 10:58   ` [PATCH v3] " Alexander Sverdlin
     [not found]     ` <5576C6D5.9070800-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-06-10 13:14       ` Wolfram Sang

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=5576C5E1.1010302@nokia.com \
    --to=alexander.sverdlin-xnzwkgviw5gavxtiumwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /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).