Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2469981imm; Mon, 28 May 2018 08:41:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqj2bV7cfMgro4D4kVzN/20zr9SC1X9caLj1dmMLEd8/MJepZ+iUkVplAjM+CcY28aRk5e6 X-Received: by 2002:a62:e211:: with SMTP id a17-v6mr13691749pfi.126.1527522067201; Mon, 28 May 2018 08:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527522067; cv=none; d=google.com; s=arc-20160816; b=Yj3kg9BzjhjAzzG8D7Ak/hd5HFBnqTha53ihlZYHOw8Ceq5y1Tyk/uvTqlk9Yj0StB XFeXUbXJQev1gDzkuMMCG+G4TM/XcIs+vcIXsoDVjixHqsS3v+tmD13W86hCY4hMCjyR w8zNPBoMhloPh+oJfbs1Fd3qBAiEXcJJa5MXkDSbnF0MOxI2jS/sRx+HoY6j4MJnbQN1 ZMiMNvHD7hTimUI5aUMeWmnCxl1GJeYl5XCqocPjPjhdLYssN9xMJsYJZDibEUm1K1xM PpjkJk5L65d6jZRoz93f4jkEYKJjzyTbQvhadspcekFlUDiyJMqJXsNynXFhJBdfNOkX IpVA== 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=f/ud5c2foaagHr4SW5nmpZQNTywc+0bCEfoga36LyWs=; b=Lcz/kwO7UnEKckbuJNYh+i391Zi8O+mxvQksvXbuLxWbfQ+RSPruyt+Fp2MUEOKP1Z NgWXSH+k/u0KbTrPBJZfJqD4GwtpmvGwlrYP2mVkKs77IdQyrxttIaGZ1auczxMFInYP C/sxk5maIFHwcWjtSe7Q4LntA1LcTzINjMMokNxx+6XeJUKas/sHGM/w5My/uoWZwTlh v5B91XT4sn9hvNsGHPmAFbt/8FrKZP671rDZUUhJn9aMcFqNfSavwlPfdR4JQylFU/5g 5kGViwR60hiFPAFQiZlLZnv857d+sXHIndDJh2/Ot37DU58ndTfBngZCObKjEVP1PGMu 4Gfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V/t2iee7; 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 v17-v6si30488393pfg.222.2018.05.28.08.40.37; Mon, 28 May 2018 08:41:07 -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=V/t2iee7; 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 S1034695AbeE1PkG (ORCPT + 99 others); Mon, 28 May 2018 11:40:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:37998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030444AbeE1KRv (ORCPT ); Mon, 28 May 2018 06:17:51 -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 8AB32208AC; Mon, 28 May 2018 10:17:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502671; bh=CW95JZojw4/r1EW1BqkBLaPLiVfZnHJ+yUI0TYEvvXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V/t2iee7hHcwQyIphVsSZ+4RQoH3KCohgRmHAo2zhRL4iLQAzgyfxIyR4VqEHGVra RHGJqoOdiaCLaQch/A8xef/MdInF74hMCS9MZDSzXCUnTxhQkAhBooXeGHIjqn8HDG ArM8W+Zjp284z/vwWvDYP6AHoEwhGjcbiNl5lYzo= 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.4 087/268] ARM: OMAP1: clock: Fix debugfs_create_*() usage Date: Mon, 28 May 2018 12:01:01 +0200 Message-Id: <20180528100212.020711401@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100202.045206534@linuxfoundation.org> References: <20180528100202.045206534@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.4-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;