Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3268616imc; Wed, 13 Mar 2019 13:15:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFUzHUJCKJ55ZK85ef+elw4ojwCoc1lcER0uriyObeX3Nl/3lEFWQ3nxzIsfrSSDhQ62Wq X-Received: by 2002:a17:902:801:: with SMTP id 1mr46076551plk.299.1552508131026; Wed, 13 Mar 2019 13:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552508131; cv=none; d=google.com; s=arc-20160816; b=hTICnzHKgUMnOCg6+hT3xwL3DMc5Q/gdxZQMlqQNTnYWEDj0KNV5TY07xr6AMBu4SJ 8wG/vQkJZLQhdkgU84ffYKylVrJWWJVuFox8BUCcfk3osxj1K07Qpsw79UChNKIr29mB oXUohUfkCLsQtNLHedcXmh3secfmLO00Q1KQZ1vFqxKVANquKjRQm9ZQMl2ytxdTJujS u0YCCrNBo6jv678LhUd9bbvO38ykgi3xZBTnh5DqFYcWZOn/qDuzmRr+c309Ld4CvNAu +GQXgSOQtRGkJik0Js5tI6ve5IBCcpIdXQ9pKPn5whvDH8X4iL0kfcVMiuCuXddlLYkg q2fA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=F8C7yv7uhcu3LF5Y7XwU72h/m+5lRH3obpAPR7ECZaY=; b=l1RXkJT10BUoJqVV/rReNMjm8G3bv5hpE6Qh3vRrbbm73NPmfHJg1eslXUUxnFLN9W y7OTZVnp20hQF/rfkpzFS+iPODz1jNEheFxZ//e4SWLxYksYi4Mssb5LTq0AzL3XvHCG Izlw02pHI20Px40mx1IK/OrHPWOgWFHGvUMG0ZCLjEOZS0/ejopw/QhXRatG+NwlOO3o xhLg3T5HfzOC/6iYW7tXgKErslKZTxrwNvXTCb1UOx+dFoTrwA3RPLmJ/yCVppItLhcS zPF9aHyE0nHN9Ag+D+QuSZ0u1o44vybMqh+bHqH24oFGU6ojW4lQwETnXoUHecsgdfBx SL4w== ARC-Authentication-Results: i=1; mx.google.com; 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 x4si10779989pfa.13.2019.03.13.13.15.15; Wed, 13 Mar 2019 13:15:31 -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; 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 S1727168AbfCMUNM convert rfc822-to-8bit (ORCPT + 99 others); Wed, 13 Mar 2019 16:13:12 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:41029 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbfCMUNL (ORCPT ); Wed, 13 Mar 2019 16:13:11 -0400 Received: by mail-ot1-f65.google.com with SMTP id t7so2969673otk.8 for ; Wed, 13 Mar 2019 13:13:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=L6gmyEFlOHG4CkXi67ykOuLwFFs5zi3k3f8mGPiMx1w=; b=D01pWDlxYaLUJnR5vyA6GPcHcNbh1GCFGX+JzZy5LZIMfQahcIGICnPYn5wI9H3O70 exI3a4c8zpBYiyLMfv7+xRcgnZAbePC22IA71Hga1EnVqSHu++g5dW4ObZvUmZ8kn2AE 0oiQ7VtY+pdO7AZF38BEtUieFFu1nqTgtHmxvWozOxZpEm2t295pCiOIwGgoMn+lkMW0 MM8lcmLmaTJjzuLsJcinDPfMiQ5u3bcGjtFdhMhkBXfjFs/3wbH9NJDr6rMkt17WE07R Sh6kPEwzA0X04rZHlrrOMM9AmKBQwqJfhVZid4Gf4uYB+b0MeYr6y54rW3j+rYVdeU6c CzeA== X-Gm-Message-State: APjAAAXazrEG9qWZAAQn3prR6iG5JOUE2Q4qBia+cvdhc76ObOcoet+J pv3irReZk4cPU/a4Ig4MgqROoa1kCwicaT8NEeM65w== X-Received: by 2002:a05:6830:16cc:: with SMTP id l12mr29209028otr.58.1552507990675; Wed, 13 Mar 2019 13:13:10 -0700 (PDT) MIME-Version: 1.0 References: <20190312203140.31785-1-malat@debian.org> <607b412d-e5a2-5d08-7fb9-53a24e6c76d4@c-s.fr> In-Reply-To: <607b412d-e5a2-5d08-7fb9-53a24e6c76d4@c-s.fr> From: Mathieu Malaterre Date: Wed, 13 Mar 2019 21:12:59 +0100 Message-ID: Subject: Re: [PATCH] powerpc: Make some functions static To: Christophe Leroy Cc: Michael Ellerman , Paul Mackerras , linuxppc-dev , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 12, 2019 at 10:14 PM Christophe Leroy wrote: > > > > 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. Michael do you want two patches ? > 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 > > */ > >