Skip to content

Commit

Permalink
treewide: gcc13: disable/fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arpio23 committed Jun 1, 2024
1 parent 5ed9cea commit 7852285
Show file tree
Hide file tree
Showing 56 changed files with 120 additions and 102 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,11 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror=implicit-function-declaration -Werror=implicit-int \
-Werror=return-type -Wno-format-security \
-Werror=return-type -Wno-format-security -Wno-nonnull -Wno-format \
-Wno-unused-variable -Wno-unused-function -Wno-enum-int-mismatch \
-Wno-sequence-point -Wno-missing-braces -Wno-parentheses -Wno-address \
-Wno-memset-elt-size -Wno-switch-unreachable -Wno-enum-compare \
-Wno-array-parameter \
-std=gnu89
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/gunyah/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ int gh_arch_validate_vm_exited_notif(size_t payload_size,
case GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET2:
if (payload_size !=
sizeof(*vm_exited_payload) + sizeof(struct gh_vm_exit_reason_psci_sys_reset2)) {
pr_err("%s: Invalid size for type PSCI_SYSTEM_RESET2: %u\n",
pr_err("%s: Invalid size for type PSCI_SYSTEM_RESET2: %lu\n",
__func__, payload_size);
return -EINVAL;
}
vm_exited_payload->exit_type = GH_RM_VM_EXIT_TYPE_SYSTEM_RESET;
fallthrough;
case GH_RM_VM_EXIT_TYPE_PSCI_SYSTEM_RESET:
vm_exited_payload->exit_type = GH_RM_VM_EXIT_TYPE_SYSTEM_RESET;
break;
Expand Down
6 changes: 3 additions & 3 deletions debian/kernel-info.mk
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ BUILD_TRIPLET = aarch64-linux-gnu-
BUILD_CLANG_TRIPLET = aarch64-linux-gnu-

# The compiler to use. Recent Android kernels are built with clang.
BUILD_CC = clang
BUILD_CC = gcc

# Use llvm instead of gcc. Recent Android kernels (past android 12) need llvm.
BUILD_LLVM = 1
Expand All @@ -188,12 +188,12 @@ BUILD_SKIP_MODULES = 1

# Extra paths to prepend to the PATH variable. You'll probably want
# to specify the clang path here (the default).
BUILD_PATH = /usr/lib/llvm-android-12.0-r416183b/bin
BUILD_PATH = /usr/bin

# Extra packages to add to the Build-Depends section. Mainline builds
# can have this section empty, unless cross-building.
# The default is enough to install the Android toolchain, including clang.
DEB_TOOLCHAIN = linux-initramfs-halium-generic:arm64, binutils-aarch64-linux-gnu, clang-android-12.0-r416183b, gcc-4.9-aarch64-linux-android, g++-4.9-aarch64-linux-android, libgcc-4.9-dev-aarch64-linux-android-cross, lz4
DEB_TOOLCHAIN = linux-initramfs-halium-generic:arm64, binutils-aarch64-linux-gnu, crossbuild-essential-arm64, gcc-4.9-aarch64-linux-android, g++-4.9-aarch64-linux-android, libgcc-4.9-dev-aarch64-linux-android-cross, lz4

# Where we're building on
DEB_BUILD_ON = amd64
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/btfm_slim_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ static int btfm_slim_dai_get_channel_map(struct snd_soc_dai *dai,
switch (dai->id) {
case BTFM_FM_SLIM_TX:
num = 2;
fallthrough;
case BTFM_BT_SCO_SLIM_TX:
case BTFM_BT_SPLIT_A2DP_SLIM_TX:
if (!tx_slot || !tx_num) {
Expand Down
8 changes: 4 additions & 4 deletions drivers/bus/mhi/host/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
#define MHI_TIMESYNC_CHAN_DB (125)
#define TIMESYNC_CAP_ID (2)

#define MHI_TIMESYNC_DB_SETUP(er_index) ((MHI_TIMESYNC_CHAN_DB << \
TIMESYNC_CFG_CHAN_DB_ID_SHIFT) & TIMESYNC_CFG_CHAN_DB_ID_MASK | \
(1 << TIMESYNC_CFG_ENABLED_SHIFT) & TIMESYNC_CFG_ENABLED_MASK | \
((er_index) << TIMESYNC_CFG_ER_ID_SHIFT) & TIMESYNC_CFG_ER_ID_MASK)
#define MHI_TIMESYNC_DB_SETUP(er_index) (((MHI_TIMESYNC_CHAN_DB << \
TIMESYNC_CFG_CHAN_DB_ID_SHIFT) & TIMESYNC_CFG_CHAN_DB_ID_MASK) | \
((1 << TIMESYNC_CFG_ENABLED_SHIFT) & TIMESYNC_CFG_ENABLED_MASK) | \
((er_index) << (TIMESYNC_CFG_ER_ID_SHIFT) & TIMESYNC_CFG_ER_ID_MASK))

#define MHI_VERB(fmt, ...) do { \
struct mhi_private *mhi_priv = \
Expand Down
2 changes: 2 additions & 0 deletions drivers/char/adsprpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,7 @@ static void context_notify_user(struct smq_invoke_ctx *ctx,
ctx->early_wake_time = early_wake_time;
if (ctx->asyncjob.isasyncjob)
break;
fallthrough;
case EARLY_RESPONSE:
/* rpc framework early response with return value */
if (ctx->asyncjob.isasyncjob)
Expand Down Expand Up @@ -6888,6 +6889,7 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num,
case FASTRPC_IOCTL_INVOKE_CRC:
if (!size)
size = sizeof(struct fastrpc_ioctl_invoke_crc);
fallthrough;
case FASTRPC_IOCTL_INVOKE_PERF:
if (!size)
size = sizeof(struct fastrpc_ioctl_invoke_perf);
Expand Down
1 change: 1 addition & 0 deletions drivers/firmware/qcom_scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ static int qcom_scm_call_noretry(struct device *dev,
return scm_smc_call(dev, desc, res, QCOM_SCM_CALL_NORETRY);
case SMC_CONVENTION_LEGACY:
BUG_ON(1); /* No current implementation */
fallthrough;
default:
pr_err("Unknown current SCM calling convention.\n");
return -EINVAL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2186,6 +2186,7 @@ static int goodix_generic_noti_callback(struct notifier_block *self,
ret = goodix_send_ic_config(cd, CONFIG_TYPE_NORMAL);
if (ret)
ts_info("failed send normal config[ignore]");
fallthrough;
case NOTIFY_FWUPDATE_FAILED:
if (hw_ops->read_version(cd, &cd->fw_version))
ts_info("failed read fw version info[ignore]");
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/qseecom.c
Original file line number Diff line number Diff line change
Expand Up @@ -3710,6 +3710,7 @@ static int __qseecom_process_reentrancy(struct qseecom_command_scm_resp *resp,
data->client.app_id, data->client.app_name, resp->data);
return ret;
}
fallthrough;
/* fall through to process incomplete request */
case QSEOS_RESULT_INCOMPLETE:
qseecom.app_block_ref_cnt++;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/cnss2/qmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int num_of_products(moto_product *list)
return num;
}

static int get_moto_device()
static int get_moto_device(void)
{
char *bootdevice = NULL;
int rc = 0;
Expand All @@ -175,7 +175,7 @@ static int get_moto_device()
}
}

static int get_moto_radio()
static int get_moto_radio(void)
{
char *radiodevice = NULL;
int rc = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/nfc/qti/ese_cold_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ int ese_cold_reset_ioctl(struct nfc_dev *nfc_dev, unsigned long arg)
/* free buffers and exit with pass */
goto err;
}

fallthrough;
case ESE_COLD_RESET_PROTECT_DIS:

if (nfc_dev->cold_reset.is_crp_en &&
Expand Down
1 change: 1 addition & 0 deletions drivers/power/supply/qti_battery_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,7 @@ static int battery_psy_get_prop(struct power_supply *psy,
prop, pval);
break;
}
fallthrough;
default:
pval->intval = pst->prop[prop_id];
break;
Expand Down
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-qti-lpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ static int qpnp_lpg_parse_pattern_dt(struct qpnp_lpg_chip *chip,
}

if (chip->lpgs[lpg_chan_id - 1].enable_pfm) {
dev_err(chip->dev, "Cannot configure ramp for PFM-enabled channel %d\n");
dev_err(chip->dev, "Cannot configure ramp for PFM-enabled channel %d\n", lpg_chan_id);
return -EINVAL;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/remoteproc/esoc-mdm-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ static void mdm_handle_clink_evt(enum esoc_evt evt, struct esoc_eng *eng)
case ESOC_UNEXPECTED_RESET:
esoc_mdm_log("evt_state: ESOC_UNEXPECTED_RESET\n");
unexpected_state = true;
fallthrough;
case ESOC_ERR_FATAL:
if (!unexpected_state)
esoc_mdm_log("evt_state: ESOC_ERR_FATAL\n");
Expand Down
4 changes: 4 additions & 0 deletions drivers/soc/qcom/adsp_sleepmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,21 +966,25 @@ static long adspsleepmon_device_ioctl(struct file *file,
switch (audio_param.command) {
case ADSPSLEEPMON_AUDIO_ACTIVITY_LPI_START:
fl->num_lpi_sessions++;
fallthrough;
case ADSPSLEEPMON_AUDIO_ACTIVITY_START:
fl->num_sessions++;
break;
fallthrough;

case ADSPSLEEPMON_AUDIO_ACTIVITY_LPI_STOP:
if (fl->num_lpi_sessions)
fl->num_lpi_sessions--;
else
pr_info("Received AUDIO LPI activity stop when none active!\n");
fallthrough;
case ADSPSLEEPMON_AUDIO_ACTIVITY_STOP:
if (fl->num_sessions)
fl->num_sessions--;
else
pr_info("Received AUDIO activity stop when none active!\n");
break;
fallthrough;

case ADSPSLEEPMON_AUDIO_ACTIVITY_RESET:
fl->num_sessions = 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/soc/qcom/icnss2/qmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static int num_of_products(moto_product *list)
return num;
}

static int get_moto_device()
static int get_moto_device(void)
{
char *bootdevice = NULL;
int rc = 0;
Expand All @@ -182,7 +182,7 @@ static int get_moto_device()
}
}

static int get_moto_radio()
static int get_moto_radio(void)
{
char *radiodevice = NULL;
int rc = 0;
Expand Down
13 changes: 13 additions & 0 deletions drivers/soc/qcom/socinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,8 +1329,10 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo)
case SOCINFO_VERSION(0, 16):
msm_custom_socinfo_attrs[i++] = &dev_attr_sku.attr;
msm_custom_socinfo_attrs[i++] = &dev_attr_esku.attr;
fallthrough;
case SOCINFO_VERSION(0, 15):
msm_custom_socinfo_attrs[i++] = &dev_attr_nmodem_supported.attr;
fallthrough;
case SOCINFO_VERSION(0, 14):
msm_custom_socinfo_attrs[i++] = &dev_attr_num_clusters.attr;
msm_custom_socinfo_attrs[i++] =
Expand All @@ -1357,38 +1359,49 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo)
msm_custom_socinfo_attrs[i++] = &dev_attr_display1.attr;
msm_custom_socinfo_attrs[i++] = &dev_attr_nsp.attr;
msm_custom_socinfo_attrs[i++] = &dev_attr_eva.attr;
fallthrough;
case SOCINFO_VERSION(0, 13):
msm_custom_socinfo_attrs[i++] = &dev_attr_nproduct_id.attr;
msm_custom_socinfo_attrs[i++] = &dev_attr_chip_name.attr;
fallthrough;
case SOCINFO_VERSION(0, 12):
msm_custom_socinfo_attrs[i++] = &dev_attr_chip_family.attr;
msm_custom_socinfo_attrs[i++] =
&dev_attr_raw_device_family.attr;
msm_custom_socinfo_attrs[i++] =
&dev_attr_raw_device_number.attr;
fallthrough;
case SOCINFO_VERSION(0, 11):
case SOCINFO_VERSION(0, 10):
msm_custom_socinfo_attrs[i++] = &dev_attr_serial_number.attr;
fallthrough;
case SOCINFO_VERSION(0, 9):
msm_custom_socinfo_attrs[i++] = &dev_attr_foundry_id.attr;
fallthrough;
case SOCINFO_VERSION(0, 8):
case SOCINFO_VERSION(0, 7):
msm_custom_socinfo_attrs[i++] = &dev_attr_pmic_model.attr;
msm_custom_socinfo_attrs[i++] =
&dev_attr_pmic_die_revision.attr;
fallthrough;
case SOCINFO_VERSION(0, 6):
msm_custom_socinfo_attrs[i++] =
&dev_attr_platform_subtype_id.attr;
msm_custom_socinfo_attrs[i++] = &dev_attr_platform_subtype.attr;
fallthrough;
case SOCINFO_VERSION(0, 5):
msm_custom_socinfo_attrs[i++] = &dev_attr_accessory_chip.attr;
fallthrough;
case SOCINFO_VERSION(0, 4):
msm_custom_socinfo_attrs[i++] = &dev_attr_platform_version.attr;
fallthrough;
case SOCINFO_VERSION(0, 3):
msm_custom_socinfo_attrs[i++] = &dev_attr_hw_platform.attr;
fallthrough;
case SOCINFO_VERSION(0, 2):
msm_custom_socinfo_attrs[i++] = &dev_attr_raw_id.attr;
msm_custom_socinfo_attrs[i++] = &dev_attr_raw_version.attr;
fallthrough;
case SOCINFO_VERSION(0, 1):
break;
default:
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/qca-wifi-host-cmn/dp/wifi3.0/dp_rx_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ dp_rx_link_desc_return_by_addr(struct dp_soc *soc,
src_srng_desc, link_desc_addr, bm_action);
status = QDF_STATUS_SUCCESS;
} else {
struct hal_srng *srng = (struct hal_srng *)wbm_rel_srng;

DP_STATS_INC(soc, rx.err.hal_ring_access_full_fail, 1);

dp_info_rl("WBM Release Ring (Id %d) Full(Fail CNT %u)",
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/qca-wifi-host-cmn/dp/wifi3.0/dp_tx_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,17 @@ dp_tx_adjust_flow_pool_state(struct dp_soc *soc,
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_PRIORITY_QUEUE_OFF,
WLAN_DATA_FLOW_CTRL_PRI);

fallthrough;
case FLOW_POOL_VO_PAUSED:
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_VO_QUEUE_OFF,
WLAN_DATA_FLOW_CTRL_VO);

fallthrough;
case FLOW_POOL_VI_PAUSED:
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_VI_QUEUE_OFF,
WLAN_DATA_FLOW_CTRL_VI);

fallthrough;
case FLOW_POOL_BE_BK_PAUSED:
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_BE_BK_QUEUE_OFF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,22 @@ dp_tx_flow_ctrl_reset_subqueues(struct dp_soc *soc,
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_PRIORITY_QUEUE_ON,
WLAN_DATA_FLOW_CTRL_PRI);

fallthrough;
case FLOW_POOL_VO_PAUSED:
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_VO_QUEUE_ON,
WLAN_DATA_FLOW_CTRL_VO);

fallthrough;
case FLOW_POOL_VI_PAUSED:
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_VI_QUEUE_ON,
WLAN_DATA_FLOW_CTRL_VI);

fallthrough;
case FLOW_POOL_BE_BK_PAUSED:
soc->pause_cb(pool->flow_pool_id,
WLAN_NETIF_BE_BK_QUEUE_ON,
WLAN_DATA_FLOW_CTRL_BE_BK);
fallthrough;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ void hal_rx_proc_phyrx_other_receive_info_tlv_6490(void *rx_tlv_hdr,
*/
static void hal_rx_dump_msdu_start_tlv_6490(void *msdustart, uint8_t dbg_level)
{
struct rx_msdu_start *msdu_start = (struct rx_msdu_start *)msdustart;

__QDF_TRACE_RL(dbg_level, QDF_MODULE_ID_DP,
"rx_msdu_start tlv (1/2) - "
"rxpcu_mpdu_filter_in_category: %x "
Expand Down Expand Up @@ -324,8 +322,6 @@ static void hal_rx_dump_msdu_start_tlv_6490(void *msdustart, uint8_t dbg_level)
static void hal_rx_dump_msdu_end_tlv_6490(void *msduend,
uint8_t dbg_level)
{
struct rx_msdu_end *msdu_end = (struct rx_msdu_end *)msduend;

__QDF_TRACE_RL(dbg_level, QDF_MODULE_ID_DP,
"rx_msdu_end tlv (1/3) - "
"rxpcu_mpdu_filter_in_category: %x "
Expand Down
22 changes: 0 additions & 22 deletions drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified_sta_tlv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,28 +1375,6 @@ static QDF_STATUS get_sar_limit_cmd_tlv(wmi_unified_t wmi_handle)
return status;
}

/**
* wmi_sar2_result_string() - return string conversion of sar2 result
* @result: sar2 result value
*
* This utility function helps log string conversion of sar2 result.
*
* Return: string conversion of sar 2 result, if match found;
* "Unknown response" otherwise.
*/
static const char *wmi_sar2_result_string(uint32_t result)
{
switch (result) {
CASE_RETURN_STRING(WMI_SAR2_SUCCESS);
CASE_RETURN_STRING(WMI_SAR2_INVALID_ANTENNA_INDEX);
CASE_RETURN_STRING(WMI_SAR2_INVALID_TABLE_INDEX);
CASE_RETURN_STRING(WMI_SAR2_STATE_ERROR);
CASE_RETURN_STRING(WMI_SAR2_BDF_NO_TABLE);
default:
return "Unknown response";
}
}

/**
* extract_sar2_result_event_tlv() - process sar response event from FW.
* @handle: wma handle
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/qcacld-3.0/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4360,7 +4360,7 @@ KBUILD_CPPFLAGS += $(cppflags-y)
# WLAN driver. Note that we must use ccflags-y here so that it
# will override the kernel settings.
ifeq ($(call cc-option-yn, -Wmaybe-uninitialized), y)
ccflags-y += -Wmaybe-uninitialized
#ccflags-y += -Wmaybe-uninitialized
ifneq (y,$(CONFIG_ARCH_MSM))
ccflags-y += -Wframe-larger-than=4096
endif
Expand Down
Loading

0 comments on commit 7852285

Please sign in to comment.