From patchwork Fri Aug 1 16:56:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 34734 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 20E4E20540 for ; Fri, 1 Aug 2014 17:40:37 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id y10sf27484689pdj.8 for ; Fri, 01 Aug 2014 10:40:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=VfI5jt8DB/oHK2+XFBEfI1l0Yo1tQbfdVGmD6q0hAPU=; b=OklKugBS9OZvgPueO0920BwpGePW2uWcpkM5v9+6s1QnbzJ+PHzz7nuYOUeKwZq+HL FKiFBilyjzvGLmKshVqqohtOHQzq7eNd0zbHPuri25AQb08KUYt+w7VpBlVQjsJd9OYx 1B17hucFzGHjgbSYoTZOF4TrmplzNElvDPlpDx1blBAHum55c0ndwvqduJwzz4nLOXVm 9lM2zapp6FFRBOvFJCUHCPtQ6xGwQsozPR/ThtZfR6VvGu94EmrZPY5yfH+kqoJxs9++ aLlIKDVjHPAW5N31CHaOBANFx5jNgUP/ynXwWma1ZO5PONWwk3dXXP4waAaZHDkh5yo3 ysNg== X-Gm-Message-State: ALoCoQkwLJ/fX9j55xONQCaC0BZPeaFnl3bhgr21NXFbjhcsmTd6zxVCxqMeabrfvmQeex785mue X-Received: by 10.66.192.201 with SMTP id hi9mr2939328pac.0.1406914836406; Fri, 01 Aug 2014 10:40:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.199 with SMTP id t65ls1436432qgd.93.gmail; Fri, 01 Aug 2014 10:40:36 -0700 (PDT) X-Received: by 10.220.82.202 with SMTP id c10mr8282046vcl.31.1406914836258; Fri, 01 Aug 2014 10:40:36 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id j20si7966962ver.69.2014.08.01.10.40.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Aug 2014 10:40:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so7205106vcb.2 for ; Fri, 01 Aug 2014 10:40:36 -0700 (PDT) X-Received: by 10.52.120.38 with SMTP id kz6mr3764621vdb.86.1406914836049; Fri, 01 Aug 2014 10:40:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp128001vcb; Fri, 1 Aug 2014 10:40:35 -0700 (PDT) X-Received: by 10.194.92.115 with SMTP id cl19mr10300378wjb.29.1406914834880; Fri, 01 Aug 2014 10:40:34 -0700 (PDT) Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id o11si7304059wiv.17.2014.08.01.10.40.34 for ; Fri, 01 Aug 2014 10:40:34 -0700 (PDT) Received-SPF: none (google.com: alsa-devel-bounces@alsa-project.org does not designate permitted sender hosts) client-ip=77.48.224.243; Received: by alsa0.perex.cz (Postfix, from userid 1000) id DE784265605; Fri, 1 Aug 2014 19:40:31 +0200 (CEST) Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 81E7B26559E; Fri, 1 Aug 2014 19:29:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 13D4A265675; Fri, 1 Aug 2014 19:29:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_PASS autolearn=disabled version=3.2.4 Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 5A439265681 for ; Fri, 1 Aug 2014 19:22:59 +0200 (CEST) Received: from 94.197.121.167.threembb.co.uk ([94.197.121.167] helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDGXa-0006g0-7k; Fri, 01 Aug 2014 17:22:55 +0000 Received: from broonie by finisterre with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XDG8T-0007s4-Om; Fri, 01 Aug 2014 17:56:53 +0100 From: Mark Brown To: Fabio Estevam , Liam Girdwood Date: Fri, 1 Aug 2014 17:56:50 +0100 Message-Id: <1406912210-30223-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0 X-SA-Exim-Connect-IP: 94.197.121.167 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org, Mark Brown Subject: [alsa-devel] [PATCH] ASoC: imx-audmux: Use uintptr_t for port numbers X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Mark Brown 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 --- 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 267717a..46f9beb 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; - int port = (int)file->private_data; + uintptr_t port = (uintptr_t)file->private_data; u32 pdcr, ptcr; if (audmux_clk) { @@ -147,7 +147,7 @@ static const struct file_operations audmux_debugfs_fops = { static void audmux_debugfs_init(void) { - int i; + uintptr_t i; char buf[20]; audmux_debugfs_root = debugfs_create_dir("audmux", NULL); @@ -157,10 +157,10 @@ static void 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); } }