Skip to content

Commit

Permalink
Warning: remove kernel warning and add warning control
Browse files Browse the repository at this point in the history
Change-Id: Ia59c462474c25b930d1fa4b8f8adad9de03d554d
  • Loading branch information
roan-xu authored and Victor Wan committed Jan 24, 2015
1 parent acdf91f commit 498607f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks
-fno-delete-null-pointer-checks \
-Werror
KBUILD_CFLAGS += -Wno-error=cpp
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS := -D__ASSEMBLY__
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
int error = 0;
struct timer_list timer;
struct dpm_drv_wd_data data;
DECLARE_DPM_WATCHDOG_ON_STACK(wd);
char suspend_abort[MAX_SUSPEND_ABORT_LEN];
DECLARE_DPM_WATCHDOG_ON_STACK(wd);

dpm_wait_for_children(dev, async);

Expand Down
3 changes: 2 additions & 1 deletion drivers/hid/hid-appleir.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int appleir_raw_event(struct hid_device *hid, struct hid_report *report,
return 0;
}

static void appleir_input_configured(struct hid_device *hid,
static int appleir_input_configured(struct hid_device *hid,
struct hid_input *hidinput)
{
struct input_dev *input_dev = hidinput->input;
Expand All @@ -275,6 +275,7 @@ static void appleir_input_configured(struct hid_device *hid,
for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++)
set_bit(appleir->keymap[i], input_dev->keybit);
clear_bit(KEY_RESERVED, input_dev->keybit);
return 0;
}

static int appleir_input_mapping(struct hid_device *hid,
Expand Down
3 changes: 2 additions & 1 deletion drivers/hid/hid-magicmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static int magicmouse_input_mapping(struct hid_device *hdev,
return 0;
}

static void magicmouse_input_configured(struct hid_device *hdev,
static int magicmouse_input_configured(struct hid_device *hdev,
struct hid_input *hi)

{
Expand All @@ -483,6 +483,7 @@ static void magicmouse_input_configured(struct hid_device *hdev,
/* clean msc->input to notify probe() of the failure */
msc->input = NULL;
}
return 0;
}


Expand Down
2 changes: 1 addition & 1 deletion drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,

/* Retrieve command line unless forcing */
if (read_dt_cmdline)
p = of_get_flat_dt_prop(node, "bootargs", &l);
p = (char *)of_get_flat_dt_prop(node, "bootargs", &l);

if (p != NULL && l > 0) {
if (concat_cmdline) {
Expand Down
8 changes: 4 additions & 4 deletions drivers/usb/gadget/android.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static struct android_usb_function ffs_function = {
.bind_config = ffs_function_bind_config,
.attributes = ffs_function_attributes,
};

#if 0
static int functionfs_ready_callback(struct ffs_data *ffs)
{
struct android_dev *dev = _android_dev;
Expand Down Expand Up @@ -361,7 +361,7 @@ static void *functionfs_acquire_dev_callback(const char *dev_name)
static void functionfs_release_dev_callback(struct ffs_data *ffs_data)
{
}

#endif
#define MAX_ACM_INSTANCES 4
struct acm_function_config {
int instances;
Expand Down Expand Up @@ -826,7 +826,7 @@ static int mass_storage_function_bind_config(struct android_usb_function *f,
usb_remove_function(c, config->f_ms[i]);
return ret;
}

#if 0
static void mass_storage_function_unbind_config(struct android_usb_function *f,
struct usb_configuration *c)
{
Expand All @@ -836,7 +836,7 @@ static void mass_storage_function_unbind_config(struct android_usb_function *f,
for (i = 0; i < config->instances_on; i++)
usb_remove_function(c, config->f_ms[i]);
}

#endif
static ssize_t mass_storage_inquiry_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
Expand Down

0 comments on commit 498607f

Please sign in to comment.