Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp243114pxf; Wed, 10 Mar 2021 05:30:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9BpfNTkuKi78w2gLq2qMuvy2Wwx1/l2lAkgxK40QqukLTMfZx6J95IJoTJfyzvh4tFRQQ X-Received: by 2002:aa7:d9c8:: with SMTP id v8mr3217603eds.9.1615383032856; Wed, 10 Mar 2021 05:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615383032; cv=none; d=google.com; s=arc-20160816; b=EPDTB2pB8x+KthrmOfAUy30faFzmnTupPKnmeXcmPOWK+hX+ZU65uRMH6nHqsCcxxi RoviU5LP+F4sAAxYyBx++BWu5p4DIkqafh+M2nsV20O2DSe3hgCvKkVJlxQDEJuoLYIX gjeMLpyXG/B0qJGst70sW8PzzBpWGg26ffpWYBQbqO2yUfs16z66PDGU5+kSsJBLE7V4 LDIBVvkiYGNNGcixL8WjY8rd11pVGH6C5sH9Z55zd1Y70MFqECJgnB5/LCsrqB1+u4e3 kzhZEN/4YqfBL/kJRCQb43m3DZ7Dshu8o0zVyWh/WoVAK0HcD6rQ1/5Vk61MNpSRZRLv m3UA== 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=3xPjJuUUW/u99l0wxafdmhP4H+XkrJlzvYbwEEIsvAs=; b=f4ob49Ibu9zR0RVzVdYGoOHnoWbudxSpFy80q8ML611NvMfSE7XcRN+a/rhqm0KqZV nzRgh56ApJuqDAnuv0ha5JqoxN6v/SrB5QONUXzd0ZTwYrOx5B9jnJVGYcPp/2DaU2g/ 6QaqB/niRr4At3ll+FfvcoIcKpvx7y8zcdoE8ma0NIVwOW3CyEblQk/DGYqWPMupL+sR DLwKGTW1kbOENVfIlV9lm7TwJJ3uBfuf9uFwV/De62Jv9hiCQHj2f6mVShqQ5IfI2/aZ bLZd67X1xBibsx+K4B9F4uqpbEvioHYM/5Yx+9BHlqQjfWgMni/xYMErNHA/Dfs+pxZT uqug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nL9b0+0E; 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 v18si11236959eju.671.2021.03.10.05.30.08; Wed, 10 Mar 2021 05:30: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=nL9b0+0E; 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 S233801AbhCJN1J (ORCPT + 99 others); Wed, 10 Mar 2021 08:27:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:46378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233103AbhCJNYz (ORCPT ); Wed, 10 Mar 2021 08:24:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5452765001; Wed, 10 Mar 2021 13:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382694; bh=gnqQuhP5Q80bDVlG9mWYachcWHzYfz4kh+we0oKAvWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nL9b0+0EdA/d9ln4aRGy72SjkJDH/ObWDOfy5D35qMtn/Hds9IrJsPuxpnyroNWOS IsZymYpgszthNG5/gTaqmVFsqxLBFL2utJ162cY91dDaoFeewVCNRd70AXb9dzo3vn s9DlkmLxCPEmppe05sYY+FbCaaF5K5qxormyTwm8= 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.4 08/24] platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines Date: Wed, 10 Mar 2021 14:24:20 +0100 Message-Id: <20210310132320.803196267@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132320.550932445@linuxfoundation.org> References: <20210310132320.550932445@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 7fa27e753691..daf692fe7f77 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