Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp240798pxf; Wed, 10 Mar 2021 05:27:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVqZbNVgJHMomGJ3K9x80CnlnLFcEYZ1FRfhuvTTeCWdTPrQqo1SmROPXjKPbHkuJoFJCr X-Received: by 2002:a50:f9c8:: with SMTP id a8mr3317064edq.270.1615382825787; Wed, 10 Mar 2021 05:27:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615382825; cv=none; d=google.com; s=arc-20160816; b=FJmOxXoNdTp00NwcGQpSpAKLYJx5kdN+EmS1713iWvLSloLIn2D88zAJ9q+v8u6AcB BIQ93vyqLJx6o0ZcIUYkJuApOzCDJX3XY5oD7HctmPjYn90Gn57qHpp8X6nfNzgnJr9P 9/RiV9lsXrFQy7RzX+b0eRBCfU61karhORHYbdLkuTqZIvVwiv5AmKWfRtV3e1kT2M7p 6XTF17/3E1vSNd6YQu2/5gtRtJx6/FIP4o++XoLTiaiW0AHtXPAMz9MJnzSYk1W/3wly +NxNzCByG4yk2en1rVOiAWdaeH6KR2CX3KM0jukRAIW73zr7utWBzorYIhpyWPRIfHNn MpJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L5bBRoU3uyySH9frmcRIeFZytTiSrDEhXqdmpxlW7Yw=; b=tr1zlGEBcRh29ipx2dcjMlc9GWUrHzzYg7/m/Fn+l+rM29mex1Q1VVueN55bXJ/CI3 ABgVPsiOL2gnPfz3SX4apE4ZwbXXZDobX6Gc0eVe2O3OKzVbEmecX943IinbTmHOt6Xy YdPkqAsr+RifhvgyvZxmdtqpFUu6V40bVehUZFVCNJRKJJtRaBpqd95TLe3oEyvDdd9q YmXTVaag8re8qvNFaDFxO9mwSR8UdfQloc/R+zOWJqSsn8GL59XDrdzZIGQRkXOFGxMu rW99hrIOoDm9Bdx7fwLSU1C8c2Q+DUkYTK3IKZNIkbsURAGRyHZiPd9rwXP8BiNBdl17 h3tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aUnNXf8C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si6953358ejn.616.2021.03.10.05.26.41; Wed, 10 Mar 2021 05:27:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aUnNXf8C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233434AbhCJNZg (ORCPT + 99 others); Wed, 10 Mar 2021 08:25:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:45702 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232834AbhCJNYe (ORCPT ); Wed, 10 Mar 2021 08:24:34 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB0BB64FF3; Wed, 10 Mar 2021 13:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382674; bh=UeDav3EGNIgPzfN43RzWdmp3M+EGl0rvc8wbcvJx5Tg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aUnNXf8CY3+g7O3OOkO68oFbSIuQIZcw4FR/YUYlTNxuTBtIYO0FtE9YbqAlorL/E 1bB/QMH5slW41ALflfV3vnEjy1IP2+0ak+9tau4cf8ykBZslzlWgxYxlutOunEb/Zi SeK9qAMEfgKLE0HQE9bwndL1Lj6DVdOWTtHKmgos= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Hans de Goede , Sasha Levin Subject: [PATCH 5.10 15/49] platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines Date: Wed, 10 Mar 2021 14:23:26 +0100 Message-Id: <20210310132322.443951388@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132321.948258062@linuxfoundation.org> References: <20210310132321.948258062@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Hans de Goede [ Upstream commit 7c936d8d26afbc74deac0651d613dead2f76e81c ] Cleanup the ACER_CAP_FOO defines: -Switch to using BIT() macro. -The ACER_CAP_RFBTN flag is set, but it is never checked anywhere, drop it. -Drop the unused ACER_CAP_ANY define. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-2-hdegoede@redhat.com Signed-off-by: Sasha Levin --- drivers/platform/x86/acer-wmi.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 5592a929b593..75b1f6ceb76e 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -206,14 +206,12 @@ struct hotkey_function_type_aa { /* * Interface capability flags */ -#define ACER_CAP_MAILLED (1<<0) -#define ACER_CAP_WIRELESS (1<<1) -#define ACER_CAP_BLUETOOTH (1<<2) -#define ACER_CAP_BRIGHTNESS (1<<3) -#define ACER_CAP_THREEG (1<<4) -#define ACER_CAP_ACCEL (1<<5) -#define ACER_CAP_RFBTN (1<<6) -#define ACER_CAP_ANY (0xFFFFFFFF) +#define ACER_CAP_MAILLED BIT(0) +#define ACER_CAP_WIRELESS BIT(1) +#define ACER_CAP_BLUETOOTH BIT(2) +#define ACER_CAP_BRIGHTNESS BIT(3) +#define ACER_CAP_THREEG BIT(4) +#define ACER_CAP_ACCEL BIT(5) /* * Interface type flags @@ -1253,10 +1251,8 @@ static void __init type_aa_dmi_decode(const struct dmi_header *header, void *d) interface->capability |= ACER_CAP_THREEG; if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH) interface->capability |= ACER_CAP_BLUETOOTH; - if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_RFBTN) { - interface->capability |= ACER_CAP_RFBTN; + if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_RFBTN) commun_func_bitmap &= ~ACER_WMID3_GDS_RFBTN; - } commun_fn_key_number = type_aa->commun_fn_key_number; } -- 2.30.1