Fix return types

This commit is contained in:
Werner Sembach 2023-06-19 17:56:50 +02:00
parent e66e2b1fb3
commit d13eaeb043
5 changed files with 22 additions and 22 deletions

View file

@ -32,9 +32,9 @@ struct clevo_acpi_driver_data_t {
static struct clevo_acpi_driver_data_t *active_driver_data = NULL; static struct clevo_acpi_driver_data_t *active_driver_data = NULL;
static u32 clevo_acpi_evaluate(struct acpi_device *device, u8 cmd, u32 arg, union acpi_object **result) static int clevo_acpi_evaluate(struct acpi_device *device, u8 cmd, u32 arg, union acpi_object **result)
{ {
u32 status; int status;
acpi_handle handle; acpi_handle handle;
u64 dsm_rev_dummy = 0x00; // Dummy 0 value since not used u64 dsm_rev_dummy = 0x00; // Dummy 0 value since not used
u64 dsm_func = cmd; u64 dsm_func = cmd;
@ -79,9 +79,9 @@ static u32 clevo_acpi_evaluate(struct acpi_device *device, u8 cmd, u32 arg, unio
return status; return status;
} }
u32 clevo_acpi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value) int clevo_acpi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value)
{ {
u32 status = 0; int status = 0;
if (!IS_ERR_OR_NULL(active_driver_data)) { if (!IS_ERR_OR_NULL(active_driver_data)) {
status = clevo_acpi_evaluate(active_driver_data->adev, cmd, arg, result_value); status = clevo_acpi_evaluate(active_driver_data->adev, cmd, arg, result_value);
@ -141,7 +141,7 @@ void clevo_acpi_notify(struct acpi_device *device, u32 event)
{ {
u32 event_value; u32 event_value;
union acpi_object *out_obj; union acpi_object *out_obj;
u32 status; int status;
// struct clevo_acpi_driver_data_t *clevo_acpi_driver_data; // struct clevo_acpi_driver_data_t *clevo_acpi_driver_data;
status = clevo_acpi_evaluate(device, 0x01, 0, &out_obj); status = clevo_acpi_evaluate(device, 0x01, 0, &out_obj);

View file

@ -72,14 +72,14 @@
struct clevo_interface_t { struct clevo_interface_t {
char *string_id; char *string_id;
void (*event_callb)(u32); void (*event_callb)(u32);
u32 (*method_call)(u8, u32, union acpi_object **); int (*method_call)(u8, u32, union acpi_object **);
}; };
u32 clevo_keyboard_add_interface(struct clevo_interface_t *new_interface); int clevo_keyboard_add_interface(struct clevo_interface_t *new_interface);
u32 clevo_keyboard_remove_interface(struct clevo_interface_t *interface); int clevo_keyboard_remove_interface(struct clevo_interface_t *interface);
u32 clevo_evaluate_method(u8 cmd, u32 arg, u32 *result); int clevo_evaluate_method(u8 cmd, u32 arg, u32 *result);
u32 clevo_evaluate_method2(u8 cmd, u32 arg, union acpi_object **result); int clevo_evaluate_method2(u8 cmd, u32 arg, union acpi_object **result);
u32 clevo_get_active_interface_id(char **id_str); int clevo_get_active_interface_id(char **id_str);
#define MODULE_ALIAS_CLEVO_WMI() \ #define MODULE_ALIAS_CLEVO_WMI() \
MODULE_ALIAS("wmi:" CLEVO_WMI_EVENT_GUID); \ MODULE_ALIAS("wmi:" CLEVO_WMI_EVENT_GUID); \

View file

@ -106,7 +106,7 @@ static struct kbd_backlight_mode_t {
{ .key = 7, .value = 0xB0000000, .name = "WAVE"} { .key = 7, .value = 0xB0000000, .name = "WAVE"}
}; };
u32 clevo_evaluate_method2(u8 cmd, u32 arg, union acpi_object **result) int clevo_evaluate_method2(u8 cmd, u32 arg, union acpi_object **result)
{ {
if (IS_ERR_OR_NULL(active_clevo_interface)) { if (IS_ERR_OR_NULL(active_clevo_interface)) {
pr_err("clevo_keyboard: no active interface while attempting cmd %02x arg %08x\n", cmd, arg); pr_err("clevo_keyboard: no active interface while attempting cmd %02x arg %08x\n", cmd, arg);
@ -116,9 +116,9 @@ u32 clevo_evaluate_method2(u8 cmd, u32 arg, union acpi_object **result)
} }
EXPORT_SYMBOL(clevo_evaluate_method2); EXPORT_SYMBOL(clevo_evaluate_method2);
u32 clevo_evaluate_method(u8 cmd, u32 arg, u32 *result) int clevo_evaluate_method(u8 cmd, u32 arg, u32 *result)
{ {
u32 status = 0; int status = 0;
union acpi_object *out_obj; union acpi_object *out_obj;
status = clevo_evaluate_method2(cmd, arg, &out_obj); status = clevo_evaluate_method2(cmd, arg, &out_obj);
@ -140,7 +140,7 @@ u32 clevo_evaluate_method(u8 cmd, u32 arg, u32 *result)
} }
EXPORT_SYMBOL(clevo_evaluate_method); EXPORT_SYMBOL(clevo_evaluate_method);
u32 clevo_get_active_interface_id(char **id_str) int clevo_get_active_interface_id(char **id_str)
{ {
if (IS_ERR_OR_NULL(active_clevo_interface)) if (IS_ERR_OR_NULL(active_clevo_interface))
return -ENODEV; return -ENODEV;
@ -385,7 +385,7 @@ static struct tuxedo_keyboard_driver clevo_keyboard_driver = {
.key_map = clevo_keymap, .key_map = clevo_keymap,
}; };
u32 clevo_keyboard_add_interface(struct clevo_interface_t *new_interface) int clevo_keyboard_add_interface(struct clevo_interface_t *new_interface)
{ {
mutex_lock(&clevo_keyboard_interface_modification_lock); mutex_lock(&clevo_keyboard_interface_modification_lock);
@ -423,7 +423,7 @@ u32 clevo_keyboard_add_interface(struct clevo_interface_t *new_interface)
} }
EXPORT_SYMBOL(clevo_keyboard_add_interface); EXPORT_SYMBOL(clevo_keyboard_add_interface);
u32 clevo_keyboard_remove_interface(struct clevo_interface_t *interface) int clevo_keyboard_remove_interface(struct clevo_interface_t *interface)
{ {
mutex_lock(&clevo_keyboard_interface_modification_lock); mutex_lock(&clevo_keyboard_interface_modification_lock);

View file

@ -276,7 +276,7 @@ static struct led_classdev_mc clevo_mcled_cdevs[3] = {
int clevo_leds_init(struct platform_device *dev) int clevo_leds_init(struct platform_device *dev)
{ {
int ret; int ret;
u32 status; int status;
union acpi_object *result; union acpi_object *result;
u32 result_fallback; u32 result_fallback;

View file

@ -30,7 +30,7 @@ static int clevo_wmi_evaluate(u32 wmi_method_id, u32 wmi_arg, union acpi_object
struct acpi_buffer acpi_buffer_out = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer acpi_buffer_out = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *acpi_result; union acpi_object *acpi_result;
acpi_status status_acpi; acpi_status status_acpi;
u32 return_status = 0; int return_status = 0;
status_acpi = status_acpi =
wmi_evaluate_method(CLEVO_WMI_METHOD_GUID, 0x00, wmi_method_id, wmi_evaluate_method(CLEVO_WMI_METHOD_GUID, 0x00, wmi_method_id,
@ -55,7 +55,7 @@ static int clevo_wmi_evaluate(u32 wmi_method_id, u32 wmi_arg, union acpi_object
return return_status; return return_status;
} }
u32 clevo_wmi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value) int clevo_wmi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value)
{ {
return clevo_wmi_evaluate(cmd, arg, result_value); return clevo_wmi_evaluate(cmd, arg, result_value);
} }
@ -71,7 +71,7 @@ static int clevo_wmi_probe(struct wmi_device *wdev)
static int clevo_wmi_probe(struct wmi_device *wdev, const void *dummy_context) static int clevo_wmi_probe(struct wmi_device *wdev, const void *dummy_context)
#endif #endif
{ {
u32 status; int status;
union acpi_object *out_obj; union acpi_object *out_obj;
pr_debug("clevo_wmi driver probe\n"); pr_debug("clevo_wmi driver probe\n");
@ -126,7 +126,7 @@ static void clevo_wmi_notify(struct wmi_device *wdev, union acpi_object *dummy)
{ {
u32 event_value; u32 event_value;
union acpi_object *out_obj; union acpi_object *out_obj;
u32 status; int status;
status = clevo_wmi_evaluate(0x01, 0, &out_obj); status = clevo_wmi_evaluate(0x01, 0, &out_obj);
if (!status) { if (!status) {