Skip to content

Commit

Permalink
thermal/x86 pkg temp: Remove debugfs_create_u32() casts
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
  • Loading branch information
Geert Uytterhoeven authored and Zhang Rui committed Jan 13, 2018
1 parent 0be8696 commit e74c2d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/thermal/x86_pkg_temp_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ static int pkg_temp_debugfs_init(void)
return -ENOENT;

d = debugfs_create_u32("pkg_thres_interrupt", S_IRUGO, debugfs,
(u32 *)&pkg_interrupt_cnt);
&pkg_interrupt_cnt);
if (!d)
goto err_out;

d = debugfs_create_u32("pkg_thres_work", S_IRUGO, debugfs,
(u32 *)&pkg_work_cnt);
&pkg_work_cnt);
if (!d)
goto err_out;

Expand Down

0 comments on commit e74c2d6

Please sign in to comment.