Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1536018ybg; Wed, 29 Jul 2020 17:28:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQR3eaLjTx5Gemu5bkWu5xffKglwc6HxVNZEuNUIs0LBYowN2unphLm+PiX2QIbzyQlMLR X-Received: by 2002:a17:906:138b:: with SMTP id f11mr180449ejc.310.1596068913706; Wed, 29 Jul 2020 17:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596068913; cv=none; d=google.com; s=arc-20160816; b=ktKhrqW710dmORh1NBG99gbtS5YzbHOIrfTpV1tF9vltvTXbZBBHmVywWe+4UbogBy UoIMjG4N3mxJHqH61L9DU3kwaJd81otK8FJgvEF7GkFxFQgpP6nLoAJQcC+0lVKuGnwG WptvEGwx8WWvDqYGcN4FlyufKXTcALiTqmuBhLkEq9XLKB1CUnlCJTZAvceowmt/5Zkx aZHWfy3FNzuoepp6aCnRWkTWUGcqPFkFuOVThs2HRi70GU5l5fLSWgkLYlVy2XUQbXeh p22o42Mu4S2PR76PJu73yqOiQV+Ef+De8DWPlnkX2G2pdvdS9MAs6oLs+5XpX29Elqc8 uW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:wdcironportexception :ironport-sdr:ironport-sdr:ironport-sdr:dkim-signature; bh=BO7GNZWocWP7OuYXiVPCCDzbsMlEo7Y9WRdqYbgjx0w=; b=lqaPKRYgXhrwoYCT1fz3B8kYbOL60O0T9k+wqFrQZgTCd1a2jfz2JOtrrswajmScyv sKoRiOWKB8MkJAR4/bB+L5beqQTappEEYBhOmD0Lls7rb6Z9LCRfl/XOPiDvVMXNU7Ky 6vlpmWFXopN4S4hXX5jQWOGu6WMlBIKxmZH1FX//QNvWpEJzqPSOiE3hpcugwdrdx9MF K2yBarqQik1fbwt66hMZg+YiBqMzmI7JiMKGg7/tjK48kKJGXwDENu0oldRczcsUbV11 EjlD98JqSUVQlgcDlDXaPE1CLGw14V8KQNrSjDsAG4lMgv7o6DHIhVd4COK6F9cpEx2Y aNYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=MtDwwZN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx7si1866232ejb.752.2020.07.29.17.28.08; Wed, 29 Jul 2020 17:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=MtDwwZN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728112AbgG3AZl (ORCPT + 99 others); Wed, 29 Jul 2020 20:25:41 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:33201 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727862AbgG3AZk (ORCPT ); Wed, 29 Jul 2020 20:25:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1596068739; x=1627604739; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eZTfMgiK2vEeMZsD5lwwoP2zVvgB9NQ0c2HdLF8qwXA=; b=MtDwwZN6u54Yd6TZyAesj3nKzWmd37fDiXby6gvMrCxmFZOECwB/s1Tj qeBiGwxRyPSY/fWXgy2wt5u5pZHQo80OfWiubuQNoniZjvU5efEXJlclZ Yg6eruHy6NRmMqRAYXbuL/gAd1vR0a1ZtjdmSea6z5TACi6QO745s7Ucj eVkQhzqXnBy8DLjtMCDwCwJTYCQHKo2JZwAKcg8a7Iye/6ADpNfFdI77d 8bzmzb+WlmtFD5USejezAEk1DTZNyN97Qfy7bObAjh1fmUdcRctKPEpBq GHZtvwtJuqA9MzV0r9Ug3KXxhe4l5fEW2yXkBaysKA405gWyCpOZUEJ1Y w==; IronPort-SDR: LRjIRlPiDUXVZavr6SS0YbT2Ll9/TQnMq2TSZoWyndF1OV/qX2DDDl1sh29PCRZ6WW082HMBjg Kz4QkkhHoYBPTdJqnRuvu7Zdd0mokur51okc8K4HWp+04jYzFaQSVPshkN990Jb8CivUOd/D1e eZRSxUOaHHyFUh1ql+NxkQvyjQgrPWx4kpUFgyY2kZdZPsUlan56sGIx32LWtDYfmwLxiqzPYS BMxr41pEvhaCOaIVX3HGRFl+Rn0CxpPhPb59M3ODYE6k3ddmXOtQgHibBCci1Hl8+PyX7ExgbQ Ues= X-IronPort-AV: E=Sophos;i="5.75,412,1589212800"; d="scan'208";a="253040609" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 Jul 2020 08:25:39 +0800 IronPort-SDR: 2kmw3pgLDyOZaUJhD5yBfLPod9DCOGcdEkWCNZW0yk7HkEI95YNdJKr9fJ/kNEpNxJYAKM/QDy HphhY6hBr3OnXyxP67dCiPPn5teYb+qm4= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 17:13:09 -0700 IronPort-SDR: 6UJWOZcUcSr7TfQqXrqD26zZiC1kzKQxJVo8FI0jW1AO2FT4vnNLnamB+KCsFFg/X6LmkZwDOT CyVema/uVjpw== WDCIronportException: Internal Received: from jpf009043.ad.shared (HELO jedi-01.hgst.com) ([10.86.58.210]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Jul 2020 17:25:40 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , Anup Patel , linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley Subject: [PATCH] RISC-V: Fix build warning for smpboot.c Date: Wed, 29 Jul 2020 17:25:35 -0700 Message-Id: <20200730002535.17335-1-atish.patra@wdc.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following warnings are reported by kbuild with W=1. >> arch/riscv/kernel/smpboot.c:109:5: warning: no previous prototype for 'start_secondary_cpu' [-Wmissing-prototypes] 109 | int start_secondary_cpu(int cpu, struct task_struct *tidle) | ^~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/smpboot.c:146:34: warning: no previous prototype for 'smp_callin' [-Wmissing-prototypes] 146 | asmlinkage __visible void __init smp_callin(void) | ^~~~~~~~~~ Fix the warnings by marking the local functions static and adding the prototype for the global function. Signed-off-by: Atish Patra --- arch/riscv/include/asm/smp.h | 3 +++ arch/riscv/kernel/smpboot.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h index 40bb1c15a731..6dfd2a1446d5 100644 --- a/arch/riscv/include/asm/smp.h +++ b/arch/riscv/include/asm/smp.h @@ -40,6 +40,9 @@ void arch_send_call_function_single_ipi(int cpu); int riscv_hartid_to_cpuid(int hartid); void riscv_cpuid_to_hartid_mask(const struct cpumask *in, struct cpumask *out); +/* Secondary hart entry */ +asmlinkage void smp_callin(void); + /* * Obtains the hart ID of the currently executing task. This relies on * THREAD_INFO_IN_TASK, but we define that unconditionally. diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 4e9922790f6e..c09fbdf924b1 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -106,7 +106,7 @@ void __init setup_smp(void) } } -int start_secondary_cpu(int cpu, struct task_struct *tidle) +static int start_secondary_cpu(int cpu, struct task_struct *tidle) { if (cpu_ops[cpu]->cpu_start) return cpu_ops[cpu]->cpu_start(cpu, tidle); -- 2.24.0