[PATCH net-next 0/8] net: ipa: memory region rework, part 2

Alex Elder posted 8 patches 1 week, 4 days ago
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(-)

[PATCH net-next 0/8] net: ipa: memory region rework, part 2

Posted by Alex Elder 1 week, 4 days ago
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