Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2450622imc; Tue, 12 Mar 2019 14:16:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHW4HZctZlWXTUGqiTrbn9K/GfbAsV/kVD3EDcm7gGLqfwLSqS0EoKQCn8kT2tZlnRSr5F X-Received: by 2002:a17:902:2a28:: with SMTP id i37mr41862573plb.243.1552425405402; Tue, 12 Mar 2019 14:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552425405; cv=none; d=google.com; s=arc-20160816; b=DgWhUeuFD7cfbwDJ1DjJiqLFWLxQ2Nm3/QTal+r53B91SBTIC3KhAUrnzDIlReiU2f iCjcPLOimW/LM3nbWtlKL7EdmIqsDeDNon2MKJ8GNDBvXoie+KxaVLSE/y+C6aujPq55 L3jXtP4CV28rpWvkZkDA07LHypD55kXI8pop2i6OrcOcCdcRqWTRe+nxdNc4fib3DlTj Vi5u3sZz5g+mpF9UO8fKodO8B72+3zi5m4llWq4D/J/CEofxo+BMvQEIxDn8gZoedDej AHsPvmIWvtijga0X+lnI6amqsLJIne71TW/qIKqmRg08sKwtbNxBMeuaclewrEXZSfAP 6ofA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=myaZ5cjF+AZUedFgq74ulobNWZ/W+DgEDgTZxPOdRWY=; b=EAzlC6r+CGCszcMf2+TTbFsT9yD+U3j6xhCqEnLl7r0IJrUF+GbRsfPC41ZZMDMXF7 9KFntsaDZ2a5D2B4TOhBYM5MXUY5kiMRG80dcXMFysSQ95/hRWBeqmB2vS1y6M1QoxIk SSCo8U3YYZXC/STEy7GTndsAnfqVrN9koY2cP627AHTtOtiLZxsj1zlk10Hb+s6safUT afaWGoYwLxabCzH6E3qAJ36lnodrF4L0emHLffDb22WoUIhOXAUFIS9b//Ez1R8UTwh6 1PZ1w/Br7ZqlG2mSGWSgfMc9Fys3MCPiUp0vGWv974GauZoyNJm6xoceEU6M/QjQiX+Z 2axQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=I4qhPtiL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si8879067plt.215.2019.03.12.14.16.29; Tue, 12 Mar 2019 14:16:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=I4qhPtiL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726819AbfCLVOd (ORCPT + 99 others); Tue, 12 Mar 2019 17:14:33 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:59589 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbfCLVOc (ORCPT ); Tue, 12 Mar 2019 17:14:32 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44Jnm66yR3z9tykP; Tue, 12 Mar 2019 22:14:30 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=I4qhPtiL; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id lCEITzC1FPmS; Tue, 12 Mar 2019 22:14:30 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44Jnm65c6mz9tykN; Tue, 12 Mar 2019 22:14:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1552425270; bh=myaZ5cjF+AZUedFgq74ulobNWZ/W+DgEDgTZxPOdRWY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=I4qhPtiLKc4oIT6/G4INmOFf3a5zMYYs1JIrSbXFKj0rSdqMXZIofpKf8VIZub8L6 aIi08UiX09HEsztI8Vl5te0rGumiktPp7Xyr7+tRNC5z6TVjUsPSFVqjgmsxtSUlzm S5F3ZKDdalggioruCIHQCsb+uUKySuCmbW1DzIvw= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E8BC88B8B1; Tue, 12 Mar 2019 22:14:30 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id by-G1yVrH3PR; Tue, 12 Mar 2019 22:14:30 +0100 (CET) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 819118B8A7; Tue, 12 Mar 2019 22:14:30 +0100 (CET) Subject: Re: [PATCH] powerpc: Make some functions static To: Mathieu Malaterre , Michael Ellerman Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20190312203140.31785-1-malat@debian.org> From: Christophe Leroy Message-ID: <607b412d-e5a2-5d08-7fb9-53a24e6c76d4@c-s.fr> Date: Tue, 12 Mar 2019 22:14:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190312203140.31785-1-malat@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit : > In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board") > new functions were added. Since these functions can be made static, > make it so. While doing so, it turns out that holly_power_off and > holly_halt are unused, so remove them. I would have said 'since these functions are only used in this C file, make them static'. I think this could be split in two patches: 1/ Remove unused functions, ie holly_halt() and holly_power_off(). 2/ Make the other ones static. Christophe > > Silence the following warnings triggered using W=1: > > arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes] > arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes] > arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes] > arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes] > arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes] > > Signed-off-by: Mathieu Malaterre > --- > arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++--------------- > 1 file changed, 4 insertions(+), 15 deletions(-) > > diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c > index 0409714e8070..829bf3697dc9 100644 > --- a/arch/powerpc/platforms/embedded6xx/holly.c > +++ b/arch/powerpc/platforms/embedded6xx/holly.c > @@ -44,7 +44,8 @@ > > #define HOLLY_PCI_CFG_PHYS 0x7c000000 > > -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) > +static int holly_exclude_device(struct pci_controller *hose, u_char bus, > + u_char devfn) > { > if (bus == 0 && PCI_SLOT(devfn) == 0) > return PCIBIOS_DEVICE_NOT_FOUND; > @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void) > tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0); > } > > -void holly_show_cpuinfo(struct seq_file *m) > +static void holly_show_cpuinfo(struct seq_file *m) > { > seq_printf(m, "vendor\t\t: IBM\n"); > seq_printf(m, "machine\t\t: PPC750 GX/CL\n"); > } > > -void __noreturn holly_restart(char *cmd) > +static void __noreturn holly_restart(char *cmd) > { > __be32 __iomem *ocn_bar1 = NULL; > unsigned long bar; > @@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd) > for (;;) ; > } > > -void holly_power_off(void) > -{ > - local_irq_disable(); > - /* No way to shut power off with software */ > - for (;;) ; > -} > - > -void holly_halt(void) > -{ > - holly_power_off(); > -} > - > /* > * Called very early, device-tree isn't unflattened > */ >