aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2015-04-16 18:11:20 +0530
committerAmit Pundir <amit.pundir@linaro.org>2015-04-17 00:17:29 +0530
commit401b999aa32ba52f4f074bafc3220fc25fb99ef2 (patch)
tree3bebad6b29279671e6ac1d2a03958b8b36f17b33 /drivers
parent0861171c6cfc2b1c1369c08a23aa7db8dccfacb2 (diff)
downloadlinux-linaro-stable-401b999aa32ba52f4f074bafc3220fc25fb99ef2.tar.gz
android: misc: fix unused function and variable warnings
Use __maybe_unused to fix various [-Wunused-function] and [-Wunused-variable] warnings during compile time. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpuidle/governors/menu.c2
-rw-r--r--drivers/usb/gadget/android.c10
-rw-r--r--drivers/usb/gadget/f_fs.c2
-rw-r--r--drivers/usb/gadget/f_mtp.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index 954a30e58f32..ab9ee505b872 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -135,7 +135,7 @@ struct menu_device {
#define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
-static int get_loadavg(void)
+static int __maybe_unused get_loadavg(void)
{
unsigned long this = this_cpu_load();
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index a1398df9e482..21fce5d43da5 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -315,7 +315,7 @@ static struct android_usb_function ffs_function = {
.attributes = ffs_function_attributes,
};
-static int functionfs_ready_callback(struct ffs_data *ffs)
+static int __maybe_unused functionfs_ready_callback(struct ffs_data *ffs)
{
struct android_dev *dev = _android_dev;
struct functionfs_config *config = ffs_function.config;
@@ -338,7 +338,7 @@ err:
return ret;
}
-static void functionfs_closed_callback(struct ffs_data *ffs)
+static void __maybe_unused functionfs_closed_callback(struct ffs_data *ffs)
{
struct android_dev *dev = _android_dev;
struct functionfs_config *config = ffs_function.config;
@@ -356,12 +356,12 @@ static void functionfs_closed_callback(struct ffs_data *ffs)
mutex_unlock(&dev->mutex);
}
-static void *functionfs_acquire_dev_callback(const char *dev_name)
+static void __maybe_unused *functionfs_acquire_dev_callback(const char *dev_name)
{
return 0;
}
-static void functionfs_release_dev_callback(struct ffs_data *ffs_data)
+static void __maybe_unused functionfs_release_dev_callback(struct ffs_data *ffs_data)
{
}
@@ -830,7 +830,7 @@ err_usb_add_function:
return ret;
}
-static void mass_storage_function_unbind_config(struct android_usb_function *f,
+static void __maybe_unused mass_storage_function_unbind_config(struct android_usb_function *f,
struct usb_configuration *c)
{
int i;
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index ebbae4667b11..8e75dcaaa9e6 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -1305,7 +1305,7 @@ static void ffs_epfiles_destroy(struct ffs_epfile *epfiles, unsigned count)
}
-static int functionfs_bind_config(struct usb_composite_dev *cdev,
+static int __maybe_unused functionfs_bind_config(struct usb_composite_dev *cdev,
struct usb_configuration *c,
struct ffs_data *ffs)
{
diff --git a/drivers/usb/gadget/f_mtp.c b/drivers/usb/gadget/f_mtp.c
index 82f6b2ebaebb..d260d071ab9e 100644
--- a/drivers/usb/gadget/f_mtp.c
+++ b/drivers/usb/gadget/f_mtp.c
@@ -1216,7 +1216,7 @@ static void mtp_function_disable(struct usb_function *f)
VDBG(cdev, "%s disabled\n", dev->function.name);
}
-static int mtp_bind_config(struct usb_configuration *c, bool ptp_config)
+static int __maybe_unused mtp_bind_config(struct usb_configuration *c, bool ptp_config)
{
struct mtp_dev *dev = _mtp_dev;
int ret = 0;
@@ -1297,7 +1297,7 @@ err1:
return ret;
}
-static int mtp_setup(void)
+static int __maybe_unused mtp_setup(void)
{
return __mtp_setup(NULL);
}