Skip to content

Commit

Permalink
riscv: fix compilation warnings
Browse files Browse the repository at this point in the history
warning: mixed declarations and code

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Charles Ci-Jyun Wu <dminus@andestech.com>
  • Loading branch information
lyctw committed Apr 28, 2022
1 parent b4716ef commit 313eb6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/riscv/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ void __init parse_dtb(void)
bool andestar45;
void __init setup_arch(char **cmdline_p)
{
long archid;

init_mm.start_code = (unsigned long) _stext;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = (unsigned long) _end;

*cmdline_p = boot_command_line;
long archid = sbi_get_marchid();
archid = sbi_get_marchid();
andestar45 = ((archid & 0xF0) >> 4 == 4 && (archid & 0xF) == 5)?true:false;

parse_early_param();
Expand Down
3 changes: 2 additions & 1 deletion arch/riscv/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void __iomem *ioremap_nocache(phys_addr_t offset, size_t size)
int i;
int cpu_num = num_online_cpus();
int id = smp_processor_id();
int err;

pgprot_t pgprot = pgprot_noncached(PAGE_KERNEL);
ret = __ioremap_caller(offset, size, pgprot,
Expand Down Expand Up @@ -117,7 +118,7 @@ void __iomem *ioremap_nocache(phys_addr_t offset, size_t size)
for (i = 0; i < cpu_num; i++) {
if(i == id)
continue;
int err = smp_call_function_single(i, sbi_andes_set_pma,
err = smp_call_function_single(i, sbi_andes_set_pma,
(void*)&pma_arg, true);
if(err){
pr_err("Core %d fails to set pma\n"
Expand Down

0 comments on commit 313eb6a

Please sign in to comment.