• Alex Elder's avatar
    net: ipa: don't index mem data array by ID · c61cfb94
    Alex Elder authored
    Finally the code handles the IPA memory region array in the
    configuration data without assuming it is indexed by region ID.
    Get rid of the array index designators where these arrays are
    initialized.  As a result, there's no more need to define an
    explicitly undefined memory region ID, so get rid of that.
    
    Change ipa_mem_find() so it no longer assumes the ipa->mem[] array
    is indexed by memory region ID.  Instead, have it search the array
    for the entry having the requested memory ID, and return the address
    of the descriptor if found.  Otherwise return NULL.
    
    Stop allowing memory regions to be defined with zero size and zero
    canary value.  Check for this condition in ipa_mem_valid_one().
    As a result, it is not necessary to check for this case in
    ipa_mem_config().
    
    Finally, there is no need for IPA_MEM_UNDEFINED to be defined any
    more, so get rid of it.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c61cfb94
ipa_data-v3.5.1.c 9.47 KB