Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2524007imm; Mon, 28 May 2018 09:42:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoQ+D2VZbZZBp8bxtG0z9DMj4fsOhjpjm4tbutXZrJJQZUbBEiveEa9eh3X+GPqu/zNbWzI X-Received: by 2002:a65:508d:: with SMTP id r13-v6mr11371422pgp.134.1527525778037; Mon, 28 May 2018 09:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527525778; cv=none; d=google.com; s=arc-20160816; b=Zeb/u0rRtbMj3WnimroUKb0arDhkfj49gIh0eeL0HjdokVhXhKyjfNuUHV3lkOS1gL E8kEm1N2nv+zTAgTtFvmjkY3kP3cgdsuPvO/SF7YCeixMgf8+mA9EFy7PLuqkq81TXpm 1JaYMC5DcFZS3QSckBqQN5hrIag2inqgHPvuw7a4t0zSCufLyVTeOPzygFiV6kIrchqf h6I/I3chL9xLBv5nX9JeRymPKJJcGP+S/+c5Xvdp3Mlm/u3ymA1uEkGGz9hx3Z+og+Z7 DoaXAA8FQxaj3Q1uULTEZA7LKJUfunghFijDNhPc7n+0j/irrHpFZnC4EMxdo7k1S78Y Pk4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=iH3/ZgBSoC/y1PEpY7SYueAffUGCuGxl78aWlUq+91E=; b=jWJENuHNZd+Q1iOn0GTNcY+3qv0O83J4jK4vvnaRAAopc/tvtJtKrvvqr9urwc2eXw deY/+mHZ/TwyFmV2S7Rt4UnBvI9ZLiFSs9Ys0CjPjVw+SNQbvmbrdK/YLIkD9GJ0qq8f wQ3nbYIryq4r6iLBk4qUb4tCreNpAhK00guWzXFB1GRqtGMubYr7XB1DRfGE4+MiFZ2J geWFRpuASIYtm3gl11LpPEgVBquU+ypNiqMFxJiWE29SMZ79IvkXTdnreG4fxiDKfBAk NhLD/V0aD0mOhGAlF1Gnndsdp+Y9Hocja2vkKziDkz2uJzYzBDD0GRyOdFJITXFpxiDh plXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XQDE6MWz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi12-v6si29456642plb.555.2018.05.28.09.42.13; Mon, 28 May 2018 09:42:58 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XQDE6MWz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940341AbeE1Qkv (ORCPT + 99 others); Mon, 28 May 2018 12:40:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:56200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933984AbeE1KIJ (ORCPT ); Mon, 28 May 2018 06:08:09 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 838F82086D; Mon, 28 May 2018 10:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502089; bh=8ghhx7A4tAw4GdYBvY62s4PhAOMNMJvTV2hnaeVYcss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQDE6MWzL4jbzs0go6kJkVfSQII1UACFKISK5dBunktHHtgWmqlc53UVH0rqMazMg W1pUmWfM+zWrVOfYGUz5LL5loJSDcabqVoI9ANFh6uJGaso+6xt9ztVhgfV6RRqhDg H2RcAqqcafxPL+wlpi/buiOIIOgRYI8UsnkCkr/Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Aaro Koskinen , Tony Lindgren , Sasha Levin Subject: [PATCH 3.18 057/185] ARM: OMAP1: clock: Fix debugfs_create_*() usage Date: Mon, 28 May 2018 12:01:38 +0200 Message-Id: <20180528100055.721477967@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven [ Upstream commit 8cbbf1745dcde7ba7e423dc70619d223de90fd43 ] When exposing data access through debugfs, the correct debugfs_create_*() functions must be used, depending on data type. Remove all casts from data pointers passed to debugfs_create_*() functions, as such casts prevent the compiler from flagging bugs. Correct all wrong usage: - clk.rate is unsigned long, not u32, - clk.flags is u8, not u32, which exposed the successive clk.rate_offset and clk.src_offset fields. Signed-off-by: Geert Uytterhoeven Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-omap1/clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -1031,17 +1031,17 @@ static int clk_debugfs_register_one(stru return -ENOMEM; c->dent = d; - d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usecount); + d = debugfs_create_u8("usecount", S_IRUGO, c->dent, &c->usecount); if (!d) { err = -ENOMEM; goto err_out; } - d = debugfs_create_u32("rate", S_IRUGO, c->dent, (u32 *)&c->rate); + d = debugfs_create_ulong("rate", S_IRUGO, c->dent, &c->rate); if (!d) { err = -ENOMEM; goto err_out; } - d = debugfs_create_x32("flags", S_IRUGO, c->dent, (u32 *)&c->flags); + d = debugfs_create_x8("flags", S_IRUGO, c->dent, &c->flags); if (!d) { err = -ENOMEM; goto err_out;