From patchwork Mon Sep 28 23:04:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 289455 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 7775EC2D0A8 for ; Mon, 28 Sep 2020 23:15:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BDA523A5B for ; Mon, 28 Sep 2020 23:15:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BPcyw3Ro" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbgI1XNl (ORCPT ); Mon, 28 Sep 2020 19:13:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726588AbgI1XNl (ORCPT ); Mon, 28 Sep 2020 19:13:41 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E338DC05BD0B for ; Mon, 28 Sep 2020 16:04:51 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id q4so3007639ils.4 for ; Mon, 28 Sep 2020 16:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4TxaMa6inpZ7uMAndoFZ5+P5V8+D5W2ogRawnm+mnrw=; b=BPcyw3RouFEeIYSfoGTnzTWR8xIeOLQKB1SaKv/ej7EVr35nbGNbxexqylu4rf19ky nFYS9ETsJ4iMHo6iY01f0g9p74z0hpHzlQCj+HE/UUsnrF6n/hbzoM+tfJk3rAqo6mQR XcDn58DRckHzTaqKF2FA4QY9+B8VB/UwL/MAUu/vXiC10j0+Xiyv/0K6paeMlS6qGo5Q /jDZTO1UeEdNbQ2ZCWnIuk5oHhgvDav460Rvnxd7iBOPpefyJTr8qD8UhDeIz42LLa2n OunK8fY4POd7wc7j6KK0yAeP6Oybg69PpzLThmlMaVVDPUNmzi2rOo5P61997S1rVrCp fmyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4TxaMa6inpZ7uMAndoFZ5+P5V8+D5W2ogRawnm+mnrw=; b=Gs57m9Y/RP4WVHYOaqA+C7t2iIFPfpx0KPTyNnYr8Rz/eSwENk/8bJvFcvgBUSpw/O PAGw38g02WcDh+6Fpu7RZTSQmQ0FM4FSXcnxSRqyYdY0BsSpsPlzbG7KX4zwFw3PZXp0 ++qSP+jJloMuJgZ3KpklLb+JbJ3KwdUsPzG70ZarPu2la/fUD17SH0pS3BCFqFkKloW4 xHzHb9UuO0kvkPJ/b3E1rfPBTfndoRCChROxxrjerz/IVyklHtdMZkRLkh5zXalT1q7S y2/PqX6IDqnX9zRY/Rm3vAVnmbLTwb+tjD4M7eA3bIoLlxEGyn/vbFVTmUaL1jO6EtJ6 YIDA== X-Gm-Message-State: AOAM533feBBHDn9Z5GKp1iaEJdAF9jOYioVWYGoWXO1vg/FrmHGTTpen 9PSftQmH18T0pUbxgDCKsMsv9w== X-Google-Smtp-Source: ABdhPJzYgbfl2gRKfvh0JI7qgLfUaS3kg/2rEtEn1KZRQklmXs/0Dy9g/+zvEanEEUgW/4zYBfWqeA== X-Received: by 2002:a92:7611:: with SMTP id r17mr599930ilc.88.1601334291290; Mon, 28 Sep 2020 16:04:51 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:50 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 01/10] net: ipa: kill definition of TRE_FLAGS_IEOB_FMASK Date: Mon, 28 Sep 2020 18:04:37 -0500 Message-Id: <20200928230446.20561-2-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In "gsi_trans.c", the field mask TRE_FLAGS_IEOB_FMASK is defined but never used. Although there's no harm in defining this, remove it for now and redefine it at some future date if it becomes needed. This is warned about if "W=2" is added to the build command. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_trans.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ipa/gsi_trans.c b/drivers/net/ipa/gsi_trans.c index bdbfeed359db3..43f5f5d93cb06 100644 --- a/drivers/net/ipa/gsi_trans.c +++ b/drivers/net/ipa/gsi_trans.c @@ -81,7 +81,6 @@ struct gsi_tre { /* gsi_tre->flags mask values (in CPU byte order) */ #define TRE_FLAGS_CHAIN_FMASK GENMASK(0, 0) -#define TRE_FLAGS_IEOB_FMASK GENMASK(8, 8) #define TRE_FLAGS_IEOT_FMASK GENMASK(9, 9) #define TRE_FLAGS_BEI_FMASK GENMASK(10, 10) #define TRE_FLAGS_TYPE_FMASK GENMASK(23, 16) From patchwork Mon Sep 28 23:04:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 260001 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 36C97C2D0A8 for ; Mon, 28 Sep 2020 23:14:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F099823A5A for ; Mon, 28 Sep 2020 23:14:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pIw9997s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727032AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D29C8C05BD0D for ; Mon, 28 Sep 2020 16:04:52 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id y74so2885092iof.12 for ; Mon, 28 Sep 2020 16:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=idjGAQ7MQS14u+65LdARnv7/5MnPPt3V31TAdfoMMxk=; b=pIw9997sSVansIhN2qSSz90iYSVKQHHZi21ggs7dzEA25Hl0yTD6ShGd49MuZm7jh1 /c1LfVzbTc7RxuBnPX7kZ1pjPQi+kJafDCsJUgp4tdSCFJbOmkd8IDAxWcuCUABTFF3R O8HnAHsuhhcf6EtYoab+QgBPjR6sc0PPhoBvCQQT5wt1/AinKQzyxOPYWCePCwFRirXL NrqMV59WI6PlkRrfFJ0u78ZdQQYSGYZUne6oGpG4AFYkLE/RH1bCi/2XArinqRUpbRWr +tNtUTyFDav0mzYVFay5f4E+3s2VJE/bTfPHbRNvXvQhIKP3faD9iVan3AJuCXctCX43 zIIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=idjGAQ7MQS14u+65LdARnv7/5MnPPt3V31TAdfoMMxk=; b=b/3ht5Cb44qIL8itoic2ui2BtjUqGOqaqqtQlpZJswx4I3A6qUhRtWnV1tju/G0QyC 3xx5FPfFjs5sUQUU5gAbtwzgsPpCXGh9OFGzLAYKHF2AoFkqW8cU1e7nbxKsQvWwz4Uk bTNISToPtS5jJv4eOEeQRJtDo5/Z6Cjp8ruMXRxwmAoas9wO5NVRPrioNOXKQqo7TBC/ Bzqq4zAHlJjeUps5N7jxrDkabDojHMMNF7BQ11bxNOtPQvV2pxzE+KYFR3QsVj8bwpco A3QQpkjTg9qck7FRZmyComnVtLYtUrYQiINNy9t6tVm5Go9fvWxW6qXbdj16fCPVfpNw Ngfw== X-Gm-Message-State: AOAM530fgUGPEVg2/f2agGyzh7P23am7pr0as7lzoJUeBDTU2/n5VLod wCgax0FjrVXuMov5UqyNQj8g8A== X-Google-Smtp-Source: ABdhPJx0HKKCLVGA0dhin3W/dMnYt/7qq235QtA2wYI5z15ATKYZvMVuzVZx5XgWKWaiHOKUxlcMBg== X-Received: by 2002:a05:6602:18a:: with SMTP id m10mr401040ioo.174.1601334292211; Mon, 28 Sep 2020 16:04:52 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:51 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 02/10] net: ipa: kill unused status opcodes Date: Mon, 28 Sep 2020 18:04:38 -0500 Message-Id: <20200928230446.20561-3-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Three status opcodes are not currently supported. Symbols representing their numeric values are defined but never used. Remove those unused definitions; they can be defined again when they actually get used. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index b7efd7c95e9c8..e5e64ca244cbd 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -42,11 +42,8 @@ /** enum ipa_status_opcode - status element opcode hardware values */ enum ipa_status_opcode { IPA_STATUS_OPCODE_PACKET = 0x01, - IPA_STATUS_OPCODE_NEW_FRAG_RULE = 0x02, IPA_STATUS_OPCODE_DROPPED_PACKET = 0x04, IPA_STATUS_OPCODE_SUSPENDED_PACKET = 0x08, - IPA_STATUS_OPCODE_LOG = 0x10, - IPA_STATUS_OPCODE_DCMP = 0x20, IPA_STATUS_OPCODE_PACKET_2ND_PASS = 0x40, }; @@ -1048,8 +1045,7 @@ static bool ipa_endpoint_skb_build(struct ipa_endpoint *endpoint, } /* The format of a packet status element is the same for several status - * types (opcodes). The NEW_FRAG_RULE, LOG, DCMP (decompression) types - * aren't currently supported + * types (opcodes). Other types aren't currently supported. */ static bool ipa_status_format_packet(enum ipa_status_opcode opcode) { From patchwork Mon Sep 28 23:04:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 289456 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 3AF83C2D0A8 for ; Mon, 28 Sep 2020 23:15:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02F0B23A5B for ; Mon, 28 Sep 2020 23:15:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Vp+hMh1D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727249AbgI1XOq (ORCPT ); Mon, 28 Sep 2020 19:14:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727040AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DED36C05BD10 for ; Mon, 28 Sep 2020 16:04:53 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id v8so2902555iom.6 for ; Mon, 28 Sep 2020 16:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dm8XS2HSKEv02T22veiY2AtisIW8U/KWf00I2CNm2Oc=; b=Vp+hMh1DoiUYSZXD9dySKybdalCByzNL+2dPjcj6W7Am1qGkOg1mrWaKskhQEWETJf v+aSj/h0pr6Bf0pRRomB90IByKSIoDsHdd+NTsn0f6bLbl+JrcZ3Sfp4z+O+3dInjZjp 1DjPKVx45SPvW7qzTUPBGHrzw4J0GZUwtsgDGVoWeaKhcpziGXP5sRwZDWH7aa9boi3m lg/qC2e+OTGLw4q2eGnfZ3w8xgUA/CFMT0zE5FBML7L5qDPG4m42FR9NbRGMyOJzSOuK NMxzDMsxnaKS7Na9obbZi/cAO+dPqSACgXzoMYyToNZ615gwhCyH47Bd+sifqAVLOnO5 JKew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dm8XS2HSKEv02T22veiY2AtisIW8U/KWf00I2CNm2Oc=; b=nBtpg2bavefiBRxMYTPDcGZcdRvioezSpupAcl+F6m2W4MRUSG/6hUtcuh0CYmT0qR VWPifXQf1FK9wIZwz7yONtZxafvNmkah3UKHP5wi5MSVzD9CUn6O+rF1y0qqTy5Zz2ZK WH2VR/tYwKrCReJ+VkqM3nt0BkoYNa2J3wSeO26j1jOzWYRmAs3SNuaV69se5mPgDO3R F8jZ8lnCLx/UZkmA53p1dxa7vs6U8P2T1siWG8GQcfy7uqlvXkb58bVhASydKTHgXw3f /nEcC4yNgzcm+MFMx8LSgRmKTJA8Vgr1jCdG9BtCBNvlMHE+8yDineoH41IewTiDfn5/ c8gg== X-Gm-Message-State: AOAM531B9LmO+hDI8mbJwP+4LThXYwxZixgKeu7BhPB1m2zz7Bw8s5Gf RpUNWxqqY0lpSOhZUotWNe2GOg== X-Google-Smtp-Source: ABdhPJxwlEnNX6WziSND5XDadBAq7e+9AzVId1LMRU/SL9DrOge0DxF36SE2K647M2SxhGavMXGalg== X-Received: by 2002:a05:6602:21cc:: with SMTP id c12mr385935ioc.81.1601334293133; Mon, 28 Sep 2020 16:04:53 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:52 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 03/10] net: ipa: kill unused status exceptions Date: Mon, 28 Sep 2020 18:04:39 -0500 Message-Id: <20200928230446.20561-4-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Only the deaggregation status exception type is ever actually used. If any other status exception type is reported we basically ignore it, and consume the packet. Remove the unused definitions of status exception type symbols; they can be added back when we actually handle them. Separately, two consecutive if statements test the same condition near the top of ipa_endpoint_suspend_one(). Instead, use a single test with a block that combines the previously-separate lines of code. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index e5e64ca244cbd..df7cd791bb408 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -51,13 +51,6 @@ enum ipa_status_opcode { enum ipa_status_exception { /* 0 means no exception */ IPA_STATUS_EXCEPTION_DEAGGR = 0x01, - IPA_STATUS_EXCEPTION_IPTYPE = 0x04, - IPA_STATUS_EXCEPTION_PACKET_LENGTH = 0x08, - IPA_STATUS_EXCEPTION_FRAG_RULE_MISS = 0x10, - IPA_STATUS_EXCEPTION_SW_FILT = 0x20, - /* The meaning of the next value depends on whether the IP version */ - IPA_STATUS_EXCEPTION_NAT = 0x40, /* IPv4 */ - IPA_STATUS_EXCEPTION_IPV6CT = IPA_STATUS_EXCEPTION_NAT, }; /* Status element provided by hardware */ @@ -1082,7 +1075,7 @@ static bool ipa_status_drop_packet(const struct ipa_status *status) { u32 val; - /* Deaggregation exceptions we drop; others we consume */ + /* Deaggregation exceptions we drop; all other types we consume */ if (status->exception) return status->exception == IPA_STATUS_EXCEPTION_DEAGGR; @@ -1428,11 +1421,10 @@ void ipa_endpoint_suspend_one(struct ipa_endpoint *endpoint) if (!(endpoint->ipa->enabled & BIT(endpoint->endpoint_id))) return; - if (!endpoint->toward_ipa) + if (!endpoint->toward_ipa) { ipa_endpoint_replenish_disable(endpoint); - - if (!endpoint->toward_ipa) (void)ipa_endpoint_program_suspend(endpoint, true); + } /* IPA v3.5.1 doesn't use channel stop for suspend */ stop_channel = endpoint->ipa->version != IPA_VERSION_3_5_1; From patchwork Mon Sep 28 23:04:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 289460 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 D422DC4741F for ; Mon, 28 Sep 2020 23:14:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A410D23A5A for ; Mon, 28 Sep 2020 23:14:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DDXAB9xC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbgI1XNn (ORCPT ); Mon, 28 Sep 2020 19:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFCF5C05BD12 for ; Mon, 28 Sep 2020 16:04:54 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id u19so2929524ion.3 for ; Mon, 28 Sep 2020 16:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vZ9KWQct8b79VV+T3ZHp62HwU/9rxwxAuHKFKCuD9EQ=; b=DDXAB9xCfez4AA+dSUJmDYm3LKOywC/AOuGaptQMxarCyvmOujjdrnj5NF2AWQ53BC L8gdzLBFAs4J5c8xQ4aI9POyyVLQGDCt5KxB9sp8BhxQ9Yz0qvfx+wA9DliGxSCJ06eG zdg/QXSQK+ZD4FHQs40VVoejQseCIk5GIlgNHYBus4ZWLxQTAOdDAMoA/jemVVMPrZwg vulPL932UbMAVN/XVgtThcJmBWk1bxOk+48HZgFVi+NtfFvb48sqke3Jr1qCtSFvk8qw nk+digqGMJvhdsYzXvRYUMf641bl24yLzOamtIBjHhKws8K1UFqhU4CrMR9hHtvZVtJD p/ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vZ9KWQct8b79VV+T3ZHp62HwU/9rxwxAuHKFKCuD9EQ=; b=DQfqKY/6ZSvzxqIg2G396DyDF4aUn3n3GjD5j3g/1WYGOKRv6AcrvfY/cuz4uuJjaG kug//SrAStJDbr2OW2FO4k97RBnvBJAY+lbos+KYHi4eH2N0MCwFUxJvEm+JSyNWTJjL EvPmRKxfOutITesg9VzKcoZv6vdymCFkGqqLLOuV6cTmudrR62j24EJiOU41KViYZ9qX 4mt/SVJyXra78T98LCNluX4e9n7W59gUiQXTo01dpc7FDMbtsjaku5kyLhkHydKudj1s oW9hiwfyK2K6vPxNQzAVs/2plzUGOSRS+cmSEVevw7yEW4j23VTLpQ/tGPNaCGcID7BJ Y2mw== X-Gm-Message-State: AOAM533becpyvc3aw6qAAdT3Sjljo1ARTq2FECQJACUcyx5mQ269B5Mr AhHSB9gYMcNYcarxxrlK6paf/g== X-Google-Smtp-Source: ABdhPJynjPfUqJcqGOExpfd29WkeUqlFabElW2BpYaIXZxU7JnJ2GQ2NkNsSoBbO2LUbZqH+BHwepQ== X-Received: by 2002:a02:8782:: with SMTP id t2mr748376jai.56.1601334294251; Mon, 28 Sep 2020 16:04:54 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:53 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 04/10] net: ipa: remove unused status structure field masks Date: Mon, 28 Sep 2020 18:04:40 -0500 Message-Id: <20200928230446.20561-5-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Most of the field masks used for fields in a status structure are unused. Remove their definitions; we can add them back again when we actually use them to handle arriving status messages. These are warned about if "W=2" is added to the build command. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index df7cd791bb408..24d688e3cd93a 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -69,36 +69,9 @@ struct ipa_status { }; /* Field masks for struct ipa_status structure fields */ - -#define IPA_STATUS_SRC_IDX_FMASK GENMASK(4, 0) - #define IPA_STATUS_DST_IDX_FMASK GENMASK(4, 0) - -#define IPA_STATUS_FLAGS1_FLT_LOCAL_FMASK GENMASK(0, 0) -#define IPA_STATUS_FLAGS1_FLT_HASH_FMASK GENMASK(1, 1) -#define IPA_STATUS_FLAGS1_FLT_GLOBAL_FMASK GENMASK(2, 2) -#define IPA_STATUS_FLAGS1_FLT_RET_HDR_FMASK GENMASK(3, 3) -#define IPA_STATUS_FLAGS1_FLT_RULE_ID_FMASK GENMASK(13, 4) -#define IPA_STATUS_FLAGS1_RT_LOCAL_FMASK GENMASK(14, 14) -#define IPA_STATUS_FLAGS1_RT_HASH_FMASK GENMASK(15, 15) -#define IPA_STATUS_FLAGS1_UCP_FMASK GENMASK(16, 16) -#define IPA_STATUS_FLAGS1_RT_TBL_IDX_FMASK GENMASK(21, 17) #define IPA_STATUS_FLAGS1_RT_RULE_ID_FMASK GENMASK(31, 22) -#define IPA_STATUS_FLAGS2_NAT_HIT_FMASK GENMASK_ULL(0, 0) -#define IPA_STATUS_FLAGS2_NAT_ENTRY_IDX_FMASK GENMASK_ULL(13, 1) -#define IPA_STATUS_FLAGS2_NAT_TYPE_FMASK GENMASK_ULL(15, 14) -#define IPA_STATUS_FLAGS2_TAG_INFO_FMASK GENMASK_ULL(63, 16) - -#define IPA_STATUS_FLAGS3_SEQ_NUM_FMASK GENMASK(7, 0) -#define IPA_STATUS_FLAGS3_TOD_CTR_FMASK GENMASK(31, 8) - -#define IPA_STATUS_FLAGS4_HDR_LOCAL_FMASK GENMASK(0, 0) -#define IPA_STATUS_FLAGS4_HDR_OFFSET_FMASK GENMASK(10, 1) -#define IPA_STATUS_FLAGS4_FRAG_HIT_FMASK GENMASK(11, 11) -#define IPA_STATUS_FLAGS4_FRAG_RULE_FMASK GENMASK(15, 12) -#define IPA_STATUS_FLAGS4_HW_SPECIFIC_FMASK GENMASK(31, 16) - #ifdef IPA_VALIDATE static void ipa_endpoint_validate_build(void) From patchwork Mon Sep 28 23:04:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 260000 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 01018C4727C for ; Mon, 28 Sep 2020 23:14:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC7B123A5A for ; Mon, 28 Sep 2020 23:14:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gAYeKowT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727258AbgI1XOr (ORCPT ); Mon, 28 Sep 2020 19:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8327C05BD13 for ; Mon, 28 Sep 2020 16:04:55 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id s88so3004426ilb.6 for ; Mon, 28 Sep 2020 16:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AXEpWEjYq3xYWFeLhdW5zwNJ04L4pgPCHJ/yRPl+/W8=; b=gAYeKowTjPCv9pyzlkfWn1LD0GFTzo7Yk8z6Jh7ek/OfX2ec8EYa47jzCGrGOQ6Nsa 3ctPAoP0YfmPNsAIbSa6PAEIZm61FS/bFqLo9wxkLqSnbyS3j4pNmkzO91GD3ho9mSQs jR6oG4fO9265OIi4QDCQ17l/oRUTKFfAKVrL8VyZ4KIHiyacZpXH2XiiZOMlrwe+VVb5 QIYkALGECjaM8o1TdxZ6Jxu/Rw5Fk5cDzzfavXZgUn9x0drd7PSkvBAHe3WhoC+pI4GQ 9wMhaVlKQXoDXLh5ZmXvVcBiHFxdhvibwpvVBKvGEa5NYs9HazLpzYhy3l+dbVlLZt5O TRiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AXEpWEjYq3xYWFeLhdW5zwNJ04L4pgPCHJ/yRPl+/W8=; b=FFtm6jCng8FvRzvMxBwRR7lgng0RxeQstiSkfthwkwXl0wGZMZEYmvADSHLwXseDVK bUr4oDj+SQsE/bXnWAna3U/jFyh5llWmLqnNf/MCRYS8LqhUSvOqIruIjq/jIY42MMix Cgjif8QX5K3mkXJkPzVVBsBbLNkiWytEzuuEMcjRbPNL0CXeawioZVP59J81+XZ5Y2yi ZhJtZcDsLW6vPW0MbhEuHAS80I/GWEoFCCx0avDdTrrF6b8Fh+dXmeGfbs+G4CatXYGc iJ2aF4yJkq47g5JxXy/7W+/ioV2bUuJ5ACww2rOqoo2beZauuYmjW5DxXyOhd/gYHKKS KsuQ== X-Gm-Message-State: AOAM531knKC8B9olxiUqM2wyzliDelSGry5NNi3UFt7OKlobj5YGK5UV 8dZbmCCoKHxnTROt18H05ugIbA== X-Google-Smtp-Source: ABdhPJwvFpPVTBt4LP+fEruF9IcFV9gAAZMtMuNBjF/N3RuhvkIyW8eQDjNduIwTanSO21Mr01/FVA== X-Received: by 2002:a92:243:: with SMTP id 64mr254026ilc.298.1601334295238; Mon, 28 Sep 2020 16:04:55 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:54 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 05/10] net: ipa: share field mask values for GSI interrupt type Date: Mon, 28 Sep 2020 18:04:41 -0500 Message-Id: <20200928230446.20561-6-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The GSI interrupt type register and interrupt type mask register have the same field bits at the same locations. Use a common set of field masks for both registers rather than essentially duplicating them. The only place the interrupt mask register uses any of these is in gsi_irq_enable(). Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 4 ++-- drivers/net/ipa/gsi_reg.h | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index cb75f7d540571..745717477cad3 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -254,8 +254,8 @@ static void gsi_irq_enable(struct gsi *gsi) /* We don't use inter-EE channel or event interrupts */ val = GSI_CNTXT_TYPE_IRQ_MSK_ALL; - val &= ~MSK_INTER_EE_CH_CTRL_FMASK; - val &= ~MSK_INTER_EE_EV_CTRL_FMASK; + val &= ~INTER_EE_CH_CTRL_FMASK; + val &= ~INTER_EE_EV_CTRL_FMASK; iowrite32(val, gsi->virt + GSI_CNTXT_TYPE_IRQ_MSK_OFFSET); val = GENMASK(gsi->channel_count - 1, 0); diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h index acc9e744c67d1..598db57a68dfb 100644 --- a/drivers/net/ipa/gsi_reg.h +++ b/drivers/net/ipa/gsi_reg.h @@ -258,6 +258,11 @@ GSI_EE_N_CNTXT_TYPE_IRQ_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_TYPE_IRQ_OFFSET(ee) \ (0x0001f080 + 0x4000 * (ee)) +#define GSI_CNTXT_TYPE_IRQ_MSK_OFFSET \ + GSI_EE_N_CNTXT_TYPE_IRQ_MSK_OFFSET(GSI_EE_AP) +#define GSI_EE_N_CNTXT_TYPE_IRQ_MSK_OFFSET(ee) \ + (0x0001f088 + 0x4000 * (ee)) +/* The masks below are used for the TYPE_IRQ and TYPE_IRQ_MASK registers */ #define CH_CTRL_FMASK GENMASK(0, 0) #define EV_CTRL_FMASK GENMASK(1, 1) #define GLOB_EE_FMASK GENMASK(2, 2) @@ -265,18 +270,6 @@ #define INTER_EE_CH_CTRL_FMASK GENMASK(4, 4) #define INTER_EE_EV_CTRL_FMASK GENMASK(5, 5) #define GENERAL_FMASK GENMASK(6, 6) - -#define GSI_CNTXT_TYPE_IRQ_MSK_OFFSET \ - GSI_EE_N_CNTXT_TYPE_IRQ_MSK_OFFSET(GSI_EE_AP) -#define GSI_EE_N_CNTXT_TYPE_IRQ_MSK_OFFSET(ee) \ - (0x0001f088 + 0x4000 * (ee)) -#define MSK_CH_CTRL_FMASK GENMASK(0, 0) -#define MSK_EV_CTRL_FMASK GENMASK(1, 1) -#define MSK_GLOB_EE_FMASK GENMASK(2, 2) -#define MSK_IEOB_FMASK GENMASK(3, 3) -#define MSK_INTER_EE_CH_CTRL_FMASK GENMASK(4, 4) -#define MSK_INTER_EE_EV_CTRL_FMASK GENMASK(5, 5) -#define MSK_GENERAL_FMASK GENMASK(6, 6) #define GSI_CNTXT_TYPE_IRQ_MSK_ALL GENMASK(6, 0) #define GSI_CNTXT_SRC_CH_IRQ_OFFSET \ From patchwork Mon Sep 28 23:04:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 289458 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 81799C2D0A8 for ; Mon, 28 Sep 2020 23:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4494623A5A for ; Mon, 28 Sep 2020 23:14:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nmnjKn7h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbgI1XOa (ORCPT ); Mon, 28 Sep 2020 19:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727074AbgI1XNn (ORCPT ); Mon, 28 Sep 2020 19:13:43 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD64C05BD16 for ; Mon, 28 Sep 2020 16:04:56 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id z13so2900163iom.8 for ; Mon, 28 Sep 2020 16:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MAvpS98+eTt3PNnsDgqV3HXwzJnvHmKZpA/Fx0C9NeU=; b=nmnjKn7hIGhxVVl52AdTSSW+PI97BHwwxFLL2ocGbe0HTNrmxzsMxpY6dAOv4fQkAq UcHLKgGsyPuvbeGxZ8gvSGJZxI7Fo8/98dgj2SOxBfsy4NBFu/gZkj3zjFzBBA7gyMD5 2QDzwVeVSk5s8N8qa4WmzcVQGox735h5qUG9N7CzO3RqAjJzH0IXARGi6ralYiEuCeCI mlAbiPnPgMi9+ACgNyKv64bKfRy9FKtu4bllUGmJFm+2ddM/VRfs0DwhyVkBQzn48Kzd G+oTNaim6lnx3YXOX37WqkWseCH51JY9N2LC4iWk9xTIj7/JHgmVg0cTtYHj+0luW2lw OR8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MAvpS98+eTt3PNnsDgqV3HXwzJnvHmKZpA/Fx0C9NeU=; b=iLBT03EsVF2OLkHLB3MQmj6kNC7CQjd2zWKX7+3EqvIDK1i1UNriANeYf0570LJ8wA Q7z7b0NrOBTjfVMOw2GEYDrHW13m+r6dPHydyyjClH2qcejgIN7q9ItBp4gajhDozW1t 2dLFnz55fYvBlbgXXMhqcJlY8cKh0QVXMU2/ar258Y+s3pRK4xfuxu9vdFLHNPV8H366 B5+TaYjuvHpvIzR2FlJ8Qt+08Fy3saxF+1HVIBbveEKct7QXhiJdq9uvFyyaqbdt/Cn4 ps37rTbFilYZSgESuRaelmKjT9VQVpjc1QL9iU6LdF5dmgUXCWTq4iKbH079RPPuuTOK dJ6A== X-Gm-Message-State: AOAM530IOt7ODPpJwKDq72z0TVtLlLUMdbwJZ5WE35/DR9jsTkwhT+e7 BbD3Vpy/34z+VImHcmqP0KiLQw== X-Google-Smtp-Source: ABdhPJyrhDF3QGHpPaZFLORNgTVk5P72ii6EsQAOByIv1qYBXFA3o5zQyW1/oZutWri77YsA2DMMLQ== X-Received: by 2002:a05:6638:22ba:: with SMTP id z26mr735160jas.55.1601334296154; Mon, 28 Sep 2020 16:04:56 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:55 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 06/10] net: ipa: share field mask values for GSI global interrupt Date: Mon, 28 Sep 2020 18:04:42 -0500 Message-Id: <20200928230446.20561-7-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The GSI global interrupt is managed by three registers: enable; status; and clear. The three registers have same set of field bits at the same locations. Use a common set of field masks for all three registers to avoid duplication. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 4 ++-- drivers/net/ipa/gsi_reg.h | 21 ++++++--------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 745717477cad3..203d079c481c4 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1074,8 +1074,8 @@ static void gsi_isr_glob_ee(struct gsi *gsi) val &= ~ERROR_INT_FMASK; - if (val & EN_GP_INT1_FMASK) { - val ^= EN_GP_INT1_FMASK; + if (val & GP_INT1_FMASK) { + val ^= GP_INT1_FMASK; gsi_isr_gp_int1(gsi); } diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h index 598db57a68dfb..b789e0f866fa0 100644 --- a/drivers/net/ipa/gsi_reg.h +++ b/drivers/net/ipa/gsi_reg.h @@ -321,29 +321,20 @@ GSI_EE_N_CNTXT_GLOB_IRQ_STTS_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_GLOB_IRQ_STTS_OFFSET(ee) \ (0x0001f100 + 0x4000 * (ee)) -#define ERROR_INT_FMASK GENMASK(0, 0) -#define GP_INT1_FMASK GENMASK(1, 1) -#define GP_INT2_FMASK GENMASK(2, 2) -#define GP_INT3_FMASK GENMASK(3, 3) - #define GSI_CNTXT_GLOB_IRQ_EN_OFFSET \ GSI_EE_N_CNTXT_GLOB_IRQ_EN_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_GLOB_IRQ_EN_OFFSET(ee) \ (0x0001f108 + 0x4000 * (ee)) -#define EN_ERROR_INT_FMASK GENMASK(0, 0) -#define EN_GP_INT1_FMASK GENMASK(1, 1) -#define EN_GP_INT2_FMASK GENMASK(2, 2) -#define EN_GP_INT3_FMASK GENMASK(3, 3) -#define GSI_CNTXT_GLOB_IRQ_ALL GENMASK(3, 0) - #define GSI_CNTXT_GLOB_IRQ_CLR_OFFSET \ GSI_EE_N_CNTXT_GLOB_IRQ_CLR_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_GLOB_IRQ_CLR_OFFSET(ee) \ (0x0001f110 + 0x4000 * (ee)) -#define CLR_ERROR_INT_FMASK GENMASK(0, 0) -#define CLR_GP_INT1_FMASK GENMASK(1, 1) -#define CLR_GP_INT2_FMASK GENMASK(2, 2) -#define CLR_GP_INT3_FMASK GENMASK(3, 3) +/* The masks below are used for the general IRQ STTS, EN, and CLR registers */ +#define ERROR_INT_FMASK GENMASK(0, 0) +#define GP_INT1_FMASK GENMASK(1, 1) +#define GP_INT2_FMASK GENMASK(2, 2) +#define GP_INT3_FMASK GENMASK(3, 3) +#define GSI_CNTXT_GLOB_IRQ_ALL GENMASK(3, 0) #define GSI_CNTXT_GSI_IRQ_STTS_OFFSET \ GSI_EE_N_CNTXT_GSI_IRQ_STTS_OFFSET(GSI_EE_AP) From patchwork Mon Sep 28 23:04:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 259999 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 17A92C4727C for ; Mon, 28 Sep 2020 23:15:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D564C23A5A for ; Mon, 28 Sep 2020 23:15:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IuqZoPEA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727300AbgI1XPD (ORCPT ); Mon, 28 Sep 2020 19:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5AAC05BD17 for ; Mon, 28 Sep 2020 16:04:57 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id q4so3007882ils.4 for ; Mon, 28 Sep 2020 16:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IejZ9HVKdCtJgxeP/Wkw81HQgdzY8PLcZSPCdSMKGqs=; b=IuqZoPEAt8lZh+LH8stxOo7V1yhewO+HcnokthjTxP2EN0zz7cqBeSZ7AhPgfb2XEf mkeRnkEVb568MfrMG/ECWGzFuYmG1fHXcF8g6V+1R+6R+u3PFxEIUSp7QNfxF5QTD3Sb xevQc0awQWvpeNpdNOQ3uxKp+cjKlzZ89xclqi6aH90TGnmmweqhIlQtzodGKNuf/PVq PiY996t/tY8Xk1l+onrHiA9zrm+LgH42de3Fn8ao5sq176vi+zRalM7g6QjCSloQa9gw ZHWPHlZnpOyiPL2NGa6p4kJF1h99vkZj8hCj9pq5dUuidDqBh+BeCOlhmDryoPsVyjMF yELA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IejZ9HVKdCtJgxeP/Wkw81HQgdzY8PLcZSPCdSMKGqs=; b=K/YyXwGenanuivA24GVIFucQ+2UzeXWxv5Uetu0Ad5PUQcbdUEhPfO6l/sqQl9xiWU J+VdgKHwwZwuJKSa5iVvdo+4RfLnGyI+Q7aA51gr1oCIqshFjH8lpcZkP88A2cuUYVGW vkpTlYvBjJbEBKBeFfrmjcjbxjcWZMXvpfT5L0YTPoOzEjciZILvsbym17xe/D5l5lXK rcOu5WqK++Kd0VpjbfjxryY57ifCoFMeNsDclZMd1n0+IWhF7ugp4t9inyQrVJyItn/9 CQ+gXeUna3opAhq2pQCvsQxFf/v7T/nTItcHDdguBihLfal9/cRwee4sTEjm/7ke9P/+ qkjg== X-Gm-Message-State: AOAM533WvTK5zFRXG89sT/PkFPLKdowPIPqpkdjGV/7mpaA9BCFYd/uN b4AFdYRQbHw2ZAh1igzHqwnkazCwlY2eLg== X-Google-Smtp-Source: ABdhPJzY21tQ1IcsTPzkr/fxeX1zf0OND1STpUfVwi49+pDQJN4uJScWAt4g3wYXTFEH3I6F9zCnlw== X-Received: by 2002:a92:1952:: with SMTP id e18mr539572ilm.189.1601334297118; Mon, 28 Sep 2020 16:04:57 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:56 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 07/10] net: ipa: share field mask values for GSI general interrupt Date: Mon, 28 Sep 2020 18:04:43 -0500 Message-Id: <20200928230446.20561-8-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The GSI general interrupt is managed by three registers: enable; status; and clear. The three registers have same set of field bits at the same locations. Use a common set of field masks for all three registers to avoid duplication. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 2 +- drivers/net/ipa/gsi_reg.h | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 203d079c481c4..cb676083dfa73 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -271,7 +271,7 @@ static void gsi_irq_enable(struct gsi *gsi) iowrite32(val, gsi->virt + GSI_CNTXT_GLOB_IRQ_EN_OFFSET); /* Never enable GSI_BREAK_POINT */ - val = GSI_CNTXT_GSI_IRQ_ALL & ~EN_BREAK_POINT_FMASK; + val = GSI_CNTXT_GSI_IRQ_ALL & ~BREAK_POINT_FMASK; iowrite32(val, gsi->virt + GSI_CNTXT_GSI_IRQ_EN_OFFSET); } diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h index b789e0f866fa0..8e0e9350c3831 100644 --- a/drivers/net/ipa/gsi_reg.h +++ b/drivers/net/ipa/gsi_reg.h @@ -340,29 +340,20 @@ GSI_EE_N_CNTXT_GSI_IRQ_STTS_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_GSI_IRQ_STTS_OFFSET(ee) \ (0x0001f118 + 0x4000 * (ee)) -#define BREAK_POINT_FMASK GENMASK(0, 0) -#define BUS_ERROR_FMASK GENMASK(1, 1) -#define CMD_FIFO_OVRFLOW_FMASK GENMASK(2, 2) -#define MCS_STACK_OVRFLOW_FMASK GENMASK(3, 3) - #define GSI_CNTXT_GSI_IRQ_EN_OFFSET \ GSI_EE_N_CNTXT_GSI_IRQ_EN_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_GSI_IRQ_EN_OFFSET(ee) \ (0x0001f120 + 0x4000 * (ee)) -#define EN_BREAK_POINT_FMASK GENMASK(0, 0) -#define EN_BUS_ERROR_FMASK GENMASK(1, 1) -#define EN_CMD_FIFO_OVRFLOW_FMASK GENMASK(2, 2) -#define EN_MCS_STACK_OVRFLOW_FMASK GENMASK(3, 3) -#define GSI_CNTXT_GSI_IRQ_ALL GENMASK(3, 0) - #define GSI_CNTXT_GSI_IRQ_CLR_OFFSET \ GSI_EE_N_CNTXT_GSI_IRQ_CLR_OFFSET(GSI_EE_AP) #define GSI_EE_N_CNTXT_GSI_IRQ_CLR_OFFSET(ee) \ (0x0001f128 + 0x4000 * (ee)) -#define CLR_BREAK_POINT_FMASK GENMASK(0, 0) -#define CLR_BUS_ERROR_FMASK GENMASK(1, 1) -#define CLR_CMD_FIFO_OVRFLOW_FMASK GENMASK(2, 2) -#define CLR_MCS_STACK_OVRFLOW_FMASK GENMASK(3, 3) +/* The masks below are used for the general IRQ STTS, EN, and CLR registers */ +#define BREAK_POINT_FMASK GENMASK(0, 0) +#define BUS_ERROR_FMASK GENMASK(1, 1) +#define CMD_FIFO_OVRFLOW_FMASK GENMASK(2, 2) +#define MCS_STACK_OVRFLOW_FMASK GENMASK(3, 3) +#define GSI_CNTXT_GSI_IRQ_ALL GENMASK(3, 0) #define GSI_CNTXT_INTSET_OFFSET \ GSI_EE_N_CNTXT_INTSET_OFFSET(GSI_EE_AP) From patchwork Mon Sep 28 23:04:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 260002 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 00280C2D0A8 for ; Mon, 28 Sep 2020 23:14:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFF8523A5B for ; Mon, 28 Sep 2020 23:14:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iWp1yNl7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727185AbgI1XOJ (ORCPT ); Mon, 28 Sep 2020 19:14:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727090AbgI1XNn (ORCPT ); Mon, 28 Sep 2020 19:13:43 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF06EC05BD1A for ; Mon, 28 Sep 2020 16:04:58 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id v13so826468ilc.7 for ; Mon, 28 Sep 2020 16:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y3er6mNwMu5Sx26fZeVu6K2o8G6XAAQwU5jOGoe2b5s=; b=iWp1yNl750KTH5K1EKPuDUL4V06zOqAX2I7JtzpibswLAMpqw4c8Adpj2G81Z8pUKS xX5E+Uk67BKU61O2f1AfG1HvriDxeMP3SJuwVp4FiFId5vnKmHmijTasdMvBP6z4RMfy Y/vBhbEvZCKTXfJHIMgJX7c0V8nBtbwBxRc/jNonuNb9a+RdXbt+nZSpyFlkYlBQnS79 SHNwsOau3+DCAYEYBnkyx4EdNM+9V9Pd9U/vnjhkB/JcjEhMe0I12n2qVt+PU175Fcu2 WWsbrSXmp3VjBILjFT5pZTRIoD8qmKpAIjKnilPUfBHwplq42UcnLZ6JWjj6cHz0CmO2 uw4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y3er6mNwMu5Sx26fZeVu6K2o8G6XAAQwU5jOGoe2b5s=; b=M/TwGNi2t02tVdWIPwsivSydM+6RKMasbKJo9TLI+aqlqTqWVdHKOK14XYHzHV8ps2 lhrN90HOCgukiR598/w0CGbpPpc6GK95u7eA0xKAJCO1kiz5pFXt6oHcQnwgyJfC1Pax iCZI8eAGHi3csvNDN8mgyhHVhDJyVvZB3SmIjStM9QA4K8nOFvTSVeNQqGGpNW/o4wOv nIWUfXpQ2sLMsEHGnc50tNgmeglQvP594kiX2xY7sI2W5OJUNwtnp+miU6RwfYqjRqBt XOX3BFkD0fzwJ7SxQ9pjaMddtvBML/ZMH4WZ7arcjUNJsxR4Yp5xng7FXwkbUxo8Iann t5SA== X-Gm-Message-State: AOAM533q1BSNfMVo/C6CLOC6sRE90j0xUXtyuAame00piO16/5U8SUdL TfKQ8RL5dHuvTuV88Cr23VPvvQ== X-Google-Smtp-Source: ABdhPJxlQl3tMX0qEez6qvL7U8ZHeXxnadQbaiO9g8p6vD9qn3PaTsXyHvtqfWSN4yNWUntZ726TVA== X-Received: by 2002:a92:2602:: with SMTP id n2mr631739ile.82.1601334298144; Mon, 28 Sep 2020 16:04:58 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:57 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 08/10] net: ipa: fix two mild warnings Date: Mon, 28 Sep 2020 18:04:44 -0500 Message-Id: <20200928230446.20561-9-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix two spots where a variable "channel_id" is unnecessarily redefined inside loops in "gsi.c". This is warned about if "W=2" is added to the build command. Note that this problem is harmless, so there's no need to backport it as a bugfix. Remove a comment in gsi_init() about waking the system; the GSI interrupt does not wake the system any more. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index cb676083dfa73..6bfac1efe037c 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1600,7 +1600,7 @@ static int gsi_channel_setup(struct gsi *gsi, bool legacy) /* Compute which modem channels need to be deallocated */ mask ^= gsi->modem_channel_bitmap; while (mask) { - u32 channel_id = __fls(mask); + channel_id = __fls(mask); mask ^= BIT(channel_id); @@ -1628,7 +1628,7 @@ static void gsi_channel_teardown(struct gsi *gsi) mutex_lock(&gsi->mutex); while (mask) { - u32 channel_id = __fls(mask); + channel_id = __fls(mask); mask ^= BIT(channel_id); @@ -1972,7 +1972,6 @@ int gsi_init(struct gsi *gsi, struct platform_device *pdev, bool prefetch, */ init_dummy_netdev(&gsi->dummy_dev); - /* Get the GSI IRQ and request for it to wake the system */ ret = platform_get_irq_byname(pdev, "gsi"); if (ret <= 0) { dev_err(dev, "DT error %d getting \"gsi\" IRQ property\n", ret); From patchwork Mon Sep 28 23:04:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 289457 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 96A17C4727C for ; Mon, 28 Sep 2020 23:14:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6411C23A5A for ; Mon, 28 Sep 2020 23:14:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VFmK0cyh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727283AbgI1XOu (ORCPT ); Mon, 28 Sep 2020 19:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727028AbgI1XNm (ORCPT ); Mon, 28 Sep 2020 19:13:42 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C76AFC05BD1B for ; Mon, 28 Sep 2020 16:04:59 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id u19so2929670ion.3 for ; Mon, 28 Sep 2020 16:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LnfICc5M/Xe5Ap7kkbr86ZPlX06r5/7j/GM9O+SpMeA=; b=VFmK0cyh8nWjDtjn4+0k5DFmabsAYLaKCKtVlZ1GNh9bUHeC3lj+vrqk8hN42zQO/p OCWK4VPSeOnev1YnCfLyhDmXq2px0oWxXHt8SJtXyJWBxEk981npCLT1LBOFkBPdM40z mV6GwrYRc+dEKDibGOzhpFQ58uWx7qVWfaAmen76ho+L7S15q10GRuEOF6Ueqc050n20 03sGV3tl98zJjKXvBbMgLQfqNIT9lveYgoUnTNQ62VeU6duwSyJKbbg4Q1Ir/2x/XZJM 6U/vOx59o9UUsxHcFBnAvyAC5FQZtBsyPZHGr7Vff4wLyRXQ43/9r76H284/srA9s0/L BTmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LnfICc5M/Xe5Ap7kkbr86ZPlX06r5/7j/GM9O+SpMeA=; b=KeaxDldE++fzH57gsfkVZODwhVT0/JV5XaouII2yaxM7Pxugfl19OeENQ1IIfaFS5m YCeEzqSUtESFBLU5CgAt5l3O6s75E6m0ucgDcoyRqbd7utvZCtUxukP+r0758qwNSulQ Ko9ffvbYaCPuIVKFxM9SuvJMgOb0bI4M/lJU+qGnWPD7N5crM/dhT242dFXfFM5kJCa8 U4RC9gDV408vvUPrSpKYSvD2U2Mj6Kt3weErYJlvFATQ8OMNBkNZz/e8ICcNNSQUNcWM b+W1GlFCzqKJcYJydvxhPTsB+drkcaOGoU3kulpBJTITdhGNDOoOMX+YALFcoWVuHmuN 7rlw== X-Gm-Message-State: AOAM530Mxm/XkEz4QyXWdkAI/Pb9auc9M8TwiAC0lUx6Zip8MWt8Hrwg 0FY85nR0hKYFy6jtng2mQB7lQQ== X-Google-Smtp-Source: ABdhPJy72s7vFebZ+/vcYxm2Hyf8iX43KdaADIFyN7QVnDc7mG4VVfiFAusfNwiShCHkrNcu7YUYZw== X-Received: by 2002:a5d:9693:: with SMTP id m19mr395805ion.161.1601334299145; Mon, 28 Sep 2020 16:04:59 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:58 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 09/10] net: ipa: rename a phandle variable Date: Mon, 28 Sep 2020 18:04:45 -0500 Message-Id: <20200928230446.20561-10-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When "W=2" is supplied to the build command, we get a warning about shadowing a global declaration (of a typedef) for a variable defined in ipa_probe(). Rename the variable to get rid of the warning. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index 1044758b501d2..cd4d993b0bbb2 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -723,8 +723,8 @@ static int ipa_probe(struct platform_device *pdev) bool modem_alloc; bool modem_init; struct ipa *ipa; - phandle phandle; bool prefetch; + phandle ph; int ret; ipa_validate_build(); @@ -736,13 +736,13 @@ static int ipa_probe(struct platform_device *pdev) return -EPROBE_DEFER; /* We rely on remoteproc to tell us about modem state changes */ - phandle = of_property_read_phandle(dev->of_node, "modem-remoteproc"); - if (!phandle) { + ph = of_property_read_phandle(dev->of_node, "modem-remoteproc"); + if (!ph) { dev_err(dev, "DT missing \"modem-remoteproc\" property\n"); return -EINVAL; } - rproc = rproc_get_by_phandle(phandle); + rproc = rproc_get_by_phandle(ph); if (!rproc) return -EPROBE_DEFER; From patchwork Mon Sep 28 23:04:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 289459 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 CF9A0C2D0A8 for ; Mon, 28 Sep 2020 23:14:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86EEF23A5A for ; Mon, 28 Sep 2020 23:14:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AHKwTPsg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727204AbgI1XOM (ORCPT ); Mon, 28 Sep 2020 19:14:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbgI1XNn (ORCPT ); Mon, 28 Sep 2020 19:13:43 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA8C7C05BD1D for ; Mon, 28 Sep 2020 16:05:00 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id z13so2900296iom.8 for ; Mon, 28 Sep 2020 16:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NuGxB8yCQyfl8m9V0CkWYOyAigdUp2kf6vGRj1Y/jrw=; b=AHKwTPsgH48I27z39EKzCiQpSUcgI9O2yF9awvt4BWhO00wPb6NYSgkbbvGL2O9sZv gBhHIpyqjDGrIKYz7l8n/zsIcG/J61NOcxTk9XW7m+40XieeDwFhv82Xn7/CvaLZgq94 /AGSXOrBQTlA3bOQJuUDx1Zg08Q/ElpKUPQgw6SQwu3YQY+9G4IZpBUpCrXnIuO1acqB gEvGa4mw5TyQvZoDUNxaeNADFlYJgnD0bwDhLQeMXbz7ZY4Ne7t6nbk9h4kGcLWCp0Vh 6D5ZJCiy1IU1TfdNzCvrETqjSLTBFhpU79op8LxidNph01MvCDSNvNcfPiihwo+tWDgS Rwcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NuGxB8yCQyfl8m9V0CkWYOyAigdUp2kf6vGRj1Y/jrw=; b=FzrSl3Vy83Nnx+fn/I8axghH0+Mpqhf/svYD7ltUnBT8D67BtSc+jU07ucfcUDMb8g 1Koqo6fe0piOodAFNGxA4665caM3O3ptahuImwN8QMAbrhxUYZfxAjsQDrOXPNhgURpF RDng4EEJ+lNrylckFE6vRXHtHzFPthkOwO47coWEFzQGuQgHGAvQnuEqRU18/wWi0btv wto6wIWT81zLvbJrn7sGfLVNlZ2ifclpnJTzy3jS1uce0LIbuf+P5PNXmIbSvAsgYzxJ 5Xis9RScIk97WjoSzuCgD6IiMvBga3NQuXB9jjsWT5jkYY50+Co+YXpXBdIK/YjlwiwN pSnw== X-Gm-Message-State: AOAM531uFgQ1XYQszSFFHjqVu/QILonYJcJYaiY8Tja4VZtebetJL1gW 3okykMl1Dv8iUySCTFVnsB+3BQ== X-Google-Smtp-Source: ABdhPJzZq0Spz0R/vFIJw6h8QtWBPNbOEUYA1B7CjR9GHGj4rLJ/VPVyP8DvOI+F042JknYBH3Kwwg== X-Received: by 2002:a05:6638:220c:: with SMTP id l12mr708832jas.139.1601334300066; Mon, 28 Sep 2020 16:05:00 -0700 (PDT) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id 137sm1009039ioc.20.2020.09.28.16.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:04:59 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 10/10] net: ipa: fix two comments Date: Mon, 28 Sep 2020 18:04:46 -0500 Message-Id: <20200928230446.20561-11-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928230446.20561-1-elder@linaro.org> References: <20200928230446.20561-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In ipa_uc_response_hdlr() a comment uses the wrong function name when it describes where a clock reference is taken. Fix this. Also fix the comment in ipa_uc_response_hdlr() to correctly refer to ipa_uc_setup(), which is where the clock reference described here is taken. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_reg.h | 2 +- drivers/net/ipa/ipa_uc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_reg.h b/drivers/net/ipa/ipa_reg.h index eb4e39fa7d4bd..e542598fd7759 100644 --- a/drivers/net/ipa/ipa_reg.h +++ b/drivers/net/ipa/ipa_reg.h @@ -426,7 +426,7 @@ enum ipa_cs_offload_en { IPA_CS_RSVD }; -/** enum ipa_aggr_en - aggregation type field in ENDP_INIT_AGGR_N */ +/** enum ipa_aggr_en - aggregation enable field in ENDP_INIT_AGGR_N */ enum ipa_aggr_en { IPA_BYPASS_AGGR = 0, IPA_ENABLE_AGGR = 1, diff --git a/drivers/net/ipa/ipa_uc.c b/drivers/net/ipa/ipa_uc.c index 1a0b04e0ab749..b382d47bc70d9 100644 --- a/drivers/net/ipa/ipa_uc.c +++ b/drivers/net/ipa/ipa_uc.c @@ -144,7 +144,7 @@ static void ipa_uc_response_hdlr(struct ipa *ipa, enum ipa_irq_id irq_id) * should only receive responses from the microcontroller when it has * sent it a request message. * - * We can drop the clock reference taken in ipa_uc_init() once we + * We can drop the clock reference taken in ipa_uc_setup() once we * know the microcontroller has finished its initialization. */ switch (shared->response) {