The buffer parameters in populate_{security,string}_buffer() and
call_{biosattributes,password}_interface() are raw byte buffers, not
character strings - use 'u8 *' instead of 'char *' to reflect this.
Update the local buffer variables at the call sites and in
populate_security_buffer() accordingly.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260410091633.2822-4-thorsten.blum@linux.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
#define SETBIOSDEFAULTS_METHOD_ID 0x03
#define SETATTRIBUTE_METHOD_ID 0x04
-static int call_biosattributes_interface(struct wmi_device *wdev, char *in_args, size_t size,
- int method_id)
+static int call_biosattributes_interface(struct wmi_device *wdev, u8 *in_args,
+ size_t size, int method_id)
{
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
struct acpi_buffer input;
{
size_t security_area_size, buffer_size;
size_t a_name_size, a_value_size;
- char *buffer = NULL, *start;
+ u8 *buffer = NULL, *start;
int ret;
mutex_lock(&wmi_priv.mutex);
{
size_t security_area_size, buffer_size;
size_t integer_area_size = sizeof(u8);
- char *buffer = NULL;
+ u8 *buffer = NULL;
u8 *defaultType;
int ret;
int map_wmi_error(int error_code);
size_t calculate_string_buffer(const char *str);
size_t calculate_security_buffer(const char *authentication);
-void populate_security_buffer(char *buffer, const char *authentication);
-ssize_t populate_string_buffer(char *buffer, size_t buffer_len, const char *str);
+void populate_security_buffer(u8 *buffer, const char *authentication);
+ssize_t populate_string_buffer(u8 *buffer, size_t buffer_len, const char *str);
int set_new_password(const char *password_type, const char *new);
int init_bios_attr_pass_interface(void);
void exit_bios_attr_pass_interface(void);
#include <linux/wmi.h>
#include "dell-wmi-sysman.h"
-static int call_password_interface(struct wmi_device *wdev, char *in_args, size_t size)
+static int call_password_interface(struct wmi_device *wdev, u8 *in_args, size_t size)
{
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
struct acpi_buffer input;
{
size_t password_type_size, current_password_size, new_size;
size_t security_area_size, buffer_size;
- char *buffer = NULL, *start;
+ u8 *buffer = NULL, *start;
char *current_password;
int ret;
* @buffer_len: length of the destination buffer
* @str: the string to insert into buffer
*/
-ssize_t populate_string_buffer(char *buffer, size_t buffer_len, const char *str)
+ssize_t populate_string_buffer(u8 *buffer, size_t buffer_len, const char *str)
{
u16 *length = (u16 *)buffer;
u16 *target = length + 1;
*
* Currently only supported type is PLAIN TEXT
*/
-void populate_security_buffer(char *buffer, const char *authentication)
+void populate_security_buffer(u8 *buffer, const char *authentication)
{
size_t seclen = strlen(authentication);
- char *auth = buffer + sizeof(u32) * 2;
+ u8 *auth = buffer + sizeof(u32) * 2;
u32 *sectype = (u32 *) buffer;
u32 *seclenp = sectype + 1;