Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1105510pxu; Mon, 23 Nov 2020 11:45:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxc17fzliw8vHG9gRShSPNsXbfLz/F0zTEo+S40VWzKDnL6NqqVxpI4eXlln/vTV7P5Mm1 X-Received: by 2002:a50:9518:: with SMTP id u24mr813214eda.124.1606160753548; Mon, 23 Nov 2020 11:45:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606160753; cv=none; d=google.com; s=arc-20160816; b=roDQTo8n3xzhbM81jmgGOqNtqBVLimCMPCyAqtSIEjZtrk5m21VZLihDuzCEaCPcA8 +vvb+5bduA5sfxnOojQwGRxf3e4w+ha2O7hKi92NljPrUOEgv2eB04Z540WXIGCm3wg1 n4al8i0YyndNi5gNXkod6ufk6vWP0rz7u1dUPi0BIEc1f0FzQi/MwXQobPiSoM3HSbf3 5hDXjCj1ZLpsG0UxkbLgtj+StG9S3i3/qTtimriHDsrjDyv3hN+nDC8XL1vTJusnlk7f 8RXIERJRb2lJB7NNb4DrDv9soKi9aCOaN6NO41rMNto/xKMc6CMNvorrXAOnqOn0S6bV ib5A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=16KcZWHTZrtr6UR4HuIbGboabCgfNKcStpwjFmEuNtQ=; b=dYL3fZjcuemYatdEmRNBMvm03Fnd1ZKbDp2ULsuokUNJxLVK91HYcp50YDJ7Ukwn9G a6cqfgeloojZ6c3Cg/813ggYKwrE2ZJQ7e83V+UPiJxgm5FXo+h7YJORs6NiP1dDeWfT gjYtiu0W71XamldC+IqiN6yfg1UMBT2ZrwmWHphFyvurGG8QYLb8Gv8QFm+mVuuwJOtK D9ZckdjMAGwonHVW6U69pnDklesAWOJDMqjsohWHOUF3Y3TUIMHTRCssxQNono+sEoj2 PKpdNxNroJipP2iNOTX7lNMDFqdtZxjzYHNrRPv/NC569T0VDrb9pHzAz3pCO6Qo6CeI CtUg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si7627112edv.126.2020.11.23.11.45.29; Mon, 23 Nov 2020 11:45:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730969AbgKWTlJ (ORCPT + 99 others); Mon, 23 Nov 2020 14:41:09 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:61192 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730834AbgKWTlI (ORCPT ); Mon, 23 Nov 2020 14:41:08 -0500 Received: from 89-64-88-191.dynamic.chello.pl (89.64.88.191) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.520) id b6a2e1692c11dd0a; Mon, 23 Nov 2020 20:41:06 +0100 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML Subject: [PATCH 2/5] ACPI: EC: Rename acpi_ec_is_gpe_raised() Date: Mon, 23 Nov 2020 20:37:46 +0100 Message-ID: <2429516.i4tuDyKFJZ@kreacher> In-Reply-To: <3259005.CeRvrUlyd7@kreacher> References: <3259005.CeRvrUlyd7@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Rafael J. Wysocki" Rename acpi_ec_is_gpe_raised() into acpi_ec_gpe_status_set(), update its callers accordingly and drop the ternary operator (which isn't really necessary in there) from it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/ec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 97e595238a8c..c4be16a495e1 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -335,12 +335,12 @@ static const char *acpi_ec_cmd_string(u8 cmd) * GPE Registers * -------------------------------------------------------------------------- */ -static inline bool acpi_ec_is_gpe_raised(struct acpi_ec *ec) +static inline bool acpi_ec_gpe_status_set(struct acpi_ec *ec) { acpi_event_status gpe_status = 0; (void)acpi_get_gpe_status(NULL, ec->gpe, &gpe_status); - return (gpe_status & ACPI_EVENT_FLAG_STATUS_SET) ? true : false; + return !!(gpe_status & ACPI_EVENT_FLAG_STATUS_SET); } static inline void acpi_ec_enable_gpe(struct acpi_ec *ec, bool open) @@ -351,7 +351,7 @@ static inline void acpi_ec_enable_gpe(struct acpi_ec *ec, bool open) BUG_ON(ec->reference_count < 1); acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE); } - if (acpi_ec_is_gpe_raised(ec)) { + if (acpi_ec_gpe_status_set(ec)) { /* * On some platforms, EN=1 writes cannot trigger GPE. So * software need to manually trigger a pseudo GPE event on @@ -635,7 +635,7 @@ static void advance_transaction(struct acpi_ec *ec, bool interrupt) * 2. As long as software can ensure only clearing it when it is set, * hardware won't set it in parallel. */ - if (ec->gpe >= 0 && acpi_ec_is_gpe_raised(ec)) + if (ec->gpe >= 0 && acpi_ec_gpe_status_set(ec)) acpi_clear_gpe(NULL, ec->gpe); status = acpi_ec_read_status(ec); -- 2.26.2