From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dan Williams <dan.j.williams@intel.com>,
Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v5 2/5] ARM: sa1111: ensure no negative value gets returned on positive match
Date: Wed, 23 Dec 2015 11:05:00 +0000 [thread overview]
Message-ID: <20151223110500.GQ8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1450868368-5650-3-git-send-email-m.szyprowski@samsung.com>
On Wed, Dec 23, 2015 at 11:59:25AM +0100, Marek Szyprowski wrote:
> This patch ensures that existing bus match callbacks don't return
> negative values (which might be interpreted as potential errors in the
> future) in case of positive match.
This actually can't return a negative number - only valid devid bits
are 0 to 9 inclusive, and this isn't going to ever change. So the
patch isn't strictly necessary, but is good from the point of view
of ensuring consistency. Hence:
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/common/sa1111.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
> index 3d22494..fb0a0a4 100644
> --- a/arch/arm/common/sa1111.c
> +++ b/arch/arm/common/sa1111.c
> @@ -1290,7 +1290,7 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv)
> struct sa1111_dev *dev = SA1111_DEV(_dev);
> struct sa1111_driver *drv = SA1111_DRV(_drv);
>
> - return dev->devid & drv->devid;
> + return !!(dev->devid & drv->devid);
> }
>
> static int sa1111_bus_suspend(struct device *dev, pm_message_t state)
> --
> 1.9.2
>
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-12-23 11:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 10:59 [PATCH v5 0/5] AMBA: add complete support for power domains Marek Szyprowski
2015-12-23 10:59 ` [PATCH v5 1/5] drivers: nvdimm: ensure no negative value gets returned on positive match Marek Szyprowski
2015-12-23 10:59 ` [PATCH v5 2/5] ARM: sa1111: " Marek Szyprowski
2015-12-23 11:05 ` Russell King - ARM Linux [this message]
2015-12-23 10:59 ` [PATCH v5 3/5] driver core: handle -EPROBE_DEFER from bus_type.match() Marek Szyprowski
2016-01-04 16:31 ` Russell King - ARM Linux
2016-01-04 17:12 ` Greg Kroah-Hartman
2016-01-25 6:56 ` Marek Szyprowski
2015-12-23 10:59 ` [PATCH v5 4/5] ARM: amba: Move reading of periphid to amba_match() Marek Szyprowski
2015-12-23 10:59 ` [PATCH v5 5/5] ARM: amba: Properly handle devices with power domains Marek Szyprowski
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=20151223110500.GQ8644@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=b.zolnierkie@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=tomeu.vizoso@collabora.com \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®