From a5b7d7b3f0d8ad440a5e980d1b673dd3506bf680 Mon Sep 17 00:00:00 2001 From: Carl Poirier Date: Thu, 28 Dec 2017 13:23:47 -0500 Subject: [PATCH 1/2] Compile fixes --- drivers/input/touchscreen/cyttsp4/Makefile | 34 +++++++++++----------- kernel/timeconst.pl | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/input/touchscreen/cyttsp4/Makefile b/drivers/input/touchscreen/cyttsp4/Makefile index a2c6531c..13062acb 100644 --- a/drivers/input/touchscreen/cyttsp4/Makefile +++ b/drivers/input/touchscreen/cyttsp4/Makefile @@ -47,20 +47,20 @@ CFLAGS_cyttsp4_debug.o += $(CY_CFLAG_ADD) CFLAGS_cyttsp4_devtree.o += $(CY_CFLAG_ADD) -DDEBUG CFLAGS_cyttsp4_platform.o += $(CY_CFLAG_ADD) -DDEBUG -CFLAGS_cyttsp4_core.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_i2c.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_spi.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_mta.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_mtb.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_mt_a.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_mt_b.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_mt_common.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_btn.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_proximity.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_samsung_sysfs.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_device_access.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_test_device_access_api.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_loader.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_debug.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_devtree.o -= $(CY_CFLAG_REMOVE) -CFLAGS_cyttsp4_platform.o -= $(CY_CFLAG_REMOVE) \ No newline at end of file +CFLAGS_cyttsp4_core.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_core.o)) +CFLAGS_cyttsp4_i2c.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_i2c.o)) +CFLAGS_cyttsp4_spi.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_spi.o)) +CFLAGS_cyttsp4_mta.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_mta.o)) +CFLAGS_cyttsp4_mtb.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_mtb.o)) +CFLAGS_cyttsp4_mt_a.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_mt_a.o)) +CFLAGS_cyttsp4_mt_b.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_mt_b.o)) +CFLAGS_cyttsp4_mt_common.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_mt_common.o)) +CFLAGS_cyttsp4_btn.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_btn.o)) +CFLAGS_cyttsp4_proximity.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_proximity.o)) +CFLAGS_cyttsp4_samsung_sysfs.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_samsung_sysfs.o)) +CFLAGS_cyttsp4_device_access.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_device_access.o)) +CFLAGS_cyttsp4_test_device_access_api.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_test_device_access_api.o)) +CFLAGS_cyttsp4_loader.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_loader.o)) +CFLAGS_cyttsp4_debug.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_debug.o)) +CFLAGS_cyttsp4_devtree.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_devtree.o)) +CFLAGS_cyttsp4_platform.o := $(filter-out $(CY_CFLAG_REMOVE),$(CFLAGS_cyttsp4_platform.o)) diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl index eb51d76e..04612394 100644 --- a/kernel/timeconst.pl +++ b/kernel/timeconst.pl @@ -370,7 +370,7 @@ (@) } @val = @{$canned_values{$hz}}; - if (!defined(@val)) { + if (!@val) { @val = compute_values($hz); } output($hz, @val); From df5a284a0a0898a10483058b96389c09f329e062 Mon Sep 17 00:00:00 2001 From: Carl Poirier Date: Thu, 28 Dec 2017 15:11:02 -0500 Subject: [PATCH 2/2] Compile fixes --- arch/arm/mach-msm/bam_dmux.c | 2 +- drivers/misc/sec_misc.c | 12 ++++++------ drivers/misc/sec_param.c | 4 ++-- net/bluetooth/hci_conn.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-msm/bam_dmux.c b/arch/arm/mach-msm/bam_dmux.c index 2622d021..c331c850 100644 --- a/arch/arm/mach-msm/bam_dmux.c +++ b/arch/arm/mach-msm/bam_dmux.c @@ -2498,7 +2498,7 @@ static ssize_t show_waketime(struct device *dev, if (!bamDmux_pkt_dev) return 0; - return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout); + return snprintf(buf, sizeof(*buf), "%u\n", wakelock_timeout); } static ssize_t store_waketime(struct device *dev, diff --git a/drivers/misc/sec_misc.c b/drivers/misc/sec_misc.c index 1099aea5..35206993 100755 --- a/drivers/misc/sec_misc.c +++ b/drivers/misc/sec_misc.c @@ -63,7 +63,7 @@ static struct miscdevice sec_misc_device = { static ssize_t emmc_checksum_done_show(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, sizeof(buf), "%d\n", emmc_checksum_done); + return snprintf(buf, sizeof(*buf), "%d\n", emmc_checksum_done); } static ssize_t emmc_checksum_done_store(struct device *dev, @@ -84,7 +84,7 @@ static DEVICE_ATTR(emmc_checksum_done, S_IRUGO | S_IWUSR , static ssize_t emmc_checksum_pass_show(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, sizeof(buf), "%d\n", emmc_checksum_pass); + return snprintf(buf, sizeof(*buf), "%d\n", emmc_checksum_pass); } static ssize_t emmc_checksum_pass_store(struct device *dev, @@ -112,7 +112,7 @@ static ssize_t rory_control_show(struct device *dev, sec_get_param(param_rory_control, &rory_control); - return snprintf(buf, sizeof(buf), "%d\n", rory_control); + return snprintf(buf, sizeof(*buf), "%d\n", rory_control); } static ssize_t rory_control_store(struct device *dev, @@ -201,7 +201,7 @@ static ssize_t slideCount_show sec_get_param(param_slideCount, &slideCount); - return snprintf(buf, sizeof(buf), "%d\n", slideCount); + return snprintf(buf, sizeof(*buf), "%d\n", slideCount); } static ssize_t slideCount_store @@ -235,7 +235,7 @@ static ssize_t drop_caches_show (struct device *dev, struct device_attribute *attr, char *buf) { int ret = 0; - return snprintf(buf, sizeof(buf), "%d\n", ret); + return snprintf(buf, sizeof(*buf), "%d\n", ret); } static ssize_t drop_caches_store @@ -283,7 +283,7 @@ static ssize_t update_cp_bin_show sec_get_param(param_update_cp_bin, (void *)&update); - return snprintf(buf, sizeof(buf), "%d\n", update); + return snprintf(buf, sizeof(*buf), "%d\n", update); } static ssize_t update_cp_bin_store diff --git a/drivers/misc/sec_param.c b/drivers/misc/sec_param.c index e9200618..9116bcfd 100755 --- a/drivers/misc/sec_param.c +++ b/drivers/misc/sec_param.c @@ -247,7 +247,7 @@ static ssize_t movinand_checksum_done_show pr_err("checksum is not in valuable range.\n"); ret = 1; } - return snprintf(buf, sizeof(buf), "%u\n", ret); + return snprintf(buf, sizeof(*buf), "%u\n", ret); } static DEVICE_ATTR(movinand_checksum_done, 0664, movinand_checksum_done_show, NULL); @@ -262,7 +262,7 @@ static ssize_t movinand_checksum_pass_show pr_err("checksum is not in valuable range.\n"); ret = 1; } - return snprintf(buf, sizeof(buf), "%u\n", ret); + return snprintf(buf, sizeof(*buf), "%u\n", ret); } static DEVICE_ATTR(movinand_checksum_pass, 0664, movinand_checksum_pass_show, NULL); diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 9ffd0f1a..d7356b65 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -404,7 +404,7 @@ void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]) memset(&cp, 0, sizeof(cp)); cp.handle = cpu_to_le16(conn->handle); - memcpy(cp.ltk, ltk, sizeof(ltk)); + memcpy(cp.ltk, ltk, sizeof(cp.ltk)); hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp); }