Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFC: The NFC genl family structure should not be exposed globally

The variable 'nfc_genl_family' is only referenced in this file and
should be marked static to prevent it from being exposed globally.

Quites the sparse warning:

warning: symbol 'nfc_genl_family' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

H Hartley Sweeten and committed by
John W. Linville
e5fe4cf8 bd007bea

+1 -1
+1 -1
net/nfc/netlink.c
··· 33 33 .name = NFC_GENL_MCAST_EVENT_NAME, 34 34 }; 35 35 36 - struct genl_family nfc_genl_family = { 36 + static struct genl_family nfc_genl_family = { 37 37 .id = GENL_ID_GENERATE, 38 38 .hdrsize = 0, 39 39 .name = NFC_GENL_NAME,