From patchwork Wed Dec 22 17:25:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12697193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80C1AC433F5 for ; Wed, 22 Dec 2021 17:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ymfPv/blB64UaC23WUBDUNxQI/k289/83oEBVyImKtA=; b=ZS1oFB0OhJ9S51 +PRKNIzOh6fV+coCMcxBTTlZ6Oh4scK0UhqNJtSn0yoWR5EEJHIUqu4DrnK7DOnLo0XUzTZBRfwrf cg2pwrqeId8ufcFni/NinQbEpdzr67VukEHKypp7q6pt2p78BT9dfEAc+/ryJpLe3mzGTDJeIW5HX xZQvDfcgcOiw/q+BnlDLA/rOEOUBfOzxA7J0Tq4hWs4A1qDJtQ4I4Udz4aCUEonTyo2d5M/OsLn1u xSQeI71k1g1/qhkUeN7BNsKQBKYzFTPaU2XmhzDvy6GaDr+tQ7yzg6G2Lu7iiD2SSZY/FJA2/85lH O1HDq2YJANBjLNXEdQmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n05Of-00Az6A-Pg; Wed, 22 Dec 2021 17:27:25 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n05Ob-00Az5q-TT for linux-arm-kernel@lists.infradead.org; Wed, 22 Dec 2021 17:27:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640194038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/NeXxN2n8+g1U9GWtGeRI9IfjR6ngRoHtmD5AubDq8I=; b=ZFQxUxr2MyG8aRnBu9WTG/1gDhlS4wk4hHJmAA8Op8nQg+MDJrCW/nub8Kq2lfUe89ggjm UkMdU+VoJImTtHbZPNIaCHO9N2hN5xymPq5ov4yLLoZUB4a5kb2PBSIOSh6asyVs4sLc7h n1I6hbVCzXOYT3oxxPQtr4zoG07HAR0= Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-512-YBxbUZBPNOOwHQ5OE1s_hQ-1; Wed, 22 Dec 2021 12:25:42 -0500 X-MC-Unique: YBxbUZBPNOOwHQ5OE1s_hQ-1 Received: by mail-ot1-f70.google.com with SMTP id 68-20020a9d05ca000000b0058f21da6adcso908241otd.4 for ; Wed, 22 Dec 2021 09:25:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/NeXxN2n8+g1U9GWtGeRI9IfjR6ngRoHtmD5AubDq8I=; b=BhMFX+L3l4WWwZjmrmZG36sr1AUJEIBxTpLS12DTJIVGb37BflOJoyVi1jTkOQtbGn vSlBN2RS988dhrIauTQndaiG8C65Z9FsTo+ED/K/Ad5HhMkgd+qxBUjgYUOdyYxCOtQD O8c1KmDzDqNq+SVT7svE5Gq+DAtnxhobMjYgKTKsd4d6m7E6Hwd3YZYAqIqRDYXGGy87 jBKL8za9XuZkCWikmCDLI4P5VVjj4vGhc2gUvHO2OTsZlaz1+wK7Vlf4n7mIGZsBv58p AiftjpOL5SunZ9Cul8sQ2R+6lgmT/nw6pIuKCJ3MRJnFy6MrzGKajlixUvwd1ic3sqVR vJgw== X-Gm-Message-State: AOAM530tCH9PskRK2DsKKPcl8yCurxm6gsJdP4A9VODROP3F0vh2MLX4 7gwuHz7XrgQ0UCGPIAEYbnxsAb4RurNLaD6J3M6AH+XJK98DGjXomhwITs10Sf/MNyPCToqRGMa bCU+8Rj/LutpdNDY+ZalL4firuYW6pGFg3FI= X-Received: by 2002:a05:6830:1df4:: with SMTP id b20mr814170otj.32.1640193941855; Wed, 22 Dec 2021 09:25:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFObxFmLR75vlPPpw9nVz+jLYoKDYAc9NjNPMcmdyD4rkx4NCkyf1iYZtbGszFb0pG7UTHoQ== X-Received: by 2002:a05:6830:1df4:: with SMTP id b20mr814158otj.32.1640193941660; Wed, 22 Dec 2021 09:25:41 -0800 (PST) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id w29sm476036ooe.25.2021.12.22.09.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 09:25:41 -0800 (PST) From: trix@redhat.com To: sudeep.holla@arm.com, cristian.marussi@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH] firmware: arm_scmi: replace resevered identifiers in macros Date: Wed, 22 Dec 2021 09:25:19 -0800 Message-Id: <20211222172519.3209478-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211222_092722_068127_5B280717 X-CRM114-Status: GOOD ( 11.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix Identifiers starting with __ are resevered. Replace __X with X. The arguments to these macros are pointers. The macros only reads values. There is no need to make copies of the pointers, use them directly. Fixes: a287126c31ab ("firmware: arm_scmi: Add configurable polling mode for transports") Signed-off-by: Tom Rix --- drivers/firmware/arm_scmi/driver.c | 31 ++++++++---------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index b4bbfe89368df..d2fcfa9da931c 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -36,29 +36,14 @@ #define CREATE_TRACE_POINTS #include -#define IS_POLLING_REQUIRED(__c, __i) \ - ((__c)->no_completion_irq || (__i)->desc->force_polling) \ - -#define IS_TRANSPORT_POLLING_CAPABLE(__i) \ -({ \ - bool __ret; \ - typeof(__i) i_ = __i; \ - \ - __ret = ((i_)->desc->ops->poll_done || \ - (i_)->desc->sync_cmds_completed_on_ret); \ - __ret; \ -}) - -#define IS_POLLING_ENABLED(__c, __i) \ -({ \ - bool __ret; \ - typeof(__c) c_ = __c; \ - typeof(__i) i_ = __i; \ - \ - __ret = (IS_POLLING_REQUIRED(c_, i_) && \ - IS_TRANSPORT_POLLING_CAPABLE(i_)); \ - __ret; \ -}) +#define IS_POLLING_REQUIRED(c, i) \ + ((c)->no_completion_irq || (i)->desc->force_polling) + +#define IS_TRANSPORT_POLLING_CAPABLE(i) \ + ((i)->desc->ops->poll_done || (i)->desc->sync_cmds_completed_on_ret) + +#define IS_POLLING_ENABLED(c, i) \ + (IS_POLLING_REQUIRED(c, i) && IS_TRANSPORT_POLLING_CAPABLE(i)) enum scmi_error_codes { SCMI_SUCCESS = 0, /* Success */