Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/igt_sysfs: Remove redundant variable assignment
@ 2025-07-16 13:27 Pranay Samala
  2025-07-16 15:00 ` Dixit, Ashutosh
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Pranay Samala @ 2025-07-16 13:27 UTC (permalink / raw)
  To: igt-dev; +Cc: karthik.b.s, sameer.lattannavar, pranay.samala

Eliminate redundant assignment in debug mask setup.
Simplified the logic by directly using the input
parameter for logging and sysfs operations.

Fixes: 835f38b71973 ("lib/igt_sysfs: Update new debug mask requested by user")
Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
 lib/igt_sysfs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index aec157b5b..96ca57ed9 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -506,7 +506,6 @@ void igt_drm_debug_mask_reset_exit_handler(int sig)
  */
 void igt_drm_debug_mask_update(unsigned int mask_to_set)
 {
-	unsigned int new_debug_mask;
 	static bool debug_mask_read_once = true;
 	char buf[20];
 	int dir;
@@ -525,8 +524,8 @@ void igt_drm_debug_mask_update(unsigned int mask_to_set)
 		}
 	}
 
-	igt_debug("Setting DRM debug mask to %d\n", new_debug_mask);
-	snprintf(buf, sizeof(buf), "%d", new_debug_mask);
+	igt_debug("Setting DRM debug mask to %d\n", mask_to_set);
+	snprintf(buf, sizeof(buf), "%d", mask_to_set);
 	igt_assert(igt_sysfs_set(dir, "debug", buf));
 
 	close(dir);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-17 13:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 13:27 [PATCH i-g-t] lib/igt_sysfs: Remove redundant variable assignment Pranay Samala
2025-07-16 15:00 ` Dixit, Ashutosh
2025-07-16 17:40 ` ✓ i915.CI.BAT: success for " Patchwork
2025-07-16 18:45 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-17 10:36 ` ✗ i915.CI.Full: failure " Patchwork
2025-07-17 10:44 ` [PATCH i-g-t] " Kamil Konieczny
2025-07-17 12:01 ` ✓ i915.CI.Full: success for " Patchwork
2025-07-17 13:52 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox