Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: dell-pc: Use non-atomic bitmap operations

The choices bitmap belongs only to this thread, therefore we can use the
non-atomic version of set_bit().

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250411-dell-faux-v1-2-ea1f1c929b7e@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Kurt Borja and committed by
Ilpo Järvinen
48e21e02 4630b99d

+5 -4
+5 -4
drivers/platform/x86/dell/dell-pc.c
··· 11 11 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 12 12 13 13 #include <linux/bitfield.h> 14 + #include <linux/bitops.h> 14 15 #include <linux/bits.h> 15 16 #include <linux/dmi.h> 16 17 #include <linux/err.h> ··· 229 228 static int thermal_platform_profile_probe(void *drvdata, unsigned long *choices) 230 229 { 231 230 if (supported_modes & DELL_QUIET) 232 - set_bit(PLATFORM_PROFILE_QUIET, choices); 231 + __set_bit(PLATFORM_PROFILE_QUIET, choices); 233 232 if (supported_modes & DELL_COOL_BOTTOM) 234 - set_bit(PLATFORM_PROFILE_COOL, choices); 233 + __set_bit(PLATFORM_PROFILE_COOL, choices); 235 234 if (supported_modes & DELL_BALANCED) 236 - set_bit(PLATFORM_PROFILE_BALANCED, choices); 235 + __set_bit(PLATFORM_PROFILE_BALANCED, choices); 237 236 if (supported_modes & DELL_PERFORMANCE) 238 - set_bit(PLATFORM_PROFILE_PERFORMANCE, choices); 237 + __set_bit(PLATFORM_PROFILE_PERFORMANCE, choices); 239 238 240 239 return 0; 241 240 }