소스 검색

thermal/x86 pkg temp: Remove debugfs_create_u32() casts

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>
Geert Uytterhoeven 7 년 전
부모
커밋
e74c2d65ff
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      drivers/thermal/x86_pkg_temp_thermal.c

+ 2 - 2
drivers/thermal/x86_pkg_temp_thermal.c

@@ -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;