From: Yadi <yadi.hu@windriver.com>
To: Jean Delvare <jdelvare@suse.de>
Cc: wsa@the-dreams.de, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c-eg20t: fix race between i2c init and interrupt enable
Date: Mon, 29 Aug 2016 11:02:16 +0800 [thread overview]
Message-ID: <57C3A5B8.1000100@windriver.com> (raw)
In-Reply-To: <20160826173255.3171feaa@endymion>
On 2016年08月26日 23:32, Jean Delvare wrote:
> Hi Yadi,
>
> On Tue, 23 Aug 2016 17:07:19 +0800, Yadi Hu wrote:
>> From: Hu Yadi <Yadi.hu@windriver.com>
>>
>> The driver executes request_irq() function before the base address
>> of i2c registers is remapped in kernel space. If i2c controller
>> shares an interrupt line with other devices,it is possible that
>> an interrupt arrives immediately after request_irq() is called.
>> Since the interrupt handler pch_i2c_handler() is active, it will
>> read its own register to determine if this interrupt was from
>> its device.
>> At this moment, base address of i2c registers is not remapped
>> in kernel space yet,so the INT handler access a unknown address
>> and a error occurs.
>>
>> Signed-off-by: Hu Yadi <Yadi.hu@windriver.com>
>> ---
>> drivers/i2c/busses/i2c-eg20t.c | 25 ++++++++++++++-----------
>> 1 files changed, 14 insertions(+), 11 deletions(-)
>> (...)
> ERROR: trailing whitespace
> #66: FILE: drivers/i2c/busses/i2c-eg20t.c:896:
> +^I$
>
> ERROR: code indent should use tabs where possible
> #67: FILE: drivers/i2c/busses/i2c-eg20t.c:897:
> + for (i = 0; i < adap_info->ch_num; i++) {$
>
> WARNING: please, no spaces at the start of a line
> #67: FILE: drivers/i2c/busses/i2c-eg20t.c:897:
> + for (i = 0; i < adap_info->ch_num; i++) {$
>
> total: 2 errors, 1 warnings, 44 lines checked
>
> I'll review your patch when it passes ./scripts/checkpatch.pl.
>
> Also note (not reported by the script): please do not add random blank
> lines in the source code, it lowers readability.
Hi Jean
Sorry for mess up , I made a patch V2 and send it off for review.
Yadi
next prev parent reply other threads:[~2016-08-29 3:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 9:07 [PATCH] i2c-eg20t: fix race between i2c init and interrupt enable Yadi Hu
2016-08-26 15:32 ` Jean Delvare
2016-08-29 3:02 ` Yadi [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-08-29 2:56 Yadi Hu
2016-09-02 10:05 ` Yadi
2016-09-07 9:25 RESEND:i2c-eg20t: " Yadi Hu
2016-09-07 9:25 ` [PATCH] i2c-eg20t: " Yadi Hu
2016-09-18 10:52 RESEND: V3 i2c-eg20t:fix " Yadi Hu
2016-09-18 10:52 ` [PATCH] i2c-eg20t: fix " Yadi Hu
2016-09-21 16:16 ` Wolfram Sang
2016-09-21 16:18 ` Wolfram Sang
2016-09-22 1:19 ` Yadi
2016-09-22 1:04 ` Yadi
2016-09-22 6:02 ` 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=57C3A5B8.1000100@windriver.com \
--to=yadi.hu@windriver.com \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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).