Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2198102imm; Mon, 28 May 2018 03:45:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp5ziLdP3xm+7Qgh+86zHeEI4qAa/sdXeTlrBcdwjmnbhTWtD0VbDk8wWZoFhpH7KTPu26p X-Received: by 2002:a65:45c1:: with SMTP id m1-v6mr10203235pgr.229.1527504355870; Mon, 28 May 2018 03:45:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527504355; cv=none; d=google.com; s=arc-20160816; b=hLL83Nmdld+YF4I4TuphX8iqzMnK+rB52s12hIE7N9fAMZICl9ti3Rl3trYzsOhQPN ftJg6+TdswVvpMOpua5v5XT7hVbj7zjGqxMxLMj0bN1UKp/aC3w2jZMRu3cirdI7bCs7 CAhffsyyESdh35z3XhBAzyLaXXAlVUicTkU35pEPlJ+0ALRoCODXqmBygNdibk5Bdu0L FmtM9SCSo1zvIOjM9zSFIV793dBzIn05neg4OU8I2s/bSzFDQP58LN/wt12RUWU8GZBL YedD7oWkAfI5SBP2arMjphigUQ8YAxyM5vKTDxeyjyGE7m2ODtgNo7sHbgL4xYngQLfF aCaQ== 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=RPCltohZ1L5ZUKcka528zwzEG2EgCCac7GjMjoM6VNE=; b=AOSmWCZatR+yDrUm6YPR3Ku8VlY9q0xhkzXiWrfoo6A1DRiJGlDp4zVfMnUGZHEaoH jnW/8jNVZvlYcBbdjwgSkGMkyQMa4+LnYX6Su5FYmMO0hCgWf3/ut3oE7jSYief7Kzpp eV6kvBpBlkHxJ6jAKjrq2zyfmz1fl+Vmowwp0a7GHcjfKxivqMCQki2SxHNU24Asddz/ 6gPrvcdLHLu98BN/07NCP6mMIt73gEpvhT3r23bvO3mknccBfNUgGsP8wExUogC6t6Iy sd+oUPYCINEYRVnW0MSOXvVQgus91TG/3SDLsudO1U8DoVK3mmbJx3WY8C7Ye3Vh8CSb 7fBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WA9XGnSq; 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 g1-v6si28521030plm.268.2018.05.28.03.45.41; Mon, 28 May 2018 03:45:55 -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=WA9XGnSq; 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 S1033865AbeE1Kpe (ORCPT + 99 others); Mon, 28 May 2018 06:45:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937187AbeE1Kp3 (ORCPT ); Mon, 28 May 2018 06:45:29 -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 4B4DF20660; Mon, 28 May 2018 10:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504328; bh=KZKlbAfFU6uIR7i9QX4vwn2mTccpLInbRki045fiPp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WA9XGnSqreRE4YLTupfLm7YnrjP5zgMAqaZjyJaSc0uas5jAYEoIkXZjGa0pw9/15 q4B8li7dXX2Sx6Ynvb/wt/GmETZUM1hBQbnlsbLCuAxL5R15mwFDFyyPABqamxuM9k O5Oq0Cj6S+v+Gaekw2raYHf6f82dnoCAUMA93oww= 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 4.14 071/496] ARM: OMAP1: clock: Fix debugfs_create_*() usage Date: Mon, 28 May 2018 11:57:36 +0200 Message-Id: <20180528100322.775227675@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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 4.14-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 @@ -1011,17 +1011,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;