Re: [PATCH 4.4 06/16] clk: Fix debugfs_create_*() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2020 at 09:40:04PM +0100, Lee Jones wrote:
> From: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> 
> [ Upstream commit 4c8326d5ebb0de3191e98980c80ab644026728d0 ]
> 
> When exposing data access through debugfs, the correct
> debugfs_create_*() functions must be used, matching the data
> types.
> 
> Remove all casts from data pointers passed to debugfs_create_*()
> functions, as such casts prevent the compiler from flagging bugs.
> 
> clk_core.rate and .accuracy are "unsigned long", hence casting
> their addresses to "u32 *" exposed the wrong halves on big-endian
> 64-bit systems. Fix this by using debugfs_create_ulong() instead.
> 
> Octal permissions are preferred, as they are easier to read than
> symbolic permissions. Hence replace "S_IRUGO" by "0444"
> throughout.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> [sboyd@xxxxxxxxxxxxxx: Squash the octal change in too]
> Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
> ---
>  drivers/clk/clk.c | 30 ++++++++++++++----------------
>  1 file changed, 14 insertions(+), 16 deletions(-)

What about 4.9?

I'm going to stop here and wait for a fixed up series of this, and any
newer kernels that need the patches as well.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux