Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp244013pxf; Wed, 10 Mar 2021 05:31:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyf/2tJsXIJ4VXUs9S2hQWGztCEuxnli2kVGDGWdu6KtEVoGUbfkKIOgDsyZIrYPzpTB9S X-Received: by 2002:a50:e882:: with SMTP id f2mr3296504edn.184.1615383102159; Wed, 10 Mar 2021 05:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615383102; cv=none; d=google.com; s=arc-20160816; b=03RLJHbZb8V2D1fLbzbnpEF30F+lwPFabLqfjl5JLuiPb1uJCe7sSjkSmgzy1W2cJp nKx45RYGNDd1VcTsN/J81aZpMOdxNLSjqF7Dlrm2lDAnBtpxbYs4Or0pFK/Gt3c0pE+1 LFb+M8qr0iqRkBcz8suzsx74l9HeVpAlFIsbl5vBQ3mYXQy7Jji3nO3S5FUyOQpfMhX5 wTBJcEVYicdL4y73ezjiqEyd7RqOVpTipj1wiPS6eddqnBHbJ8ekLH7GNLN0UuL6GroC RgYAwxMT++0/Pmw59xFP2++5960HE35JWzPvpo/S3XJcGK06zrZaynHLVFLK4fTffc/T 3rdQ== 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=q56gF9f9c4WIi842mz+Cc1yuAi+iTdkj2ze8MShLoas=; b=hEr0wRLfJaw97u02Me+9TncA1oX0AyMreXjfWqF1WSm+4F8zjZrdwi0WBpy1u5f1iL X2GTInj/8OXh2Qb6sKR9B73kLsN9wXbjZ5XNYeJDQw9sAXZGrhm9/sQScCIZOg/GfvqL 3l8m8JhSkbjhdpso6/xYl2lwnPShaTTEacj3ABO5jv4tp5J7piZBp2PLujjTWaGqqvCO azcqOBOFtfwYoxs6cNiaERPezGvx9eXr+1SzRnOTOADwR9+xf0T4sTDuWR3qVWbjzXev q06nTyaf4UKjK6rr7pywjVE8FfDJEv4CeDYQe6MV5jE59kTt6ZzdGNsYaIdd8ON8/TD9 0VnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zeKXwE5E; 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 gf2si11839264ejb.712.2021.03.10.05.31.18; Wed, 10 Mar 2021 05:31:42 -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=zeKXwE5E; 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 S233805AbhCJNaO (ORCPT + 99 others); Wed, 10 Mar 2021 08:30:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:48606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233464AbhCJNZj (ORCPT ); Wed, 10 Mar 2021 08:25:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AA3E64FDC; Wed, 10 Mar 2021 13:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382739; bh=+/ZzfQ/JXaZpSfUnsydoionsc8T6OlRzeKhHnXytRko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zeKXwE5Eoe/sQ5YedbMlosSTEflqCJbZX368KgfdDj3ycTSxU2cUd1YLVFz1DV9hg leTvdLAHQ1rHdiOYfqXvSUhTIQ3ACKR8WJr0jD5V5kaQBa4IvF5Vmq0cnEZdGaqtw+ 7RPq2LBI+g+Kh3W0Tf+da5tqAdAj2txiTIYIzuwg= 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 4.19 27/39] platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines Date: Wed, 10 Mar 2021 14:24:35 +0100 Message-Id: <20210310132320.567388160@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132319.708237392@linuxfoundation.org> References: <20210310132319.708237392@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 92400abe3552..8d06454f5915 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -219,14 +219,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 @@ -1266,10 +1264,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