From f69aced6b871f413ac630958c8d154435d2e2066 Mon Sep 17 00:00:00 2001 From: Shashank Reddy Vulupala Date: Fri, 21 Jun 2024 17:09:17 +0530 Subject: [PATCH] icnss2: Update ccflags in Makefile Add -Wmissing-prototypes ccflag for platform driver. Change-Id: Ia375eae383fa64d0f477f3a1e2c4444ff2884ef7 CRs-Fixed: 3844455 --- cnss2/Makefile | 2 ++ cnss2/genl.c | 3 ++- cnss2/main.c | 8 ++++---- cnss2/qmi.c | 8 ++++---- cnss_genl/Makefile | 2 ++ cnss_prealloc/Makefile | 2 ++ cnss_prealloc/cnss_prealloc.c | 4 ++-- cnss_utils/Makefile | 2 ++ cnss_utils/cnss_plat_ipc_qmi.c | 10 +++++----- icnss2/Makefile | 2 ++ icnss2/genl.c | 2 ++ icnss2/main.c | 20 ++++++++++---------- icnss2/power.c | 4 ++-- icnss2/qmi.c | 8 ++++---- 14 files changed, 45 insertions(+), 32 deletions(-) diff --git a/cnss2/Makefile b/cnss2/Makefile index 045d0e6235..a47c60b9b5 100644 --- a/cnss2/Makefile +++ b/cnss2/Makefile @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only +ccflags-y += -Wmissing-prototypes + ifeq ($(CONFIG_CNSS_OUT_OF_TREE),y) ccflags-y += -I$(WLAN_PLATFORM_ROOT)/cnss_utils ccflags-y += -I$(WLAN_PLATFORM_ROOT)/inc diff --git a/cnss2/genl.c b/cnss2/genl.c index bb4369af93..030708533d 100644 --- a/cnss2/genl.c +++ b/cnss2/genl.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #define pr_fmt(fmt) "cnss_genl: " fmt @@ -14,6 +14,7 @@ #include "main.h" #include "debug.h" +#include "genl.h" #define CNSS_GENL_FAMILY_NAME "cnss-genl" #define CNSS_GENL_MCAST_GROUP_NAME "cnss-genl-grp" diff --git a/cnss2/main.c b/cnss2/main.c index 361c967c4b..345e6c9272 100644 --- a/cnss2/main.c +++ b/cnss2/main.c @@ -3300,8 +3300,8 @@ static void init_elf_identification(struct elf32_hdr *ehdr, unsigned char class) ehdr->e_ident[EI_OSABI] = ELFOSABI_NONE; } -int cnss_qcom_elf_dump(struct list_head *segs, struct device *dev, - unsigned char class) +static int cnss_qcom_elf_dump(struct list_head *segs, struct device *dev, + unsigned char class) { struct cnss_qcom_dump_segment *segment; void *phdr, *ehdr; @@ -4230,7 +4230,7 @@ static int cnss_register_bus_scale(struct cnss_plat_data *plat_priv) static void cnss_unregister_bus_scale(struct cnss_plat_data *plat_priv) {} #endif /* CONFIG_INTERCONNECT */ -void cnss_daemon_connection_update_cb(void *cb_ctx, bool status) +static void cnss_daemon_connection_update_cb(void *cb_ctx, bool status) { struct cnss_plat_data *plat_priv = cb_ctx; @@ -4347,7 +4347,7 @@ static ssize_t time_sync_period_show(struct device *dev, * * Result: return minimum time sync period present in vote from wlan and sys */ -uint32_t cnss_get_min_time_sync_period_by_vote(struct cnss_plat_data *plat_priv) +static uint32_t cnss_get_min_time_sync_period_by_vote(struct cnss_plat_data *plat_priv) { unsigned int i, min_time_sync_period = CNSS_TIME_SYNC_PERIOD_INVALID; unsigned int time_sync_period; diff --git a/cnss2/qmi.c b/cnss2/qmi.c index 1a43ea7916..d25e59414c 100644 --- a/cnss2/qmi.c +++ b/cnss2/qmi.c @@ -1429,9 +1429,9 @@ end: return ret; } -void cnss_get_qdss_cfg_filename(struct cnss_plat_data *plat_priv, - char *filename, u32 filename_len, - bool fallback_file) +static void cnss_get_qdss_cfg_filename(struct cnss_plat_data *plat_priv, + char *filename, u32 filename_len, + bool fallback_file) { char filename_tmp[MAX_FIRMWARE_NAME_LEN]; char *build_str = QDSS_FILE_BUILD_STR; @@ -3957,7 +3957,7 @@ void cnss_unregister_coex_service(struct cnss_plat_data *plat_priv) } /* IMS Service */ -int ims_subscribe_for_indication_send_async(struct cnss_plat_data *plat_priv) +static int ims_subscribe_for_indication_send_async(struct cnss_plat_data *plat_priv) { int ret; struct ims_private_service_subscribe_for_indications_req_msg_v01 *req; diff --git a/cnss_genl/Makefile b/cnss_genl/Makefile index 84d964a0a9..4dc3700d82 100644 --- a/cnss_genl/Makefile +++ b/cnss_genl/Makefile @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only +ccflags-y += -Wmissing-prototypes + ifeq ($(CONFIG_CNSS_OUT_OF_TREE),y) ccflags-y += -I$(WLAN_PLATFORM_ROOT)/inc endif diff --git a/cnss_prealloc/Makefile b/cnss_prealloc/Makefile index 963f147e7f..2bfc825e41 100644 --- a/cnss_prealloc/Makefile +++ b/cnss_prealloc/Makefile @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only +ccflags-y += -Wmissing-prototypes + ifeq ($(CONFIG_CNSS_OUT_OF_TREE),y) ccflags-y += -I$(WLAN_PLATFORM_ROOT)/inc ccflags-y += -I$(WLAN_PLATFORM_ROOT)/cnss_utils diff --git a/cnss_prealloc/cnss_prealloc.c b/cnss_prealloc/cnss_prealloc.c index b0bfeeed65..b1d8b31dc3 100644 --- a/cnss_prealloc/cnss_prealloc.c +++ b/cnss_prealloc/cnss_prealloc.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012,2014-2017,2019-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -182,7 +182,7 @@ static void cnss_pool_deinit(void) } } -void cnss_assign_prealloc_pool(unsigned long device_id) +static void cnss_assign_prealloc_pool(unsigned long device_id) { pr_info("cnss_prealloc: assign cnss pool for device id 0x%lx", device_id); diff --git a/cnss_utils/Makefile b/cnss_utils/Makefile index c17fbead65..72a3e5be6b 100644 --- a/cnss_utils/Makefile +++ b/cnss_utils/Makefile @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only +ccflags-y += -Wmissing-prototypes + ifeq ($(CONFIG_CNSS_OUT_OF_TREE),y) ccflags-y += -I$(WLAN_PLATFORM_ROOT)/inc endif diff --git a/cnss_utils/cnss_plat_ipc_qmi.c b/cnss_utils/cnss_plat_ipc_qmi.c index ffa55db4f8..1e1e927b16 100644 --- a/cnss_utils/cnss_plat_ipc_qmi.c +++ b/cnss_utils/cnss_plat_ipc_qmi.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021, 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include @@ -108,8 +108,8 @@ static void cnss_plat_ipc_logging_deinit(void) } } -void cnss_plat_ipc_debug_log_print(void *log_ctx, char *process, const char *fn, - const char *log_level, char *fmt, ...) +static void cnss_plat_ipc_debug_log_print(void *log_ctx, char *process, const char *fn, + const char *log_level, char *fmt, ...) { struct va_format vaf; va_list va_args; @@ -132,8 +132,8 @@ void cnss_plat_ipc_debug_log_print(void *log_ctx, char *process, const char *fn, static void cnss_plat_ipc_logging_init(void) {}; static void cnss_plat_ipc_logging_deinit(void) {}; -void cnss_plat_ipc_debug_log_print(void *log_ctx, char *process, const char *fn, - const char *log_level, char *fmt, ...) +static void cnss_plat_ipc_debug_log_print(void *log_ctx, char *process, const char *fn, + const char *log_level, char *fmt, ...) { struct va_format vaf; va_list va_args; diff --git a/icnss2/Makefile b/icnss2/Makefile index bc4c293c77..4ef5aca743 100644 --- a/icnss2/Makefile +++ b/icnss2/Makefile @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only +ccflags-y += -Wmissing-prototypes + ifeq ($(CONFIG_CNSS_OUT_OF_TREE),y) ccflags-y += -I$(WLAN_PLATFORM_ROOT)/cnss_utils ccflags-y += -I$(WLAN_PLATFORM_ROOT)/inc diff --git a/icnss2/genl.c b/icnss2/genl.c index 556a298a61..407b127e1f 100644 --- a/icnss2/genl.c +++ b/icnss2/genl.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2020, The Linux Foundation. All rights reserved. */ +/* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #define pr_fmt(fmt) "cnss_genl: " fmt @@ -11,6 +12,7 @@ #include "main.h" #include "debug.h" +#include "genl.h" #define ICNSS_GENL_FAMILY_NAME "cnss-genl" #define ICNSS_GENL_MCAST_GROUP_NAME "cnss-genl-grp" diff --git a/icnss2/main.c b/icnss2/main.c index 81737b026f..1f82a06250 100644 --- a/icnss2/main.c +++ b/icnss2/main.c @@ -1309,7 +1309,7 @@ static int icnss_driver_event_fw_init_done(struct icnss_priv *priv, void *data) return ret; } -int icnss_alloc_qdss_mem(struct icnss_priv *priv) +static int icnss_alloc_qdss_mem(struct icnss_priv *priv) { struct platform_device *pdev = priv->pdev; struct icnss_fw_mem *qdss_mem = priv->qdss_mem; @@ -1642,8 +1642,8 @@ static int icnss_fw_crashed(struct icnss_priv *priv, return 0; } -int icnss_update_hang_event_data(struct icnss_priv *priv, - struct icnss_uevent_hang_data *hang_data) +static int icnss_update_hang_event_data(struct icnss_priv *priv, + struct icnss_uevent_hang_data *hang_data) { if (!priv->hang_event_data_va) return -EINVAL; @@ -1661,7 +1661,7 @@ int icnss_update_hang_event_data(struct icnss_priv *priv, return 0; } -int icnss_send_hang_event_data(struct icnss_priv *priv) +static int icnss_send_hang_event_data(struct icnss_priv *priv) { struct icnss_uevent_hang_data hang_data = {0}; int ret = 0xFF; @@ -2745,7 +2745,7 @@ fail_alloc_major: return ret; } -void *icnss_create_ramdump_device(struct icnss_priv *priv, const char *dev_name) +static void *icnss_create_ramdump_device(struct icnss_priv *priv, const char *dev_name) { int ret = 0; struct icnss_ramdump_info *ramdump_info; @@ -3759,14 +3759,14 @@ struct iommu_domain *icnss_smmu_get_domain(struct device *dev) EXPORT_SYMBOL(icnss_smmu_get_domain); #if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)) -int icnss_iommu_map(struct iommu_domain *domain, - unsigned long iova, phys_addr_t paddr, size_t size, int prot) +static int icnss_iommu_map(struct iommu_domain *domain, + unsigned long iova, phys_addr_t paddr, size_t size, int prot) { return iommu_map(domain, iova, paddr, size, prot); } #else -int icnss_iommu_map(struct iommu_domain *domain, - unsigned long iova, phys_addr_t paddr, size_t size, int prot) +static int icnss_iommu_map(struct iommu_domain *domain, + unsigned long iova, phys_addr_t paddr, size_t size, int prot) { return iommu_map(domain, iova, paddr, size, prot, GFP_KERNEL); } @@ -4927,7 +4927,7 @@ out_reset_drvdata: return ret; } -void icnss_destroy_ramdump_device(struct icnss_ramdump_info *ramdump_info) +static void icnss_destroy_ramdump_device(struct icnss_ramdump_info *ramdump_info) { if (IS_ERR_OR_NULL(ramdump_info)) diff --git a/icnss2/power.c b/icnss2/power.c index ac7a347123..04c17271ad 100644 --- a/icnss2/power.c +++ b/icnss2/power.c @@ -436,8 +436,8 @@ int icnss_vreg_unvote(struct icnss_priv *priv) return 0; } -int icnss_get_clk_single(struct icnss_priv *priv, - struct icnss_clk_info *clk_info) +static int icnss_get_clk_single(struct icnss_priv *priv, + struct icnss_clk_info *clk_info) { struct device *dev = &priv->pdev->dev; struct clk *clk; diff --git a/icnss2/qmi.c b/icnss2/qmi.c index 139ff0f28c..e50cb94ff6 100644 --- a/icnss2/qmi.c +++ b/icnss2/qmi.c @@ -1656,8 +1656,8 @@ int wlfw_qdss_trace_stop(struct icnss_priv *priv, unsigned long long option) option); } -int wlfw_wlan_cfg_send_sync_msg(struct icnss_priv *priv, - struct wlfw_wlan_cfg_req_msg_v01 *data) +static int wlfw_wlan_cfg_send_sync_msg(struct icnss_priv *priv, + struct wlfw_wlan_cfg_req_msg_v01 *data) { int ret; struct wlfw_wlan_cfg_req_msg_v01 *req; @@ -2156,7 +2156,7 @@ out: return ret; } -void icnss_handle_rejuvenate(struct icnss_priv *priv) +static void icnss_handle_rejuvenate(struct icnss_priv *priv) { struct icnss_event_pd_service_down_data *event_data; struct icnss_uevent_fw_down_data fw_down_data = {0}; @@ -3802,7 +3802,7 @@ out: } /* IMS Service */ -int ims_subscribe_for_indication_send_async(struct icnss_priv *priv) +static int ims_subscribe_for_indication_send_async(struct icnss_priv *priv) { int ret; struct ims_private_service_subscribe_for_indications_req_msg_v01 *req;