Skip to contentSkip to conversation

NFC: netlink.c: local variables should not be exposed globally

PATCH New H Hartley Sweeten 1 participant 1 message Apr 26, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFC: netlink.c: local variables 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?

Cc Lauro Ramos Venancio <[email protected]>
Cc Aloisio Almeida Jr <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc "David S. Miller" <[email protected]>

---

net/nfc/netlink.c +1 -1
index f1829f6..850485d 100644
@@ -33,7 +33,7 @@ static struct genl_multicast_group nfc_genl_event_mcgrp = {
 	.name = NFC_GENL_MCAST_EVENT_NAME,
 };
 
-struct genl_family nfc_genl_family = {
+static struct genl_family nfc_genl_family = {
 	.id = GENL_ID_GENERATE,
 	.hdrsize = 0,
 	.name = NFC_GENL_NAME,