]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: amd-pmc: Shuffle location of amd_pmc_get_smu_version()
authorNathan Chancellor <nathan@kernel.org>
Mon, 18 Apr 2022 21:38:00 +0000 (14:38 -0700)
committerHans de Goede <hdegoede@redhat.com>
Wed, 27 Apr 2022 14:25:24 +0000 (16:25 +0200)
commitf58bc9e1a388e5ccf2b23ada493eb9ac6599c99b
treed033c643ae4e8f824a57d782a7e78cefec5eec3e
parent679fa8f486ab4f4dfc619ac22f2af43f3765ce59
platform/x86: amd-pmc: Shuffle location of amd_pmc_get_smu_version()

When CONFIG_DEBUG_FS is disabled, amd_pmc_get_smu_version() is unused:

  drivers/platform/x86/amd-pmc.c:196:12: warning: unused function 'amd_pmc_get_smu_version' [-Wunused-function]
  static int amd_pmc_get_smu_version(struct amd_pmc_dev *dev)
             ^
  1 warning generated.

Eliminate the warning by moving amd_pmc_get_smu_version() to the
CONFIG_DEBUG_FS block where it is used.

Fixes: 679fa8f486ab ("platform/x86: amd-pmc: Avoid reading SMU version at probe time")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220418213800.21257-1-nathan@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c