aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-17 17:05:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-17 17:05:21 -0700
commita5cb6b2bbff9cdd32aab635ad464a1ee299a63bd (patch)
tree67803af2631c8e015db8f466e906ff04617ec6dd /drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
parente2f710f97f3544df08ebe608c8157536e0ffb494 (diff)
parentd8b17a364ec48239fccb65efe74bb485e79e6743 (diff)
Merge tag 'platform-drivers-x86-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Ilpo Järvinen: - amd/pmf: Report system state changes using existing input events - asus-wmi: Zenbook 2023 camera LED disable support and fix TUF laptop keyboard RGB LED sysfs interface - dell-pc: Fan modes / platform profile support - hp-wmi: Fix platform profile switching on Omen/Victus laptops - intel/ISST: Use only TPMI interface when TPMI and legacy interfaces are available - intel/pmc: LTR restore support to pair with LTR ignore - intel/tpmi: Performance Limit Reasons (PLR) and APIC <-> Punit CPU numbering mapping support - WMI: driver override support and docs improvements - lenovo-yoga-c630: Support for EC (platform/arm64) - platform/arm64: Fix build with COMPILE_TEST (broke after addition of C630) - tools: Intel Speed Select Turbo Ratio Limit fix - Miscellaneous cleanups / refactoring / improvements * tag 'platform-drivers-x86-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (65 commits) platform/x86: asus-wmi: fix TUF laptop RGB variant platform/x86/intel/tpmi/plr: Fix output in plr_print_bits() Docs/admin-guide: Remove pmf leftover reference from the index platform/x86: ideapad-laptop: use cleanup.h platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function platform: arm64: EC_LENOVO_YOGA_C630 should depend on ARCH_QCOM platform: arm64: EC_ACER_ASPIRE1 should depend on ARCH_QCOM platform/x86/amd/pmf: Remove update system state document platform/x86/amd/pmf: Use existing input event codes to update system states platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops platform/x86:intel/pmc: Add support to undo ltr_ignore platform/x86:intel/pmc: Use the Elvis operator platform/x86:intel/pmc: Use DEFINE_SHOW_STORE_ATTRIBUTE macro platform/x86:intel/pmc: Remove unneeded min_t check platform/x86:intel/pmc: Add support to show ltr_ignore value platform/x86:intel/pmc: Move pmc assignment closer to first usage platform/x86:intel/pmc: Convert index variables to be unsigned platform/x86:intel/pmc: Simplify mutex usage with cleanup helpers platform/x86:intel/pmc: Use the return value of pmc_core_send_msg tools/power/x86/intel-speed-select: v1.20 release ...
Diffstat (limited to 'drivers/platform/x86/hp/hp-bioscfg/string-attributes.c')
-rw-r--r--drivers/platform/x86/hp/hp-bioscfg/string-attributes.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
index f0c20070094d..27758b779b2d 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
@@ -50,7 +50,7 @@ static void update_string_value(int instance_id, char *attr_value)
struct string_data *string_data = &bioscfg_drv.string_data[instance_id];
/* Write settings to BIOS */
- strscpy(string_data->current_value, attr_value, sizeof(string_data->current_value));
+ strscpy(string_data->current_value, attr_value);
}
/*
@@ -178,12 +178,10 @@ static int hp_populate_string_elements_from_package(union acpi_object *string_ob
/* Assign appropriate element value to corresponding field*/
switch (eloc) {
case VALUE:
- strscpy(string_data->current_value,
- str_value, sizeof(string_data->current_value));
+ strscpy(string_data->current_value, str_value);
break;
case PATH:
- strscpy(string_data->common.path, str_value,
- sizeof(string_data->common.path));
+ strscpy(string_data->common.path, str_value);
break;
case IS_READONLY:
string_data->common.is_readonly = int_value;
@@ -231,9 +229,7 @@ static int hp_populate_string_elements_from_package(union acpi_object *string_ob
if (ret)
continue;
- strscpy(string_data->common.prerequisites[reqs],
- str_value,
- sizeof(string_data->common.prerequisites[reqs]));
+ strscpy(string_data->common.prerequisites[reqs], str_value);
kfree(str_value);
str_value = NULL;
}