diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-12-20 08:19:23 -0800 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 16:27:45 -0500 |
commit | b6e1b708176846248c87318786d22465ac96dd2c (patch) | |
tree | 221de3b05c265913bd8df504b40134c68ac155c9 | |
parent | de991b9af0532a05d5206c065bf343d6a767a9d2 (diff) | |
download | linux-stable-b6e1b708176846248c87318786d22465ac96dd2c.tar.gz linux-stable-b6e1b708176846248c87318786d22465ac96dd2c.tar.bz2 linux-stable-b6e1b708176846248c87318786d22465ac96dd2c.zip |
drm/xe: Remove uninitialized variable from warning
"err" is not initialized when failing to create and add the freq0 sysfs
file. Remove it from the message. This fixes the following warning with
clang:
../drivers/gpu/drm/xe/xe_gt_freq.c:202:30: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized]
kobject_name(gt->sysfs), err);
^~~
Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs")
Reviewed-by: MichaĆ Winiarski <michal.winiarski@intel.com>
Link: https://lore.kernel.org/r/20231220161923.3740489-1-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_gt_freq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_freq.c b/drivers/gpu/drm/xe/xe_gt_freq.c index 08eabcafe7bc..3adfa6686e7c 100644 --- a/drivers/gpu/drm/xe/xe_gt_freq.c +++ b/drivers/gpu/drm/xe/xe_gt_freq.c @@ -198,8 +198,8 @@ void xe_gt_freq_init(struct xe_gt *gt) gt->freq = kobject_create_and_add("freq0", gt->sysfs); if (!gt->freq) { - drm_warn(&xe->drm, "failed to add freq0 directory to %s, err: %d\n", - kobject_name(gt->sysfs), err); + drm_warn(&xe->drm, "failed to add freq0 directory to %s\n", + kobject_name(gt->sysfs)); return; } |