From patchwork Wed Feb 17 15:20:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 8340691 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6629F9F38B for ; Wed, 17 Feb 2016 15:55:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A620203F4 for ; Wed, 17 Feb 2016 15:55:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 158E6203B7 for ; Wed, 17 Feb 2016 15:55:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423283AbcBQPzN (ORCPT ); Wed, 17 Feb 2016 10:55:13 -0500 Received: from mail-bl2on0073.outbound.protection.outlook.com ([65.55.169.73]:51552 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1423237AbcBQPzL (ORCPT ); Wed, 17 Feb 2016 10:55:11 -0500 X-Greylist: delayed 1168 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Feb 2016 10:55:11 EST Received: from BLUPR0301CA0037.namprd03.prod.outlook.com (10.162.113.175) by BY2PR03MB316.namprd03.prod.outlook.com (10.141.139.26) with Microsoft SMTP Server (TLS) id 15.1.403.16; Wed, 17 Feb 2016 15:20:38 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::110) by BLUPR0301CA0037.outlook.office365.com (2a01:111:e400:5259::47) with Microsoft SMTP Server (TLS) id 15.1.409.15 via Frontend Transport; Wed, 17 Feb 2016 15:20:38 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) with Microsoft SMTP Server (TLS) id 15.1.415.6 via Frontend Transport; Wed, 17 Feb 2016 15:20:37 +0000 Received: from fabio-Latitude-E6410.am.freescale.net (fabio-Latitude-E6410.am.freescale.net [10.29.244.206]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u1HFKXJf030013; Wed, 17 Feb 2016 08:20:36 -0700 From: Fabio Estevam To: CC: , Fabio Estevam Subject: [PATCH 2/2] spi: core: Use cast inside 'min' macro Date: Wed, 17 Feb 2016 13:20:24 -0200 Message-ID: <1455722424-15490-2-git-send-email-fabio.estevam@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455722424-15490-1-git-send-email-fabio.estevam@nxp.com> References: <1455722424-15490-1-git-send-email-fabio.estevam@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131001960380511914; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD022; 1:jXh2kSJrDL3gwz4CGE5AVD4rEuKXqyTJNL40J5GWTN6QBzPr6kn5skSMtItiP0MW2KbpmBjyOpiQxpj7kUrHG2bzKhpzik1ZElH4sTjsbzWCbS9XZskFiliDnf0oubSkS6atsLCAL6hYVa6alxc/T4R5B9fMWRQ9qbVdDlmYpbYjiS2iJv3QxecFkFupfyJBrRBz9i2Wm6bP5RbPrF2oQ2GEKrpdquDyXbIU0sPvHJEm6BGJZIFC8e6zNE47Ae1syeRYq5kODoGVipP2QcwaikoxICayMDQ7+1J0EZINlldTwcYvdzYT6iTUu9CvsEwtp73jCvErwKc43dI+PT13GnRsCWPnD9Uw0la08sjfbKQcOcN2hxBhBgxCNpSNDWuyDMCgHMgO/wuQMzqU5UlFm+Y40RsRuMsOkgn0sOhgHGZO7MEZtuqeE/22CMJ10ZsD3mxJaDuLsGbkPn5RgpnFP2i5s2NdytqyxiBQFjfAkvT0lgRxrcMVgWYpSKIAkJmE/mazRPBNIxUyVP2o0BLNOWQsNyWLTXZaBzuPCZhINwVTgkx6ElpxGMQx/H+pfxn1/3wbPAHgumglVLzUko5AVw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(87936001)(92566002)(586003)(105606002)(1096002)(104016004)(33646002)(1220700001)(47776003)(5008740100001)(2906002)(36756003)(86362001)(50466002)(6806005)(4326007)(50986999)(50226001)(2351001)(229853001)(11100500001)(19580395003)(19580405001)(5001960100002)(76176999)(77096005)(110136002)(48376002)(189998001)(2950100001)(85426001)(106466001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB316; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 83b36c01-a942-4890-d549-08d337ade3d0 X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB316; 2:MLSPr8I0QI5+8ymmeEQhgL6lvkzAb/RtKVhBkPGSxUNkgQcyS4QnxsdCI981jXsKrsOMCxCjvG4c62nerHFl5amtdIPera69kt2ZhBZ4rSsPtlDpMpuDvSZj0CJbKMv48lkOtFr15e8WMiWz2NY23ZAztZ8D6RUg0KJSuHwi7fJTxMo41Kic8MnNwu2Xbbhb; 3:3xQ8VzMH1XM4j32GrKhJJTo9E9dvZHes9LbyWVIyEJqmGMN4Y2nhbv8UMPHbLkRu4M+IIThdvbjQQFy4wSc5LUxPLRrRpHwFu2Xe7DITxLikfWgI2ub+gwebvix9eJSK8UfJA1lEkBMGOgp7a3WG73TpQTWNc5s9c+BZF8bAZzEUMoP9TuM+o0LvIAfa/AOLzMiPshqXjTkNXgbZr/QWFBQ2nyZ0xFM+94kLHwOjiLY=; 25:4d1bKD9m0yygZqZF4Jkx1Nn/odCg3hLAwkNeaUm1oRcQGUscmKwXBw6AhNiTPK8ZEUqD85doW+pMQRERgU5KsEmJPac735Mhf4Vit7Fmq3XSBbUXonjUxGPKd295sIcuXJTjSwL8pqRdfw6P5SMyX1AAAy/qGY5R7UBmRegU/XeCriryzLBGzqqghx0adCSI6dSnQ1fDJaU4aCeJVbdpAUIYR2zbFH40EXVPflEOdyLdRWgAJQR36oYG/3mAYc1ULPotNA679oamjy0CQZG/1LQKazG4hOj0pLQavm2ZVfybU5wiE80rvVJfqjsTPno3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB316; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13024025)(13023025)(5005006)(13017025)(13018025)(13015025)(3002001)(10201501046); SRVR:BY2PR03MB316; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB316; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB316; 4:GzTu5USm18ViYn2p1A1v5oeCUULDDaGLg8ATBb7BJcawKfWMynOFHawaCF/ZZLZVlajMp/zZ8cB2xHqtuC3QkwoD4NjoKMzerzn+PmbQrmMFp02X7g06meyUV07UYYjHbueq7JhY2qp139YD2Td96qbZ1wg6AlaRAgDmNLQ6FbnY8CsvxO0zT7hnAG7/uZTNOyQOxUoCs0CQQgHZQF6cSPTaUPLegx7jk1A8ASdFuFsg4Hjp5CyZCkpoHTOarpGwSc0PZAVuk6COY6nIa0nsMhYOJILLPN326I3P/bqldjoPigLKrQZa4B4FetXCGVP0vXlqYXUR78OmxK4h0trdppjWiUDAb4LLidye3aMSf4q26/DtfGGtccG/nRjUbQdlS9SqlYDslOwXNxw4CqXUHGAXbO+JHlXGadlBomehkklJ++fEwpVBGFTeLtOiCMrB2AaZvhovgjuy+Oxk+Ua8XxAMCgksETLURwF7w6pMnIAMiUYdrjl7iusUPDBhDRPy X-Forefront-PRVS: 085551F5A8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB316; 23:108/faNBjk5pfQgLn9gcLebg4hUnBBAK9/kiAZgB3R?= =?us-ascii?Q?wKkW/daCPSBPLiB5vb1RTjs+kX+gZ/zLOzgsSqGFjY7Q840FHe/A1FCT0HuV?= =?us-ascii?Q?vT5ZGFfjMRdmnENV72iUCaBSlyUwGOdObeMcU9K15G4FJRUIKBOXhHcqd8Ug?= =?us-ascii?Q?dxW8GQ4KDIvJPp+3xxPvUvjvsYcj2ZOCDiEdcbyTMkuNroyjJ8+759AGQO6x?= =?us-ascii?Q?UiMYuPSz6PsDbokLAknGoXDjmCX9o+NW+DCSM6ylHrc05wWHmiI8s0UsNE8V?= =?us-ascii?Q?rZXAdPU08Zu402Lx5ZnKEARXKx0GohF34QohpHefbWuPbp+7LWjHBBjdGenk?= =?us-ascii?Q?N46Lwhk4xU7C0eVhHHqu52uXgb+QXWeMy/qRLMPj+hxn+stY/C+ZYbRmE1k5?= =?us-ascii?Q?Ag0dz6Ec2DJuyUxzxiqrfX7ufWyCREfFhRoMTwggWHJAP5oZJSXsHL8sxtGY?= =?us-ascii?Q?7cL0WGnJ94N+OILAx29eWODx5o0q1fMELrhz/8w8kkPjaKh2DZxqDTgfg5or?= =?us-ascii?Q?XId8Ch5OlCnjMn7cstUsiN5aYweP94CNO9B51KhmsXDsjMFcaXJ/xeE/Nl1G?= =?us-ascii?Q?uf6v/KGNBCu4+xe6L2nKRQfZTZTotxbWUgw0URKGjnfHpcDN/J/czMJlk3eW?= =?us-ascii?Q?4zL6bXUB0jtISNiueFVC/UXnUPU+8AKW64KwqoNc+T6A2jTF2u4TZeaZr7F5?= =?us-ascii?Q?oajl/CXbD/Ya5ddX46k4jTmiUepJBuUdvElKEIZ1Oz0gBWSnLWycPpVVwIQz?= =?us-ascii?Q?2bxHp/QGni5jl7oub21+UnPRwXXY5k1dgvfTUFOske0j1lv725t85oVxdhtr?= =?us-ascii?Q?GMAuCCipoWn1ES5T0KyfEO+DP+lhmoEqigYfc7F1+zktgoEHFjiBi4AJqLfv?= =?us-ascii?Q?RZReKMxqp6JOcG9pWgsRefb1uxwpxQEGz4QofCyZKnHoEirf7bejUB6zP71+?= =?us-ascii?Q?/y2CRKBdxqF2yCZ7u5S8XMt45+4AErC2qAv6RVPi+Qqg8B/b0FNCKyChvn+Z?= =?us-ascii?Q?HGjVc2OHinV5SidA5uD031Wtdio2S4ex9vzTMiqXZAfw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB316; 5:XtaeOwuIBO8/GAgJPSsVrFAFXoENpp4YWtjqSFJLhD6kO5gL3T5ThGBqBiLsosDbEpYvIYbk4n33Q8EVnpGFmdgJm0QxSgpqFZ0CadxljzDuzuHLf3VTRWoRF4aj2QoeMLquzvYafQzrQn3PsnU3Jt3yKcyx4ygsaHdXpVmtd7k=; 24:MHnr/11SxDEd7LVe+t22pAVGvgKO3m+RdSAiENH0yUUO687TjB6VNk5GZq99SSCXoN7EStOQIZ2zQdRCEpATQUNEEaUgcGMib1u3V3sSPzg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2016 15:20:37.8015 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB316 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use cast inside 'min' macro in order to avoid the following build warning on ARM64: include/linux/kernel.h:754:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^ drivers/spi/spi.c:2304:17: note: in expansion of macro 'min' xfers[0].len = min(maxsize, xfer[0].len); Signed-off-by: Fabio Estevam --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 0725ffa..4498f40 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2301,7 +2301,7 @@ static int __spi_split_transfer_maxsize(struct spi_master *master, /* the first transfer just needs the length modified, so we * run it outside the loop */ - xfers[0].len = min(maxsize, xfer[0].len); + xfers[0].len = min(maxsize, (size_t)xfer[0].len); /* all the others need rx_buf/tx_buf also set */ for (i = 1, offset = maxsize; i < count; offset += maxsize, i++) {