From patchwork Wed Sep 18 20:01:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11151199 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E979D14DB for ; Wed, 18 Sep 2019 20:02:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C766A207FC for ; Wed, 18 Sep 2019 20:02:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="byaapf83" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C766A207FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Nb0HsDgneNDRW0+9UpwsJWuWC3b8HUsGSCrwpGoGj4s=; b=byaapf83wWMxxj BXXGZCIWwv56vujMWyHtL933Qn9J6Y4q+0gQhlH4E709joR3xsIAkBsDqfmBkx3rIqt/Vl/pu757X pyYvieDGXLNLl/A0yQs8Ai7bbaUYUR33U+hDqA9TMQN6I0BAXTQu1D6AoF0kJ09PLZL1Jyre6NjA4 JUIOKGRjHDrK/wQQKMaTfAvKR/jPgEVNxSzs8yMkZNSdkG/yTHJ7+vZcOpqlW1FnFSZ3yWuyZXFiQ 3pmS5yYe+ngWkof91HCLF26TJvLkMKmenwhy68vpVfXzPUdxw0MYAZX9IeU+pZ00RxS0mtIwM7hkz 8HGm7+AC4GoOOO29/CGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iAg9U-0005aO-F3; Wed, 18 Sep 2019 20:02:12 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iAg9Q-0005ZY-4q for linux-arm-kernel@lists.infradead.org; Wed, 18 Sep 2019 20:02:09 +0000 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MbAtM-1hdXFq3c8O-00baXC; Wed, 18 Sep 2019 22:02:02 +0200 From: Arnd Bergmann To: Felipe Balbi , Greg Kroah-Hartman , Vladimir Zapolskiy , Sylvain Lemieux Subject: [PATCH] udc: lpc32xx: fix 64-bit compiler warning Date: Wed, 18 Sep 2019 22:01:41 +0200 Message-Id: <20190918200201.2292008-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:bxmp9dxd7Rf7t+/OQ2JUHr1N8GlyL8/PIoJYASViwBPyicev7rU mGcazxroqrLSR8aEG3r61RC0FTDY3Z/BB70JjUmx5SaeGIjTkD02/Iao/Rd+7mm5OiPszrn FQaA/aOrpghPymORpTgqUWD9Fsq1MYqllZiZOYSGPBvrv7e9LDs+rXgyTcbv890NE8KPCCW 0CDNbVvuz1asLg62dvs5w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:jeVV6YZmc9o=:A6TaEpzkeGq91HCJvjF+ED zWi3nmSwgbTVAYHyP4cpemKiYgURYEPadrm4qGR0Hxps2xPeqTmPj7MykYvboXsiSse4UqKv6 M4SjDGkK+ADlHNUp4C1rTabbS9vHC+MFR/Ia9cQYeoJjLpt58x04zVmQpu0okrJ0d1D+1lcpE M4wOQhrAuMUhFFoM0WilzCEbBBlY7QhxbxHG0sApr4SP/nWHg3ug4Qf0jofejTwyHLarKC2lp RoCsDU6p8rfAlY+Qn+tJ2Y+Zn7yTS3FdzXUTMZHBDfgHYq+2j7MpkoHlWFfO+jTPkl+/AWXm1 YHF2GfwrSEUBUT1DL//5YEOX9E23S6BAbFwQzanf/GIrmE4/DGHkSB+YPSqzGPgtJymQSYn6k MzU6oqcn7muGo1FZiNkK19aPCVhT2vG/6cPsu4fxWis21E5xnUdQZOfQ48ScHg9u4D3ZYo7p9 kMUsMr1Mb6+rMQBzgY1qV8XT3CzZgjwQofZqFxlAgTjzuLplChuuwxASCHpBYw+aw2MK9L8wW FAVbF/F4hzfSPz0m7s0k8/l83uiTgslG4000kDmXp7QuGu9neoUfrZaTWYAiA/aOCbFaxUfje 5AxYpHmHI1eP3c6a5se+4UojEqGK375TcBibjXGD05YKlpJjelzjqtPn8Qb9MXP6FyUHnED2k c8sIXxnCpfAmgEPZdM2oJFIidrZDBnoMgMiYDQZZiKSkY4zsdf1D6dd1/d23AswfCdnE/DU31 HpkxP0pIAnggserqBj80Ldmh2ZQU8dwNEKAWO5oNly+uOFvxXwDuBw1bBf9B8GIIdPyK7NKA4 vPRHbH+jc5mHtrvyepL+QN9kc6MKA1l2s+nTy4BYWj2N6apHHZpA1p0uiFA8+hjp2B4leAvPl VXVEQIFGxozISn8jh88A== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190918_130208_484453_FB3B083C X-CRM114-Status: GOOD ( 12.02 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.126.131 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, Linus Torvalds , linux-kernel@vger.kernel.org, Arnd Bergmann Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org gcc points out a suspicious cast from a pointer to an 'int' when compile-testing on 64-bit architectures. drivers/usb/gadget/udc/lpc32xx_udc.c: In function ‘udc_pop_fifo’: drivers/usb/gadget/udc/lpc32xx_udc.c:1156:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/udc/lpc32xx_udc.c: In function ‘udc_stuff_fifo’: drivers/usb/gadget/udc/lpc32xx_udc.c:1257:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] The code works find, but it's easy enough to change the cast to a uintptr_t to shut up that warning. Reported-by: Linus Torvalds Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/udc/Kconfig | 2 +- drivers/usb/gadget/udc/lpc32xx_udc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index 868bdf7f42d0..ac0891a3dbf2 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -45,7 +45,7 @@ config USB_AT91 config USB_LPC32XX tristate "LPC32XX USB Peripheral Controller" - depends on ARCH_LPC32XX + depends on ARCH_LPC32XX || COMPILE_TEST depends on I2C select USB_ISP1301 help diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c index b3e073fb88c6..2b1f3cc7819b 100644 --- a/drivers/usb/gadget/udc/lpc32xx_udc.c +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c @@ -1151,7 +1151,7 @@ static void udc_pop_fifo(struct lpc32xx_udc *udc, u8 *data, u32 bytes) u32 *p32, tmp, cbytes; /* Use optimal data transfer method based on source address and size */ - switch (((u32) data) & 0x3) { + switch (((uintptr_t) data) & 0x3) { case 0: /* 32-bit aligned */ p32 = (u32 *) data; cbytes = (bytes & ~0x3); @@ -1252,7 +1252,7 @@ static void udc_stuff_fifo(struct lpc32xx_udc *udc, u8 *data, u32 bytes) u32 *p32, tmp, cbytes; /* Use optimal data transfer method based on source address and size */ - switch (((u32) data) & 0x3) { + switch (((uintptr_t) data) & 0x3) { case 0: /* 32-bit aligned */ p32 = (u32 *) data; cbytes = (bytes & ~0x3);