linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: bjorn.andersson@linaro.org, evgreen@chromium.org,
	cpratapa@codeaurora.org, subashab@codeaurora.org,
	elder@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next 0/8] net: ipa: memory region rework, part 2
Date: Thu, 10 Jun 2021 14:23:00 -0500	[thread overview]
Message-ID: <20210610192308.2739540-1-elder@linaro.org> (raw)

This is the second portion of a set of patches updating the IPA
memory region code.

In this portion (part 2), the focus is on adjusting the code so that
it no longer assumes the memory region descriptor array is indexed
by the region identifier.  This brings with it some related cleanup.

Three loops are changed so their loop index variable is an unsigned
rather than an enumerated type.

A set of functions is changed so a region identifier (rather than a
memory region descriptor pointer) is passed as argument, to simplify
their call sites.  This isn't entirely related or required, but I
think it improves the code.

A validation function for filter and route table memory regions is
changed to take memory region IDs, rather than determining which
region to validate based on a set of Boolean flags.

Finally, ipa_mem_find() is created to abstract getting a memory
descriptor based on its ID, and it is used everywhere rather than
indexing the array.  With that implemented, all of the memory
regions can be defined by arrays of entries defined without
providing index designators.

					-Alex

Alex Elder (8):
  net: ipa: don't assume mem array indexed by ID
  net: ipa: clean up header memory validation
  net: ipa: pass mem_id to ipa_filter_reset_table()
  net: ipa: pass mem ID to ipa_mem_zero_region_add()
  net: ipa: pass mem_id to ipa_table_reset_add()
  net: ipa: pass memory id to ipa_table_valid_one()
  net: ipa: introduce ipa_mem_find()
  net: ipa: don't index mem data array by ID

 drivers/net/ipa/ipa_cmd.c         |  50 +++++++++-----
 drivers/net/ipa/ipa_data-v3.5.1.c |  30 ++++-----
 drivers/net/ipa/ipa_data-v4.11.c  |  44 ++++++------
 drivers/net/ipa/ipa_data-v4.2.c   |  36 +++++-----
 drivers/net/ipa/ipa_data-v4.5.c   |  46 ++++++-------
 drivers/net/ipa/ipa_data-v4.9.c   |  46 ++++++-------
 drivers/net/ipa/ipa_mem.c         | 108 ++++++++++++++++--------------
 drivers/net/ipa/ipa_mem.h         |   3 +-
 drivers/net/ipa/ipa_qmi.c         |  32 ++++-----
 drivers/net/ipa/ipa_table.c       |  94 ++++++++++----------------
 drivers/net/ipa/ipa_uc.c          |   3 +-
 11 files changed, 247 insertions(+), 245 deletions(-)

-- 
2.27.0


             reply	other threads:[~2021-06-10 19:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 19:23 Alex Elder [this message]
2021-06-10 19:23 ` [PATCH net-next 1/8] net: ipa: don't assume mem array indexed by ID Alex Elder
2021-06-10 19:23 ` [PATCH net-next 2/8] net: ipa: clean up header memory validation Alex Elder
2021-06-10 19:23 ` [PATCH net-next 3/8] net: ipa: pass mem_id to ipa_filter_reset_table() Alex Elder
2021-06-10 19:23 ` [PATCH net-next 4/8] net: ipa: pass mem ID to ipa_mem_zero_region_add() Alex Elder
2021-06-10 19:23 ` [PATCH net-next 5/8] net: ipa: pass mem_id to ipa_table_reset_add() Alex Elder
2021-06-10 19:23 ` [PATCH net-next 6/8] net: ipa: pass memory id to ipa_table_valid_one() Alex Elder
2021-06-10 19:23 ` [PATCH net-next 7/8] net: ipa: introduce ipa_mem_find() Alex Elder
2021-06-10 19:23 ` [PATCH net-next 8/8] net: ipa: don't index mem data array by ID Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210610192308.2739540-1-elder@linaro.org \
    --to=elder@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=elder@kernel.org \
    --cc=evgreen@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).