treewide: Fix compilation after disabling -fno-builtin

Change-Id: I634d8f8351d2bf10236ac57187dd99b9b8e10842
This commit is contained in:
Kristof Petho 2021-06-09 08:58:38 +02:00 committed by Giovanni Ricca
parent 26a9de9302
commit ae195a0f2f
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -448,6 +448,7 @@ static int msm_minidump_add_header(void)
struct elf_phdr *phdr;
unsigned int strtbl_off, elfh_size, phdr_off;
char *banner;
size_t linux_banner_len = strlen(linux_banner);
/* Header buffer contains:
* elf header, MAX_NUM_ENTRIES+4 of section and program elf headers,
@ -518,7 +519,7 @@ static int msm_minidump_add_header(void)
/* 4th section is linux banner */
banner = (char *)ehdr + strtbl_off + MAX_STRTBL_SIZE;
strlcpy(banner, linux_banner, strlen(linux_banner) + 1);
strlcpy(banner, linux_banner, linux_banner_len + 1);
shdr->sh_type = SHT_PROGBITS;
shdr->sh_offset = (elf_addr_t)(strtbl_off + MAX_STRTBL_SIZE);

View File

@ -534,6 +534,7 @@ static int swr_dmic_probe(struct swr_device *pdev)
const char *swr_dmic_codec_name_of = NULL;
struct snd_soc_component *component = NULL;
int num_retry = NUM_ATTEMPTS;
size_t name_len = strlen(swr_dmic_name_prefix_of);
swr_dmic = devm_kzalloc(&pdev->dev, sizeof(struct swr_dmic_priv),
GFP_KERNEL);
@ -681,8 +682,7 @@ static int swr_dmic_probe(struct swr_device *pdev)
ret = -ENOMEM;
goto dev_err;
}
strlcpy(prefix_name, swr_dmic_name_prefix_of,
strlen(swr_dmic_name_prefix_of) + 1);
strlcpy(prefix_name, swr_dmic_name_prefix_of, name_len + 1);
component->name_prefix = prefix_name;
return 0;