From patchwork Fri Feb 5 22:10:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 377642 Delivered-To: patch@linaro.org Received: by 2002:a17:906:48d2:0:0:0:0 with SMTP id d18csp2718418ejt; Fri, 5 Feb 2021 19:28:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrwr7dO7NPkagGCdVF9PBZ6ZECQIJzGsVX9WX1YBQwp5sUaWarlPYtaNWvIbtu/lTBR0kM X-Received: by 2002:a05:6402:2053:: with SMTP id bc19mr6458339edb.230.1612582093907; Fri, 05 Feb 2021 19:28:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612582093; cv=none; d=google.com; s=arc-20160816; b=oDLfao3fnc3zT0r8x16roxGpfg0RoUpKErqIwo6r9fwflGJOMHLgLii1d08TGL/cOM Yc5e2zUHNNuUh3SWL9NtqD75VhQcoSxb5g2rLq5aCVqoDeqAlnTmkFcuYgZxmxTpVVOl 0PGup7TC+lJSjRB4OIQQWbDcbt+SnhcciFzV7du8pejO3B1rWc2yIiRj9jmHFFzPnPDi JcXwd9dw4BdgVq07k7BGjNoJ/h69tGhyAblZt+9C/zFFC267R+GKD58CBhH7H+v9J0uN VX6ZV8/qI4JMCq6vFN/wPst9ccUVA4VH3ejiKB44siuatPPlBkrkPHBseXg73sipld8M 0iSA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=VdNQsrR6L4Zb5IpKYZydONt7isMKUPDajZ0BlWteITU=; b=i2LPKchplP39o9athEdF/WDxDINsM+UFrSZaQm/qqVcqUrdwgDvnUSpaDCgsF1fC99 KPouzMLb7YnM5N/lUpJ/NHlYPLcA6aWOi3UWvNuptIMOnIH0TD/NxF4AQoRvFW3DQ1R0 Bq0DawRnBH1egHEU8KWQHWBX88GfDzqIFhWXYJAM09QXEFzLjnuUVREZQfUu36hFjF0v QzkPe07f2uehV0LF6cVmc9wt6ijEQGDiI2qXye0+s758Ecv5zQ6R+3QXhazl5wLxO/W/ fcIun2nC6jDFFxrsSDJbWxs2ujI4kUb0afWBX/SayNiiRQ2m4KS5fTWxT5TMfWjV3+OF iJLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GJef85PV; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si4463194edw.164.2021.02.05.19.28.13; Fri, 05 Feb 2021 19:28:13 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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=@linaro.org header.s=google header.b=GJef85PV; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232594AbhBFD0V (ORCPT + 7 others); Fri, 5 Feb 2021 22:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbhBFCbc (ORCPT ); Fri, 5 Feb 2021 21:31:32 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EE45C0611BD for ; Fri, 5 Feb 2021 14:11:07 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id n201so8724025iod.12 for ; Fri, 05 Feb 2021 14:11:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VdNQsrR6L4Zb5IpKYZydONt7isMKUPDajZ0BlWteITU=; b=GJef85PVibNB32cjYhF6sjtPaoih2XjB+VLDpYmn0I0+42AAj0kuRQ7CSqlsAcMlyT vaODY3I56ik030rqwqW2HZDgEpC7shYpMVNhor41GRtpZWRS1oiHivgEfnu/hzuYbb8h Oq4voH7IXpE0YiGfsrXH+9smDa9U8Jr/LhR/2sKb0oUNbZxVqrHzJAFjytg8Cl36l9/O kA5MTxeyfxVjOZD6X0VZ/n2ffz9Jc9EbZAZxMp8ksWQiEO8H2VUnmsdQrVCz8/W3Y8DV DNYaHoW74RzmiHGnOsTfOlFWnuOUDQHImSnZst1WOcEIzzJfs8I3X7bq2dG0DGB7wWtV XREA== 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:mime-version :content-transfer-encoding; bh=VdNQsrR6L4Zb5IpKYZydONt7isMKUPDajZ0BlWteITU=; b=OOEpM4qRnl3jSd2w2chYLoW7ScV8n2SXdVKV4YalwxZL8SXYLnKFGE3O1OWV2FgLB3 MMQjiUGVwbzfe3zh1A/JQdJM9lPxlz2wtGeJAwiJPWQT7Ozlq2pwzjYmC3T82j+8+Llt 8ylHU7EvQMAfhVtQjXq07zX7HKyKHg9++sJHBKoeEYjQhEmKiAxrY/xk52qdqvReRHc4 nuHOT3411NUHIWiPrR/Ctx7ybrLCoBpCeSgV3i5meGNBP2L19MA1ZZCb7pEJSzbMTE9F 29Mx/mbVv41RK4qoxrtjd+VDfEY3iZe5KahxmcRH0cssoGaODNbjCfjTEg1/5IbEt85R zD4Q== X-Gm-Message-State: AOAM530rKj9JXirpaCvd39yd0Mrl0EYjGnZRxRIrXq5ov1rqLGP+wq3d 1qIFmeR+hQ4BQi0TSv6uPJ46hA== X-Received: by 2002:a5d:9552:: with SMTP id a18mr6136048ios.154.1612563066961; Fri, 05 Feb 2021 14:11:06 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id m15sm4647171ilh.6.2021.02.05.14.11.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 14:11:06 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: elder@kernel.org, evgreen@chromium.org, bjorn.andersson@linaro.org, cpratapa@codeaurora.org, subashab@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 0/7] net: ipa: a mix of small improvements Date: Fri, 5 Feb 2021 16:10:53 -0600 Message-Id: <20210205221100.1738-1-elder@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Version 2 of this series restructures a couple of the changed functions (in patches 1 and 2) to avoid blocks of indented code by returning early when possible, as suggested by Jakub. The description of the first patch was changed as a result, to better reflect what the updated patch does. It also fixes one spot I identified when updating the code, where gsi_channel_stop() was doing the wrong thing on error. The original description for this series is below. -Alex This series contains a sort of unrelated set of code cleanups. The first two are things I wanted to do in a series that updated some NAPI code recently. I didn't want to change things in a way that affected existing testing so I set these aside for later (i.e., now). The third makes a change to event ring handling that's similar to what was done a while back for channels. There's little benefit to cacheing the current state of an event ring, so with this we'll just fetch the state from hardware whenever we need it. The fourth patch removes the definitions of two unused symbols. The fifth replaces a count that is always 0 or 1 with a Boolean. The sixth removes a build-time validation check that doesn't really provide benefit. And the last one fixes a problem (in two spots) that could cause a build-time check to fail "bogusly". -Alex Alex Elder (7): net: ipa: move mutex calls into __gsi_channel_stop() net: ipa: synchronize NAPI only for suspend net: ipa: do not cache event ring state net: ipa: remove two unused register definitions net: ipa: use a Boolean rather than count when replenishing net: ipa: get rid of status size constraint net: ipa: avoid field overflow drivers/net/ipa/gsi.c | 69 ++++++++++++++++++++-------------- drivers/net/ipa/gsi.h | 1 - drivers/net/ipa/gsi_reg.h | 10 ----- drivers/net/ipa/ipa_endpoint.c | 38 +++++++++---------- drivers/net/ipa/ipa_reg.h | 22 +++++++---- 5 files changed, 73 insertions(+), 67 deletions(-) -- 2.20.1