Skip to content

Commit ad00446

Browse files
committed
platform/x86/amd/hsmp: Use IS_ENABLED() instead of IS_REACHABLE()
JIRA: https://issues.redhat.com/browse/RHEL-102859 commit e7c1a9e Author: Suma Hegde <suma.hegde@amd.com> Date: Tue Jun 3 05:58:07 2025 +0000 platform/x86/amd/hsmp: Use IS_ENABLED() instead of IS_REACHABLE() IS_REACHABLE() was required when CONFIG_HWMON was set to m and HSMP to y. However, commit 69157b0 ("platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m") added a HWMON dependency for HSMP in Kconfig. With this change, using IS_ENABLED() is sufficient. Add the missing header file as well. Signed-off-by: Suma Hegde <suma.hegde@amd.com> Link: https://lore.kernel.org/r/20250603055807.2503028-1-suma.hegde@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent d7e79f7 commit ad00446

File tree

1 file changed

+2
-1
lines changed
  • drivers/platform/x86/amd/hsmp

1 file changed

+2
-1
lines changed

drivers/platform/x86/amd/hsmp/hsmp.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/compiler_types.h>
1414
#include <linux/device.h>
1515
#include <linux/hwmon.h>
16+
#include <linux/kconfig.h>
1617
#include <linux/miscdevice.h>
1718
#include <linux/pci.h>
1819
#include <linux/semaphore.h>
@@ -64,7 +65,7 @@ int hsmp_misc_register(struct device *dev);
6465
int hsmp_get_tbl_dram_base(u16 sock_ind);
6566
ssize_t hsmp_metric_tbl_read(struct hsmp_socket *sock, char *buf, size_t size);
6667
struct hsmp_plat_device *get_hsmp_pdev(void);
67-
#if IS_REACHABLE(CONFIG_HWMON)
68+
#if IS_ENABLED(CONFIG_HWMON)
6869
int hsmp_create_sensor(struct device *dev, u16 sock_ind);
6970
#else
7071
static inline int hsmp_create_sensor(struct device *dev, u16 sock_ind) { return 0; }

0 commit comments

Comments
 (0)