Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933686AbbG1KRk (ORCPT ); Tue, 28 Jul 2015 06:17:40 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33715 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451AbbG1JpF (ORCPT ); Tue, 28 Jul 2015 05:45:05 -0400 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Mark Brown , Jiri Slaby Subject: [PATCH 3.12 040/124] ASoC: imx-audmux: Use uintptr_t for port numbers Date: Tue, 28 Jul 2015 11:42:54 +0200 Message-Id: <8a0590bf26a346a639bda802c710315c1502fab5.1438076484.git.jslaby@suse.cz> X-Mailer: git-send-email 2.4.6 In-Reply-To: <90d8a5681e4a9e320611b422f0ed012e148c2bca.1438076484.git.jslaby@suse.cz> References: <90d8a5681e4a9e320611b422f0ed012e148c2bca.1438076484.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2051 Lines: 62 From: Mark Brown 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit e5f89768e9bc1f441d18e2299518a2907e5017c9 upstream. Since we pass the port number through file private data for debugfs we cast it to and from a pointer so use uintptr_t in order to ensure that the types are compatible, avoiding warnings on 64 bit platforms where pointers are 64 bit and unsigned integers 32 bit. Signed-off-by: Mark Brown Signed-off-by: Jiri Slaby --- sound/soc/fsl/imx-audmux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index d3bf71a0ec56..e74f2098f1e1 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -67,7 +67,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, { ssize_t ret; char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL); - int port = (int)file->private_data; + uintptr_t port = (uintptr_t)file->private_data; u32 pdcr, ptcr; if (!buf) @@ -146,7 +146,7 @@ static const struct file_operations audmux_debugfs_fops = { static void __init audmux_debugfs_init(void) { - int i; + uintptr_t i; char buf[20]; audmux_debugfs_root = debugfs_create_dir("audmux", NULL); @@ -156,10 +156,10 @@ static void __init audmux_debugfs_init(void) } for (i = 0; i < MX31_AUDMUX_PORT7_SSI_PINS_7 + 1; i++) { - snprintf(buf, sizeof(buf), "ssi%d", i); + snprintf(buf, sizeof(buf), "ssi%lu", i); if (!debugfs_create_file(buf, 0444, audmux_debugfs_root, (void *)i, &audmux_debugfs_fops)) - pr_warning("Failed to create AUDMUX port %d debugfs file\n", + pr_warning("Failed to create AUDMUX port %lu debugfs file\n", i); } } -- 2.4.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/