From patchwork Sat Sep 4 17:55:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 12475721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FEA7C433F5 for ; Sat, 4 Sep 2021 17:55:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 689D260F38 for ; Sat, 4 Sep 2021 17:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237265AbhIDR43 (ORCPT ); Sat, 4 Sep 2021 13:56:29 -0400 Received: from mail-4317.protonmail.ch ([185.70.43.17]:53186 "EHLO mail-4317.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237297AbhIDR42 (ORCPT ); Sat, 4 Sep 2021 13:56:28 -0400 Date: Sat, 04 Sep 2021 17:55:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630778125; bh=TgeM8TY1lGTJdNkviI824VEobz/nwKJ0OOVKCk4GoGA=; h=Date:To:From:Reply-To:Subject:From; b=REoyX/PRq4GEYr+bwDpRUOJ71Xe3T10wqIK0t4nofkojo97ay21ylXa/V2X8zNzfi bDttpFmsUS73mPZ/n6k3Q78McJflK3oAHqRL3/NQ3ENWnlIimmPn7FZ2WoCU6+162d ZJURF1INlNLW/PQioL3dYtWXwBwDnx1XoPZlFhX8= To: Hans de Goede , Mark Gross , platform-driver-x86@vger.kernel.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Reply-To: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [RFC PATCH v1 08/30] platform/x86: wmi: remove unnecessary casts Message-ID: <20210904175450.156801-9-pobrn@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Void pointers are implictly cast to arbitrary pointer types, so remove superfluous casts. Signed-off-by: Barnabás Pőcze --- drivers/platform/x86/wmi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) -- 2.33.0 diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 6252e8d88680..c3ee64843731 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -387,7 +387,7 @@ union acpi_object *wmidev_block_query(struct wmi_device *wdev, u8 instance) if (ACPI_FAILURE(__query_block(wblock, instance, &out))) return NULL; - return (union acpi_object *)out.pointer; + return out.pointer; } EXPORT_SYMBOL_GPL(wmidev_block_query); @@ -479,8 +479,7 @@ static void wmi_notify_debug(u32 value, void *context) return; } - obj = (union acpi_object *)response.pointer; - + obj = response.pointer; if (!obj) return; @@ -1148,7 +1147,7 @@ static int parse_wdg(struct device *wmi_bus_dev, struct acpi_device *device) if (ACPI_FAILURE(status)) return -ENXIO; - obj = (union acpi_object *) out.pointer; + obj = out.pointer; if (!obj) return -ENXIO; @@ -1307,8 +1306,7 @@ static void acpi_wmi_notify_handler(acpi_handle handle, u32 event, } if (driver->notify) - driver->notify(&wblock->dev, - (union acpi_object *)evdata.pointer); + driver->notify(&wblock->dev, evdata.pointer); kfree(evdata.pointer); } else if (wblock->handler) { @@ -1335,7 +1333,7 @@ static int acpi_wmi_remove(struct platform_device *device) acpi_remove_address_space_handler(acpi_device->handle, ACPI_ADR_SPACE_EC, &acpi_wmi_ec_space_handler); wmi_free_devices(acpi_device); - device_unregister((struct device *)dev_get_drvdata(&device->dev)); + device_unregister(dev_get_drvdata(&device->dev)); return 0; }