From patchwork Tue Oct 29 13:52:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kurt Borja X-Patchwork-Id: 13854939 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A3FA205E12; Tue, 29 Oct 2024 13:53:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730209989; cv=none; b=mwLbUFoFXFhbZUWYMqWyucR7O1alqQyoCmZeZOm5Mwm7AJbcaZwURUtVs7dtzpifFqid8SMC90InplwC4/MRekrTeC5/xg26ZXmbejKi9xbw5WSSh11Hv4Mw7BcuLDYhDyoxAfc+rmt2y7VPNOqppeHkfDTBV1gFTMeiRHMdaLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730209989; c=relaxed/simple; bh=PfMqbrZJu0VCqIxWK4kMbfZXWsZUiiyNnZGIyveZeMc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tTBUNnT7d97BAA23ixEOrXHUIBmiXo6y1IBNyJl7L8rpnEYpZoGI+cEOj/u1Pbb50k4bCb6DxKX+hYX1HQeP5g6Rozf28CKk6fL6flKnQMwLDdMN0kB/jFozGDxymVhci6F5O80Gp+CjS4cfGC6S/KJlc8CrIBACHWaWIFpEdDE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VmKxoRBI; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VmKxoRBI" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-20c803787abso44115355ad.0; Tue, 29 Oct 2024 06:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730209986; x=1730814786; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XRqCJJgAPbt1NVMWT14TzlpuIculI2xVpkpOwVBi+5k=; b=VmKxoRBIXDwVB9/AcmQv2IjKsRNsVNEe686W5fh2MhlqMpdbQsWDcwHaO5JOwr62gD zYVgnVCK8nALEn9J6Igg1kgh0FVT4iMszcVaPTwEWl2NHtWbnGkG5ODQAF+QeSBrdFxp x8jQKbVegGngU5XlgQFXi66AB6EF9gVbU2nY1xqdgfj7XhidFfmkOeDkkvJyb3ZH3uAI i++f+tvJK0qnQ2ILFDgZwXR/EKWcK21xrh72ZA6eNTa2IQCCSFz78xiES4oew52BfJrB m3X2pXqmMUY6p52CuVuYHt1WOWkG6WqVRAMUvMgUrDl3xqVy089MFxlN98BMbwzbMRFk oayQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730209986; x=1730814786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XRqCJJgAPbt1NVMWT14TzlpuIculI2xVpkpOwVBi+5k=; b=OqcJHbH6oY368+G5Y1XQ3Q7UQNq/2gQCJOmZSBnB0kcDrsXUGPflg14Ay5tJTfIhLK IJyKcZoO9JNi/7E9UuXbhFYWuE6zRzpVXYOm0/jTN++DKeaRSHR6yKsKGlbqKOKGVCZU 4u9yDslUnvvajDAycuwt1fO5hCzqhVKlPCLnOgYIwNf5Is6GAujLx8bomQcAFrBxk//F 6jGjAQ16PQZ3CZy6VEQKlqFCF8LRp8F94wmwGHijlwouFxqa1mJzOqlw4v9x8l+VtHEe oIKLSKkoJWWQWmrGhGx+2ZKKIWSRiYAZ7ypMGo23RYoNKJkXQJbq6rGPqR73WVb8Vf++ RG9g== X-Forwarded-Encrypted: i=1; AJvYcCV6gCAU4GrR5qddh4NFmxaRdEsaEg2QREq7fXKVjXcIncqnt9PTS0PD4wLfwOl0giOTWFGW+uKGnTXolrU=@vger.kernel.org, AJvYcCWq2V8sop99O67sTXbkka9gx/9A9/2Cc/asoVZjQzLiHAQbHQh4UBgG5tU0gJvHIqpKZwZqGfCK7aDu4tFc4GwZoCpYWQ==@vger.kernel.org X-Gm-Message-State: AOJu0YyXCzed0Wo7MSq94kw3wmoLPEOdrq0KpXFLYWsbshRPHgStgGpJ b7+JAWcCX6xRe62eQiyahTuOsme0/9p9LOUJlu/5QG8+WRV1ZjwpQFTorA== X-Google-Smtp-Source: AGHT+IEBmF5wDEIs6iEjhVx0nckRJBFRijV19AViQTCPJSWztzLxOs7BP6cp/TNika9F+32II8zUsQ== X-Received: by 2002:a17:902:e811:b0:205:7007:84fa with SMTP id d9443c01a7336-210ed46b161mr33178245ad.28.1730209986454; Tue, 29 Oct 2024 06:53:06 -0700 (PDT) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-210bc02eee6sm66249915ad.219.2024.10.29.06.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 06:53:06 -0700 (PDT) From: Kurt Borja To: kuurtb@gmail.com Cc: W_Armin@gmx.de, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH v10 1/5] alienware-wmi: fixed indentation and clean up Date: Tue, 29 Oct 2024 10:52:55 -0300 Message-ID: <20241029135301.5838-1-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029135107.5582-2-kuurtb@gmail.com> References: <20241029135107.5582-2-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fixed inconsistent indentation and removed unnecessary (acpi_size) and (u32 *) casts. Signed-off-by: Kurt Borja Reviewed-by: Armin Wolf Reviewed-by: Ilpo Järvinen --- v10: - Unchanged v9: - Unchanged v8: - Unchanged v7: - Unchanged v6: - Unchanged --- drivers/platform/x86/dell/alienware-wmi.c | 134 +++++++++++----------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c index f5ee62ce1..16a3fe9ac 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -116,68 +116,68 @@ static int __init dmi_matched(const struct dmi_system_id *dmi) static const struct dmi_system_id alienware_quirks[] __initconst = { { - .callback = dmi_matched, - .ident = "Alienware X51 R3", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R3"), - }, - .driver_data = &quirk_x51_r3, - }, + .callback = dmi_matched, + .ident = "Alienware X51 R3", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R3"), + }, + .driver_data = &quirk_x51_r3, + }, { - .callback = dmi_matched, - .ident = "Alienware X51 R2", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R2"), - }, - .driver_data = &quirk_x51_r1_r2, - }, + .callback = dmi_matched, + .ident = "Alienware X51 R2", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R2"), + }, + .driver_data = &quirk_x51_r1_r2, + }, { - .callback = dmi_matched, - .ident = "Alienware X51 R1", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"), - }, - .driver_data = &quirk_x51_r1_r2, - }, + .callback = dmi_matched, + .ident = "Alienware X51 R1", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"), + }, + .driver_data = &quirk_x51_r1_r2, + }, { - .callback = dmi_matched, - .ident = "Alienware ASM100", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"), - }, - .driver_data = &quirk_asm100, - }, + .callback = dmi_matched, + .ident = "Alienware ASM100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"), + }, + .driver_data = &quirk_asm100, + }, { - .callback = dmi_matched, - .ident = "Alienware ASM200", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "ASM200"), - }, - .driver_data = &quirk_asm200, - }, + .callback = dmi_matched, + .ident = "Alienware ASM200", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "ASM200"), + }, + .driver_data = &quirk_asm200, + }, { - .callback = dmi_matched, - .ident = "Alienware ASM201", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "ASM201"), - }, - .driver_data = &quirk_asm201, - }, - { - .callback = dmi_matched, - .ident = "Dell Inc. Inspiron 5675", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5675"), - }, - .driver_data = &quirk_inspiron5675, - }, + .callback = dmi_matched, + .ident = "Alienware ASM201", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "ASM201"), + }, + .driver_data = &quirk_asm201, + }, + { + .callback = dmi_matched, + .ident = "Dell Inc. Inspiron 5675", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5675"), + }, + .driver_data = &quirk_inspiron5675, + }, {} }; @@ -221,8 +221,8 @@ static struct platform_zone *zone_data; static struct platform_driver platform_driver = { .driver = { - .name = "alienware-wmi", - } + .name = "alienware-wmi", + } }; static struct attribute_group zone_attribute_group = { @@ -292,7 +292,7 @@ static int alienware_update_led(struct platform_zone *zone) guid = WMAX_CONTROL_GUID; method_id = WMAX_METHOD_ZONE_CONTROL; - input.length = (acpi_size) sizeof(wmax_basic_args); + input.length = sizeof(wmax_basic_args); input.pointer = &wmax_basic_args; } else { legacy_args.colors = zone->colors; @@ -306,7 +306,7 @@ static int alienware_update_led(struct platform_zone *zone) guid = LEGACY_CONTROL_GUID; method_id = zone->location + 1; - input.length = (acpi_size) sizeof(legacy_args); + input.length = sizeof(legacy_args); input.pointer = &legacy_args; } pr_debug("alienware-wmi: guid %s method %d\n", guid, method_id); @@ -358,7 +358,7 @@ static int wmax_brightness(int brightness) .led_mask = 0xFF, .percentage = brightness, }; - input.length = (acpi_size) sizeof(args); + input.length = sizeof(args); input.pointer = &args; status = wmi_evaluate_method(WMAX_CONTROL_GUID, 0, WMAX_METHOD_BRIGHTNESS, &input, NULL); @@ -508,7 +508,7 @@ static acpi_status alienware_wmax_command(struct wmax_basic_args *in_args, struct acpi_buffer input; struct acpi_buffer output; - input.length = (acpi_size) sizeof(*in_args); + input.length = sizeof(*in_args); input.pointer = in_args; if (out_data) { output.length = ACPI_ALLOCATE_BUFFER; @@ -542,7 +542,7 @@ static ssize_t show_hdmi_cable(struct device *dev, }; status = alienware_wmax_command(&in_args, WMAX_METHOD_HDMI_CABLE, - (u32 *) &out_data); + &out_data); if (ACPI_SUCCESS(status)) { if (out_data == 0) return sysfs_emit(buf, "[unconnected] connected unknown\n"); @@ -563,7 +563,7 @@ static ssize_t show_hdmi_source(struct device *dev, }; status = alienware_wmax_command(&in_args, WMAX_METHOD_HDMI_STATUS, - (u32 *) &out_data); + &out_data); if (ACPI_SUCCESS(status)) { if (out_data == 1) @@ -643,7 +643,7 @@ static ssize_t show_amplifier_status(struct device *dev, }; status = alienware_wmax_command(&in_args, WMAX_METHOD_AMPLIFIER_CABLE, - (u32 *) &out_data); + &out_data); if (ACPI_SUCCESS(status)) { if (out_data == 0) return sysfs_emit(buf, "[unconnected] connected unknown\n"); @@ -695,7 +695,7 @@ static ssize_t show_deepsleep_status(struct device *dev, .arg = 0, }; status = alienware_wmax_command(&in_args, WMAX_METHOD_DEEP_SLEEP_STATUS, - (u32 *) &out_data); + &out_data); if (ACPI_SUCCESS(status)) { if (out_data == 0) return sysfs_emit(buf, "[disabled] s5 s5_s4\n");