Bluetooth: Fix sparse warning in amp.c
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 10 Nov 2014 13:53:45 +0000 (15:53 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 10 Nov 2014 23:07:29 +0000 (00:07 +0100)
commit252670c421c785127cb55db03c48df5feb57ce12
tree6f00bac494584482810edd02d18cc29ec2b8ab30
parentf7cb96f105fb406e8db5e68e0cdd5067e2556d34
Bluetooth: Fix sparse warning in amp.c

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: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/amp.c