From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C986CC3F2D1 for ; Tue, 3 Mar 2020 18:04:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B7D8208C3 for ; Tue, 3 Mar 2020 18:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583258656; bh=l19n/PBLVz1MW49zpUGDPT6tRBWxzCLapEPkSNmPqfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gNzyZNS+En+bNAkemgqx1v6JcsLaDp33AYs6XsQHwdYfCQckmvv4ZcUKL6+EtxOoT DPEVnoIAvn+h1+kOLi0mDVJ0SYK3sz8BKlhcBBGB3kOGyT4c2ckckAqaSQmMmZp8of pUMXypdQgq/iqs0WrWkKPerW1ja1U9L5fVD0y+Ts= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388118AbgCCSEP (ORCPT ); Tue, 3 Mar 2020 13:04:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:43914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733245AbgCCSAP (ORCPT ); Tue, 3 Mar 2020 13:00:15 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F71C20728; Tue, 3 Mar 2020 18:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583258415; bh=l19n/PBLVz1MW49zpUGDPT6tRBWxzCLapEPkSNmPqfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j9zmtcSMVprisZ5kqXfc7jmUeWxUFdMSfC4bhU0zzKlcMPil4Bi3SB8XXXf0KyW3o 0tVfMSq1CM63XDhp5Q1xx6FkkHDZZQ/TP2dtEGsvtW4vMzNr3USZfAmgTJZQhCjXnu zWZCXCQqMIUn0nHJEIoKNM3P2I32pqgG1I33DlFk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jean Delvare , Mika Westerberg , "Rafael J. Wysocki" Subject: [PATCH 4.19 41/87] ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro Date: Tue, 3 Mar 2020 18:43:32 +0100 Message-Id: <20200303174354.078107985@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200303174349.075101355@linuxfoundation.org> References: <20200303174349.075101355@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mika Westerberg commit 1dade3a7048ccfc675650cd2cf13d578b095e5fb upstream. Sometimes it is useful to find the access_width field value in bytes and not in bits so add a helper that can be used for this purpose. Suggested-by: Jean Delvare Signed-off-by: Mika Westerberg Reviewed-by: Jean Delvare Cc: 4.16+ # 4.16+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- include/acpi/actypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -528,11 +528,12 @@ typedef u64 acpi_integer; #define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8)) /* - * Algorithm to obtain access bit width. + * Algorithm to obtain access bit or byte width. * Can be used with access_width of struct acpi_generic_address and access_size of * struct acpi_resource_generic_register. */ #define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2)) +#define ACPI_ACCESS_BYTE_WIDTH(size) (1 << ((size) - 1)) /******************************************************************************* *