Commit 7d14db8b authored by Andi Shyti's avatar Andi Shyti Committed by Matthew Auld

drm/i915/debugfs: Do not return '0' if there is nothing to return

Change functions that always return '0' to be void type.
Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321122759.227091-1-andi.shyti@linux.intel.com
parent 230523ba
...@@ -30,7 +30,7 @@ int intel_gt_debugfs_reset_show(struct intel_gt *gt, u64 *val) ...@@ -30,7 +30,7 @@ int intel_gt_debugfs_reset_show(struct intel_gt *gt, u64 *val)
} }
} }
int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val) void intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val)
{ {
/* Flush any previous reset before applying for a new one */ /* Flush any previous reset before applying for a new one */
wait_event(gt->reset.queue, wait_event(gt->reset.queue,
...@@ -38,7 +38,6 @@ int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val) ...@@ -38,7 +38,6 @@ int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val)
intel_gt_handle_error(gt, val, I915_ERROR_CAPTURE, intel_gt_handle_error(gt, val, I915_ERROR_CAPTURE,
"Manually reset engine mask to %llx", val); "Manually reset engine mask to %llx", val);
return 0;
} }
/* /*
...@@ -52,7 +51,9 @@ static int __intel_gt_debugfs_reset_show(void *data, u64 *val) ...@@ -52,7 +51,9 @@ static int __intel_gt_debugfs_reset_show(void *data, u64 *val)
static int __intel_gt_debugfs_reset_store(void *data, u64 val) static int __intel_gt_debugfs_reset_store(void *data, u64 val)
{ {
return intel_gt_debugfs_reset_store(data, val); intel_gt_debugfs_reset_store(data, val);
return 0;
} }
DEFINE_SIMPLE_ATTRIBUTE(reset_fops, __intel_gt_debugfs_reset_show, DEFINE_SIMPLE_ATTRIBUTE(reset_fops, __intel_gt_debugfs_reset_show,
......
...@@ -48,6 +48,6 @@ void intel_gt_debugfs_register_files(struct dentry *root, ...@@ -48,6 +48,6 @@ void intel_gt_debugfs_register_files(struct dentry *root,
/* functions that need to be accessed by the upper level non-gt interfaces */ /* functions that need to be accessed by the upper level non-gt interfaces */
int intel_gt_debugfs_reset_show(struct intel_gt *gt, u64 *val); int intel_gt_debugfs_reset_show(struct intel_gt *gt, u64 *val);
int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val); void intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val);
#endif /* INTEL_GT_DEBUGFS_H */ #endif /* INTEL_GT_DEBUGFS_H */
...@@ -23,38 +23,38 @@ ...@@ -23,38 +23,38 @@
#include "intel_uncore.h" #include "intel_uncore.h"
#include "vlv_sideband.h" #include "vlv_sideband.h"
int intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt) void intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt)
{ {
atomic_inc(&gt->user_wakeref); atomic_inc(&gt->user_wakeref);
intel_gt_pm_get(gt); intel_gt_pm_get(gt);
if (GRAPHICS_VER(gt->i915) >= 6) if (GRAPHICS_VER(gt->i915) >= 6)
intel_uncore_forcewake_user_get(gt->uncore); intel_uncore_forcewake_user_get(gt->uncore);
return 0;
} }
int intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt) void intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt)
{ {
if (GRAPHICS_VER(gt->i915) >= 6) if (GRAPHICS_VER(gt->i915) >= 6)
intel_uncore_forcewake_user_put(gt->uncore); intel_uncore_forcewake_user_put(gt->uncore);
intel_gt_pm_put(gt); intel_gt_pm_put(gt);
atomic_dec(&gt->user_wakeref); atomic_dec(&gt->user_wakeref);
return 0;
} }
static int forcewake_user_open(struct inode *inode, struct file *file) static int forcewake_user_open(struct inode *inode, struct file *file)
{ {
struct intel_gt *gt = inode->i_private; struct intel_gt *gt = inode->i_private;
return intel_gt_pm_debugfs_forcewake_user_open(gt); intel_gt_pm_debugfs_forcewake_user_open(gt);
return 0;
} }
static int forcewake_user_release(struct inode *inode, struct file *file) static int forcewake_user_release(struct inode *inode, struct file *file)
{ {
struct intel_gt *gt = inode->i_private; struct intel_gt *gt = inode->i_private;
return intel_gt_pm_debugfs_forcewake_user_release(gt); intel_gt_pm_debugfs_forcewake_user_release(gt);
return 0;
} }
static const struct file_operations forcewake_user_fops = { static const struct file_operations forcewake_user_fops = {
......
...@@ -14,7 +14,7 @@ void intel_gt_pm_debugfs_register(struct intel_gt *gt, struct dentry *root); ...@@ -14,7 +14,7 @@ void intel_gt_pm_debugfs_register(struct intel_gt *gt, struct dentry *root);
void intel_gt_pm_frequency_dump(struct intel_gt *gt, struct drm_printer *m); void intel_gt_pm_frequency_dump(struct intel_gt *gt, struct drm_printer *m);
/* functions that need to be accessed by the upper level non-gt interfaces */ /* functions that need to be accessed by the upper level non-gt interfaces */
int intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt); void intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt);
int intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt); void intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt);
#endif /* INTEL_GT_PM_DEBUGFS_H */ #endif /* INTEL_GT_PM_DEBUGFS_H */
...@@ -578,8 +578,9 @@ static int i915_wedged_get(void *data, u64 *val) ...@@ -578,8 +578,9 @@ static int i915_wedged_get(void *data, u64 *val)
static int i915_wedged_set(void *data, u64 val) static int i915_wedged_set(void *data, u64 val)
{ {
struct drm_i915_private *i915 = data; struct drm_i915_private *i915 = data;
intel_gt_debugfs_reset_store(to_gt(i915), val);
return intel_gt_debugfs_reset_store(to_gt(i915), val); return 0;
} }
DEFINE_SIMPLE_ATTRIBUTE(i915_wedged_fops, DEFINE_SIMPLE_ATTRIBUTE(i915_wedged_fops,
...@@ -727,15 +728,17 @@ static int i915_sseu_status(struct seq_file *m, void *unused) ...@@ -727,15 +728,17 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
static int i915_forcewake_open(struct inode *inode, struct file *file) static int i915_forcewake_open(struct inode *inode, struct file *file)
{ {
struct drm_i915_private *i915 = inode->i_private; struct drm_i915_private *i915 = inode->i_private;
intel_gt_pm_debugfs_forcewake_user_open(to_gt(i915));
return intel_gt_pm_debugfs_forcewake_user_open(to_gt(i915)); return 0;
} }
static int i915_forcewake_release(struct inode *inode, struct file *file) static int i915_forcewake_release(struct inode *inode, struct file *file)
{ {
struct drm_i915_private *i915 = inode->i_private; struct drm_i915_private *i915 = inode->i_private;
intel_gt_pm_debugfs_forcewake_user_release(to_gt(i915));
return intel_gt_pm_debugfs_forcewake_user_release(to_gt(i915)); return 0;
} }
static const struct file_operations i915_forcewake_fops = { static const struct file_operations i915_forcewake_fops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment