From patchwork Tue Jul 28 09:42:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 51579 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 2F8A722DB9 for ; Tue, 28 Jul 2015 10:17:49 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf36371358lbc.1 for ; Tue, 28 Jul 2015 03:17:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=arb9ka80JYCKXBxYMIcZybBvuQKeq3GVlqBCOuD+ojw=; b=UrVkUfNEHPdSd+jmGSEKE9uHvO+xP4FNAkRYdLmVi+rOMQfmkjkkkeDh+TnyCWNYYX YxEab/Nrt0vWFnf2wutEf2Jcyv9s+dUosOoemmfhe6ZblV4Xavyx4edY48KCGzHCmXJH COebK790Fy9I5Dsab/XtF7dWEoFx1NOX7mN8hSGkXCnH1e45QNgF5Tbi4/gNTpa0sedH 12H6H2MMbaajL0IOh2R2gDrF3wTv5ZWY38yCGRh6H8ASLLDTLvk24I21yFimGsgok64D HiKHqeh/FpcQmrmiIyDwnCH96WrnJhtTIAj6mgKgEsUm1fwsvNk3bbsqnMXJKUQItqvV bFsg== X-Gm-Message-State: ALoCoQkxQLLshzCbQjzwuDDkIs9TzBLCdDLb1hD5aAKV9qDd/NURDPF8Us/6178RiFbpRqI7trA6 X-Received: by 10.152.22.163 with SMTP id e3mr13752397laf.6.1438078667908; Tue, 28 Jul 2015 03:17:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.194 with SMTP id y2ls706613lad.16.gmail; Tue, 28 Jul 2015 03:17:47 -0700 (PDT) X-Received: by 10.152.27.134 with SMTP id t6mr7847137lag.100.1438078667756; Tue, 28 Jul 2015 03:17:47 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id cy1si8285147lac.38.2015.07.28.03.17.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 03:17:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by laah7 with SMTP id h7so65589671laa.0 for ; Tue, 28 Jul 2015 03:17:47 -0700 (PDT) X-Received: by 10.152.26.163 with SMTP id m3mr31829132lag.86.1438078667309; Tue, 28 Jul 2015 03:17:47 -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.112.7.198 with SMTP id l6csp2043006lba; Tue, 28 Jul 2015 03:17:46 -0700 (PDT) X-Received: by 10.107.7.105 with SMTP id 102mr52889101ioh.81.1438078665818; Tue, 28 Jul 2015 03:17:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id re6si51925421pab.88.2015.07.28.03.17.44; Tue, 28 Jul 2015 03:17:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933687AbbG1KRk (ORCPT + 28 others); 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 Received: by wicmv11 with SMTP id mv11so171801095wic.0; Tue, 28 Jul 2015 02:45:04 -0700 (PDT) X-Received: by 10.180.211.196 with SMTP id ne4mr33084546wic.23.1438076704190; Tue, 28 Jul 2015 02:45:04 -0700 (PDT) Received: from anemoi.home (ip4-83-240-67-251.cust.nbox.cz. [83.240.67.251]) by smtp.gmail.com with ESMTPSA id uc16sm18120323wib.8.2015.07.28.02.45.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jul 2015 02:45:03 -0700 (PDT) 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.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.215.42 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); } }