• Johan Hedberg's avatar
    Bluetooth: Fix sparse warning in amp.c · 252670c4
    Johan Hedberg authored
    This fixes the following sparse warning:
    
    net/bluetooth/amp.c:152:53: warning: Variable length array is used.
    
    The warning itself is probably harmless since this kind of usage of
    shash_desc is present also in other places in the kernel (there's even a
    convenience macro SHASH_DESC_ON_STACK available for defining such stack
    variables). However, dynamically allocated versions are also used in
    several places of the kernel (e.g. kernel/kexec.c and lib/digsig.c)
    which have the benefit of not exhibiting the sparse warning.
    
    Since there are no more sparse warnings in the Bluetooth subsystem after
    fixing this one it is now easier to spot whenever new ones might get
    introduced by future patches.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    252670c4
amp.c 11.3 KB