From patchwork Thu Jun 25 09:53: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: 50309 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 15C18228FC for ; Thu, 25 Jun 2015 09:54:35 +0000 (UTC) Received: by laar3 with SMTP id r3sf17731699laa.1 for ; Thu, 25 Jun 2015 02:54:33 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=rlwyArfO2Fi6OcsG1tZTCUGlETP3S+Hm2kL1yPAjAI8=; b=Q/qpxm6L6Mbjj6uxRuVB5t7S4B4g11ZTfaXmBaiFrhzHk8Ra4Nkg0Q7MuCvWdbmaYq a1kzju/1oR45gEXtH8stQCMLYNbZxW3W7mMAo+86QNzQX0Pz5rTr1lG4h7mxA9F5JG8j h7ATIHd/lthAQee/JhwlH5Do54UlAr8kQeyiQ2+/o8OwWdwxbiKOhprUVwXWsFYJ/nxG Z92GilCOdlddDn5RaNIym1utsMPu1jKxtT//ICWsJsMG2KAl6i6pkeiMbZvGK8mhlTkc b4DfN89sU8Ggr7wHUBM/N+ohJk2vrytel3cusSG4SBDMByEVhKaSI1nbtR/nUYNJzZnE eH6w== X-Gm-Message-State: ALoCoQkMOafaFskRq8nExTY2I3+vuquYW1zSodSY5AMpeqm9UPfw9/FKYfXIODa4kIF+EuttV2bI X-Received: by 10.152.37.101 with SMTP id x5mr39264579laj.5.1435226073731; Thu, 25 Jun 2015 02:54:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.228 with SMTP id h4ls320993lam.23.gmail; Thu, 25 Jun 2015 02:54:33 -0700 (PDT) X-Received: by 10.112.219.201 with SMTP id pq9mr44131453lbc.109.1435226073610; Thu, 25 Jun 2015 02:54:33 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id ls6si24272422lac.31.2015.06.25.02.54.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 02:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbbvz5 with SMTP id vz5so42166427lbb.0 for ; Thu, 25 Jun 2015 02:54:33 -0700 (PDT) X-Received: by 10.112.55.207 with SMTP id u15mr44061039lbp.88.1435226073509; Thu, 25 Jun 2015 02:54:33 -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.108.230 with SMTP id hn6csp481513lbb; Thu, 25 Jun 2015 02:54:32 -0700 (PDT) X-Received: by 10.68.175.35 with SMTP id bx3mr53642044pbc.128.1435226062555; Thu, 25 Jun 2015 02:54:22 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si44357834pat.64.2015.06.25.02.54.21; Thu, 25 Jun 2015 02:54:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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 S1752010AbbFYJyS (ORCPT + 2 others); Thu, 25 Jun 2015 05:54:18 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:51878 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751863AbbFYJyO (ORCPT ); Thu, 25 Jun 2015 05:54:14 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1Z83rI-0001He-B9; Thu, 25 Jun 2015 11:54:12 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Mark Brown , Jiri Slaby Subject: [patch added to the 3.12 stable tree] ASoC: imx-audmux: Use uintptr_t for port numbers Date: Thu, 25 Jun 2015 11:53:54 +0200 Message-Id: <1435226052-4866-4-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1435226052-4866-1-git-send-email-jslaby@suse.cz> References: <1435226052-4866-1-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.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.217.177 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 This patch has been added to the 3.12 stable tree. If you have any objections, please let us 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); } }