]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: determine the maximum endpoint ID
authorAlex Elder <elder@linaro.org>
Thu, 27 Oct 2022 12:26:31 +0000 (07:26 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sat, 29 Oct 2022 05:06:47 +0000 (22:06 -0700)
commit5274c7158b2b6661f43883617ce638200312412b
tree72c934cd0b6c61f7c32c9e38c603d7bc08973bfa
parente359ba89a4aae690fb51d19fc68f23f38435ae39
net: ipa: determine the maximum endpoint ID

Each endpoint ID has an entry in the IPA endpoint array.  But the
size of that array is defined at compile time.  Instead, rename
ipa_endpoint_data_valid() to be ipa_endpoint_max() and have it
return the maximum endpoint ID defined in configuration data.
That function will still validate configuration data.

Zero is returned on error; it's a valid endpoint ID, but we need
more than one, so it can't be the maximum.  The next patch makes use
of the returned maximum value.

Finally, rename the "initialized" mask of endpoints defined by
configuration data to be "defined".

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa.h
drivers/net/ipa/ipa_endpoint.c