Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp244593pxf; Wed, 10 Mar 2021 05:32:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBFObAMgK0B2lNyvVouUJehf8Xsqjp5MwKIpp0tftXrkgXlagj20Kj5RHB3UKzrKDkDZyd X-Received: by 2002:a17:906:71d3:: with SMTP id i19mr3702743ejk.347.1615383152797; Wed, 10 Mar 2021 05:32:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615383152; cv=none; d=google.com; s=arc-20160816; b=Z5y9wYOYZz0bJ2EuTG6m7M6GpmuFWHN3BIeCEWctpizIM884VATlOwLwHnhKlm9+OC BXlu5IBwzsd/Ri3rfeo3KFsQvLfQ/BZ7eQHpESJcN5/4Ya+d7GZhgXdjlJ5x4JxpUAHi x6O930kb3xr5TteMWa+yRPxhxu0VQ8LuzfNRoZiUcmuCk4la8m+WO3UUk/rcGGicoe57 vLkam3Y5yr6TahTGSTFBosKjXEkfkBl2xoqK0h50QjmGGR7blrw73a1z3Dw3fAg2gmew 7igfJXGyqU0xbRJBidm3+gmlMGwsydbotG90WRBT16mQ/arXtjObo0ofHjcsBOpkFWWA 3L5g== 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=SNE29JrYCsCLp1ss1xSaq5jwyAr2CGfLJwQ9b8m2YJ8=; b=we6lS2uC1s12/6vqoYgU31v5QrwJp0sfbTkY8Ok2/7tVcbVuqPrDd+S7C7VFy3yPoO pa8mltTfh0nKPZcT1nEZ4BzSxN8Vp6mHwPdMeOd2xTI/Hq+GnJGGIbsrDqfTMNFq9fOj YoZKsvqE+DrLJUvaE/j0Nwh3ZqNoVTukp1nXoQzp0h7NFav6f/XMB/kSz83H0AR7AVL/ CvLQydByzayasT2ucOnvJihbLtZK2/zaZxrr+ero9OQeEiYmcyHmcMzO2fnjkdo1XW0o xd/DsR+yscn8F0PAAeMzwT+2ljSpBYrC5MA4Py8RDOhkuc0tBzjqdrMPFhL52MrS7VPs +LxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tLsM9+yA; 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 i17si14491370ejo.365.2021.03.10.05.32.08; Wed, 10 Mar 2021 05:32:32 -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=tLsM9+yA; 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 S233328AbhCJNbK (ORCPT + 99 others); Wed, 10 Mar 2021 08:31:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:47564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233331AbhCJNZX (ORCPT ); Wed, 10 Mar 2021 08:25:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E054464FF4; Wed, 10 Mar 2021 13:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382721; bh=am/Yf4+CgdxaAeroQx3u4B5yChvltnp3/a3UbAnLPgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tLsM9+yAa1ao4JTMNQ+MrLr6z8cwRcMHxXk8iAB8Wo2iDe4OFZhfRI7VoMN4hfIrS CUKvdSHjZx5TOlIT8nwWionUUpn3hP4oSwNUyeYSisosdMBD+boYScr1pm2WBLHasO PMTYrkHKPCK9PRC+tDoazs+52qyNsLR4JRaVUJOo= 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.14 12/20] platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines Date: Wed, 10 Mar 2021 14:24:49 +0100 Message-Id: <20210310132320.914225098@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132320.512307035@linuxfoundation.org> References: <20210310132320.512307035@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 29f6f2bbb5ff..41311c1526a0 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -218,14 +218,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 @@ -1268,10 +1266,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