]> Pileus Git - ~andy/linux/commitdiff
libata-transport.c: local functions should not be exposed globally
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 17 Apr 2012 01:04:41 +0000 (18:04 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 25 Jul 2012 19:14:55 +0000 (15:14 -0400)
Functions not referenced outside of a source file should be marked
static to prevent it from being exposed globally.

This quiets the sparse warnings:

warning: symbol 'ata_is_port' was not declared. Should it be static?
warning: symbol 'ata_is_link' was not declared. Should it be static?
warning: symbol 'ata_is_ata_dev' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-transport.c

index c341904853770f7dad45e5cc4e1180f76111e322..c04d393d20c119d970d80d1b73e0e0e628b0f761 100644 (file)
@@ -232,7 +232,7 @@ static void ata_tport_release(struct device *dev)
  * Returns:
  *     %1 if the device represents a ATA Port, %0 else
  */
-int ata_is_port(const struct device *dev)
+static int ata_is_port(const struct device *dev)
 {
        return dev->release == ata_tport_release;
 }
@@ -355,7 +355,7 @@ static void ata_tlink_release(struct device *dev)
  * Returns:
  *     %1 if the device represents a ATA link, %0 else
  */
-int ata_is_link(const struct device *dev)
+static int ata_is_link(const struct device *dev)
 {
        return dev->release == ata_tlink_release;
 }
@@ -572,7 +572,7 @@ static void ata_tdev_release(struct device *dev)
  * Returns:
  *     %1 if the device represents a ATA device, %0 else
  */
-int ata_is_ata_dev(const struct device *dev)
+static int ata_is_ata_dev(const struct device *dev)
 {
        return dev->release == ata_tdev_release;
 }