Message ID | 20170130163042.27482-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 2017年01月31日 00:30, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > mtd_present and mtd_dev_query are currently in global scope and don't > need to be. Make them static. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/opal/mtd_info.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/opal/mtd_info.c b/src/opal/mtd_info.c > index 134defa..6e20c81 100644 > --- a/src/opal/mtd_info.c > +++ b/src/opal/mtd_info.c > @@ -36,12 +36,12 @@ > #define FDT_FLASH_PATH "/proc/device-tree/chosen/ibm,system-flash" > #define SYSFS_MTD_PATH "/sys/class/mtd" > > -bool mtd_present(int fwts_mtd_flags, char *mtd_devnode) > +static bool mtd_present(int fwts_mtd_flags, char *mtd_devnode) > { > return !access(mtd_devnode, fwts_mtd_flags); > } > > -int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { > +static int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { > > /* snippet from skiboot libflash/ffs.h */ > struct ffs_hdr { > @@ -90,7 +90,7 @@ int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { > return FWTS_OK; > } > > -int mtd_dev_query(fwts_framework *fw, char *mtd_devnode) > +static int mtd_dev_query(fwts_framework *fw, char *mtd_devnode) > { > > #ifdef HAVE_MTD_MTD_ABI_H > Acked-by: Ivan Hu <ivan.hu@canonical.com>
On 2017-01-31 12:30 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > mtd_present and mtd_dev_query are currently in global scope and don't > need to be. Make them static. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/opal/mtd_info.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/opal/mtd_info.c b/src/opal/mtd_info.c > index 134defa..6e20c81 100644 > --- a/src/opal/mtd_info.c > +++ b/src/opal/mtd_info.c > @@ -36,12 +36,12 @@ > #define FDT_FLASH_PATH "/proc/device-tree/chosen/ibm,system-flash" > #define SYSFS_MTD_PATH "/sys/class/mtd" > > -bool mtd_present(int fwts_mtd_flags, char *mtd_devnode) > +static bool mtd_present(int fwts_mtd_flags, char *mtd_devnode) > { > return !access(mtd_devnode, fwts_mtd_flags); > } > > -int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { > +static int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { > > /* snippet from skiboot libflash/ffs.h */ > struct ffs_hdr { > @@ -90,7 +90,7 @@ int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { > return FWTS_OK; > } > > -int mtd_dev_query(fwts_framework *fw, char *mtd_devnode) > +static int mtd_dev_query(fwts_framework *fw, char *mtd_devnode) > { > > #ifdef HAVE_MTD_MTD_ABI_H > Acked-by: Alex Hung <alex.hung@canonical.com>
diff --git a/src/opal/mtd_info.c b/src/opal/mtd_info.c index 134defa..6e20c81 100644 --- a/src/opal/mtd_info.c +++ b/src/opal/mtd_info.c @@ -36,12 +36,12 @@ #define FDT_FLASH_PATH "/proc/device-tree/chosen/ibm,system-flash" #define SYSFS_MTD_PATH "/sys/class/mtd" -bool mtd_present(int fwts_mtd_flags, char *mtd_devnode) +static bool mtd_present(int fwts_mtd_flags, char *mtd_devnode) { return !access(mtd_devnode, fwts_mtd_flags); } -int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { +static int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { /* snippet from skiboot libflash/ffs.h */ struct ffs_hdr { @@ -90,7 +90,7 @@ int mtd_hdr_query(fwts_framework *fw, char *mtd_devnode) { return FWTS_OK; } -int mtd_dev_query(fwts_framework *fw, char *mtd_devnode) +static int mtd_dev_query(fwts_framework *fw, char *mtd_devnode) { #ifdef HAVE_MTD_MTD_ABI_H