From patchwork Wed Dec 23 10:59:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 58971 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp3781849lbb; Wed, 23 Dec 2015 03:00:54 -0800 (PST) X-Received: by 10.98.14.143 with SMTP id 15mr43126436pfo.154.1450868452002; Wed, 23 Dec 2015 03:00:52 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p76si36061747pfi.62.2015.12.23.03.00.51; Wed, 23 Dec 2015 03:00:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934239AbbLWLAu (ORCPT + 4 others); Wed, 23 Dec 2015 06:00:50 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:30008 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754592AbbLWLAs (ORCPT ); Wed, 23 Dec 2015 06:00:48 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZT008EM5998NC0@mailout1.w1.samsung.com>; Wed, 23 Dec 2015 11:00:45 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-21-567a7edd250b Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id AE.63.16778.DDE7A765; Wed, 23 Dec 2015 11:00:45 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZT004GC5932LA0@eusync3.samsung.com>; Wed, 23 Dec 2015 11:00:45 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Russell King - ARM Linux , Ulf Hansson , Tomeu Vizoso , Greg Kroah-Hartman , Dan Williams , Kukjin Kim , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v5 2/5] ARM: sa1111: ensure no negative value gets returned on positive match Date: Wed, 23 Dec 2015 11:59:25 +0100 Message-id: <1450868368-5650-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1450868368-5650-1-git-send-email-m.szyprowski@samsung.com> References: <1450868368-5650-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRmVeSWpSXmKPExsVy+t/xq7p366rCDB594LTYOGM9q8X0qRcY LZoXr2ezeP3C0KL/8Wtmi02Pr7FaXN41h81ixvl9TBa3L/NarD1yl92ib+0lNovja8MdeDxa mnvYPHbcXcLosXjPSyaPTas62TzuXNvD5rF/7hp2j81L6j36tqxi9Pi8SS6AM4rLJiU1J7Ms tUjfLoEr4/yf04wFF9gqurYtYm1gPM7axcjJISFgInH14kI2CFtM4sK99UA2F4eQwFJGiTu3 NzNBOE1MEo0rT4FVsQkYSnS97QKzRQSyJebv7WYHKWIWmM8s8XBVP9hYYYF4iUc3D7OA2CwC qhJzNx1mBrF5Bdwl3p5eywyxTk7i/8sVTCA2p4CHxJ3lr8DiQkA1bQffME9g5F3AyLCKUTS1 NLmgOCk911CvODG3uDQvXS85P3cTIyRUv+xgXHzM6hCjAAejEg+vQ1tlmBBrYllxZe4hRgkO ZiUR3vR3QCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8c3e9DxESSE8sSc1OTS1ILYLJMnFwSjUw xsQdSxf5F1es1Zb0an36sZ3r30Sy/FFJDItqfyBmf36qeLTbAu9tyzia9yzLvl4+TzdqP2vh mqeiPzX+Pcj1jpxWzbIlTEtx8fGlHd73fEq8O71nKwW1B+mW32/OWBAYwX2X7yZjZjPT16vf jLWarmwok7dR9G1+8GVN///Fn8+t3d672+CaEktxRqKhFnNRcSIALZILoFECAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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. Signed-off-by: Marek Szyprowski --- arch/arm/common/sa1111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)