From: Julia Lawall <julia.lawall@lip6.fr>
To: Quentin Schulz <quentin.schulz@free-electrons.com>,
antoine.tenart@free-electrons.com,
thomas.petazzoni@free-electrons.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
linux-input@vger.kernel.org
Cc: linux@armlinux.org.uk, maxime.ripard@free-electrons.com,
wens@csie.org, jic23@kernel.org, knaack.h@gmx.de,
lars@metafoo.de, pmeerw@pmeerw.net, dmitry.torokhov@gmail.com,
lee.jones@linaro.org, kbuild-all@01.org
Subject: Re: [PATCH v7 3/3] iio: adc: add support for Allwinner SoCs ADC
Date: Thu, 3 Nov 2016 16:31:34 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1611031630220.3008@hadrien> (raw)
In-Reply-To: <201611032049.auU2FIXo%fengguang.wu@intel.com>
I haven't checked the complete context, but it seems that *irq that is
tested on line 431 is unsigned.
julia
On Thu, 3 Nov 2016, kbuild test robot wrote:
> Hi Quentin,
>
> [auto build test WARNING on next-20161028]
> [cannot apply to iio/togreg input/next linus/master v4.9-rc3 v4.9-rc2 v4.9-rc1 v4.9-rc3]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Quentin-Schulz/add-support-for-Allwinner-SoCs-ADC/20161103-182828
> :::::: branch date: 2 hours ago
> :::::: commit date: 2 hours ago
>
> >> drivers/iio/adc/sun4i-gpadc-iio.c:431:5-9: WARNING: Unsigned expression compared with zero: * irq < 0
>
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout 0068e4d1386fff54958ef3b8b304239982feaa8a
> vim +431 drivers/iio/adc/sun4i-gpadc-iio.c
>
> 0068e4d1 Quentin Schulz 2016-11-03 415
> 0068e4d1 Quentin Schulz 2016-11-03 416 /*
> 0068e4d1 Quentin Schulz 2016-11-03 417 * Once the interrupt is activated, the IP continuously performs
> 0068e4d1 Quentin Schulz 2016-11-03 418 * conversions thus throws interrupts. The interrupt is activated right
> 0068e4d1 Quentin Schulz 2016-11-03 419 * after being requested but we want to control when these interrupts
> 0068e4d1 Quentin Schulz 2016-11-03 420 * occur thus we disable it right after being requested. However, an
> 0068e4d1 Quentin Schulz 2016-11-03 421 * interrupt might occur between these two instructions and we have to
> 0068e4d1 Quentin Schulz 2016-11-03 422 * make sure that does not happen, by using atomic flags. We set the
> 0068e4d1 Quentin Schulz 2016-11-03 423 * flag before requesting the interrupt and unset it right after
> 0068e4d1 Quentin Schulz 2016-11-03 424 * disabling the interrupt. When an interrupt occurs between these two
> 0068e4d1 Quentin Schulz 2016-11-03 425 * instructions, reading the atomic flag will tell us to ignore the
> 0068e4d1 Quentin Schulz 2016-11-03 426 * interrupt.
> 0068e4d1 Quentin Schulz 2016-11-03 427 */
> 0068e4d1 Quentin Schulz 2016-11-03 428 atomic_set(atomic, 1);
> 0068e4d1 Quentin Schulz 2016-11-03 429
> 0068e4d1 Quentin Schulz 2016-11-03 430 *irq = platform_get_irq_byname(pdev, name);
> 0068e4d1 Quentin Schulz 2016-11-03 @431 if (*irq < 0) {
> 0068e4d1 Quentin Schulz 2016-11-03 432 dev_err(&pdev->dev, "no %s interrupt registered\n", name);
> 0068e4d1 Quentin Schulz 2016-11-03 433 return *irq;
> 0068e4d1 Quentin Schulz 2016-11-03 434 }
> 0068e4d1 Quentin Schulz 2016-11-03 435
> 0068e4d1 Quentin Schulz 2016-11-03 436 *irq = regmap_irq_get_virq(mfd_dev->regmap_irqc, *irq);
> 0068e4d1 Quentin Schulz 2016-11-03 437 ret = devm_request_any_context_irq(&pdev->dev, *irq, handler, 0,
> 0068e4d1 Quentin Schulz 2016-11-03 438 devname, info);
> 0068e4d1 Quentin Schulz 2016-11-03 439 if (ret < 0) {
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
next parent reply other threads:[~2016-11-03 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201611032049.auU2FIXo%fengguang.wu@intel.com>
2016-11-03 15:31 ` Julia Lawall [this message]
2016-11-03 10:15 [PATCH v7 0/3] add support for Allwinner SoCs ADC Quentin Schulz
2016-11-03 10:16 ` [PATCH v7 3/3] iio: adc: " Quentin Schulz
2016-11-03 14:48 ` Lee Jones
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=alpine.DEB.2.20.1611031630220.3008@hadrien \
--to=julia.lawall@lip6.fr \
--cc=antoine.tenart@free-electrons.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@kernel.org \
--cc=kbuild-all@01.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.ripard@free-electrons.com \
--cc=pmeerw@pmeerw.net \
--cc=quentin.schulz@free-electrons.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=wens@csie.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).