From patchwork Thu Sep 22 22:20:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 12985888 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95155ECAAD8 for ; Thu, 22 Sep 2022 22:21:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231207AbiIVWVJ (ORCPT ); Thu, 22 Sep 2022 18:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiIVWVH (ORCPT ); Thu, 22 Sep 2022 18:21:07 -0400 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 698F110CA43 for ; Thu, 22 Sep 2022 15:21:04 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id a4so3420868ilj.8 for ; Thu, 22 Sep 2022 15:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=2pOEJWOoYFOGpdqE1FgVQVl0AeDp60SOokXdUjzLK5M=; b=YXgZ9ShoeRNkSG2dEDTn9RgAHowJ+8AA2Y7PSvCzOD1Z7vYW8o40422/lQqQBSt6D2 6hGmiDFoOC5Qcn31+1Qx19uifYzH4XUeLgRCSqXnim1YmdjJpqM7/9othl9kDanft1Qx RLYZ3qKO/5oJRmEtPqOGZfMCmWrUU8snV4owkD8HOUT8Pnmy6tm3LgTjPOyoM1RLB3CP g8dwLMQOtkpNPg6f3CneIzg/jMcH8LNBVjwAZ1ibsVlX8p2QsTca0QNWM4WP47gErIvo dhnlflsSmlIq3hhZP4t6/uJDRInItOk8wtlXXQp3pqLq+edc1knL5sExcmJHAjWM/neo OW3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=2pOEJWOoYFOGpdqE1FgVQVl0AeDp60SOokXdUjzLK5M=; b=Rpn77ZULfRFAfxy4PXd+g8GosBPNqRVBu9YjEpXguKn1mZzpP8RBpHaadcfESxbNdo Z6gznAXwa3iMDzoF13RuhKBuUp9vK9yVphcD4mt6+V1/p/mf2fswgc2892PgMkc5PpPA oHPO/zC3MZsgFvWPbDTnA3SmPNyE5uzzWAlJSd5NLROhsM5iHh315H72GmWbtipCm0tP Bat9s0Nfow+QPGz9/IvPL4k2b7e4U/IL23KdIwcdC67ZxWn5TwuXgMAOqTg4kSI1IX0R zrXMrY0Mq/CGBE0KadnBuWQXnhlFYMJiwHqoMS0JHIRyAmwYVvU2XwXLu1AUW7XhXFP9 VaIg== X-Gm-Message-State: ACrzQf2CLAN1MqbslfzfZrW13ZOSZPM7sE4uinPs9ypZlRffXnaPQe7K m3mKEpA4JxOckfAaBTFgru72xg== X-Google-Smtp-Source: AMsMyM5v5Hq3MgJjw/7okNUee6lOQl+KRgEDW7iYRH0HU81pnnP2WY6s+G7Xmud6/XmLKjSHSr2i4A== X-Received: by 2002:a92:b106:0:b0:2dc:eebb:e6f6 with SMTP id t6-20020a92b106000000b002dceebbe6f6mr2778890ilh.54.1663885263823; Thu, 22 Sep 2022 15:21:03 -0700 (PDT) Received: from localhost.localdomain ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id g12-20020a92d7cc000000b002f592936fbfsm2483332ilq.41.2022.09.22.15.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 15:21:03 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mka@chromium.org, evgreen@chromium.org, andersson@kernel.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 0/8] net: ipa: another set of cleanups Date: Thu, 22 Sep 2022 17:20:52 -0500 Message-Id: <20220922222100.2543621-1-elder@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This series contains another set of cleanups done in preparation for an upcoming series that reworks how IPA registers and their fields are defined. The first replaces the use of u32_replace_bits() with a simple logical AND operation in two places. The second creates a new function to encapsulate some common code, and renames another for consistency. The third restructures two other functions that do similar things to make their similarity more obvious. The fourth defines the flag bits in a register using an enumerated type. And the fifth updates "ipa_reg.h" so the values assigned to enumerated type members are aligned consistently. The last three encapsulate the code that assigns values to a few registers into separate functions. -Alex Alex Elder (8): net: ipa: don't use u32p_replace_bits() net: ipa: introduce ipa_qtime_val() net: ipa: rearrange functions for similarity net: ipa: define BCR values using an enum net: ipa: tidy up register enum definitions net: ipa: encapsulate setting the FILT_ROUT_HASH_EN register net: ipa: encapsulate updating the COUNTER_CFG register net: ipa: encapsulate updating three more registers drivers/net/ipa/data/ipa_data-v3.1.c | 2 +- drivers/net/ipa/data/ipa_data-v3.5.1.c | 10 +- drivers/net/ipa/ipa_endpoint.c | 138 +++++++++++++------------ drivers/net/ipa/ipa_main.c | 135 +++++++++++++++--------- drivers/net/ipa/ipa_reg.h | 68 ++++++------ drivers/net/ipa/ipa_table.c | 4 +- 6 files changed, 200 insertions(+), 157 deletions(-)