Patchwork ata: libata-eh.c: local functions should not be exposed globally

login
register
mail settings
Submitter hartleys
Date April 12, 2012, 10:40 p.m.
Message ID <201204121540.37253.hartleys@visionengravers.com>
Download mbox | patch
Permalink /patch/152196/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

hartleys - April 12, 2012, 10:40 p.m.
The function ata_ering_clear_cb is only referenced in this file and
should be marked static to prevent it from being exposed globally.

This quiets the sparse warning:

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

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Jeff Garzik <jgarzik@pobox.com>

---

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index b02748b..1ae0417 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -419,7 +419,7 @@  int ata_ering_map(struct ata_ering *ering,
 	return rc;
 }
 
-int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
+static int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
 {
 	ent->eflags |= ATA_EFLAG_OLD_ER;
 	return 0;