Commit 5b8b2262 authored by Alex Elder's avatar Alex Elder Committed by Jakub Kicinski

net: ipa: don't break build on large transaction size

The following call in ipa_validate_build() is erroneous:

    BUILD_BUG_ON(sizeof(struct gsi_trans) > 128);

The fact is, it is not a bug for the size of a GSI transaction to be
bigger than 128 bytes.  The correct operation of the driver is not
dependent on the size of this structure.  The only consequence of
the transaction being large is that the amount of memory required
is larger.

The problem this was trying to flag is that a *slight* increase in
the size of this structure will have a disproportionate effect on
the amount of memory used.  E.g. if the structure grew to 132 bytes
the memory requirement for the transaction arrays would be about
double.

With various debugging build flags enabled, the size grows to 160
bytes.  But there's no reason to treat that as a build-time bug.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 70408949
...@@ -680,9 +680,6 @@ static void ipa_validate_build(void) ...@@ -680,9 +680,6 @@ static void ipa_validate_build(void)
*/ */
BUILD_BUG_ON(GSI_TLV_MAX > U8_MAX); BUILD_BUG_ON(GSI_TLV_MAX > U8_MAX);
/* Exceeding 128 bytes makes the transaction pool *much* larger */
BUILD_BUG_ON(sizeof(struct gsi_trans) > 128);
/* This is used as a divisor */ /* This is used as a divisor */
BUILD_BUG_ON(!IPA_AGGR_GRANULARITY); BUILD_BUG_ON(!IPA_AGGR_GRANULARITY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment