Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2308198pxp; Mon, 21 Mar 2022 16:31:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfMe9JWefs9dPY2cgHdTnuACgRTk88IZmolOgfNv5Ww5xaofWvAb19fX3HAeCImRaVPY1H X-Received: by 2002:a17:90b:11c9:b0:1c7:19bc:64de with SMTP id gv9-20020a17090b11c900b001c719bc64demr1595032pjb.203.1647905476206; Mon, 21 Mar 2022 16:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647905476; cv=none; d=google.com; s=arc-20160816; b=ypfJRkuolKpF6QH1GYvf0Q9/Ev5dZff9acUAWhws54VIguffB0X77T3A5PcM12HIhR q49kvK9jnXGsfCPrnNE8X2qRijuIR5PoGgM7C5bAD8XG/b1cpEE6FV/w5N26alNVa8Yc TYhknV1PbXwdMpd3X69C3QitAi+g7t9cQRMNqJ4L/hput2JckbdS8pIk9ZrxOJBfT3mi iKKb7cvoztp6U9ZF7HP3KDlTajTPwFN0kXRrIxEwvFYCWIa5WOw30ASLZIHcydKz0yyk y5GhD3wUZgCL9GvlE5fJC3Gpn9OM8RcCGxf7vQ5/qlwrJjVE/SbQWQneeB0HFvrc7tIC VKAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=VtZrK2QJiD142HH3eGmHXidaImy2Iw8OCXmGcQVUc68=; b=yYmeH2dl1XxNFYL90WH8Dj7s+yfb9rY1CSO5r8HfnTLJ8p0P2Wmzd6iUd9pV9eN2sx l8SIHFq6JjzLxq+VVuLsvXN5eZs8NRszyZLaW54xt7aSmO3+p3KJRBJJlZDDix9sNqoU yWBbG8Y6wfbx95ASyUGwwxNKtIfHSigLqU5IFCEGCmC1HAeEowsGTCpvKYgRgOBbf61D I63nwgpMU5/ALMe1NEQdkQn+oc6kNwTui0i/a4dndIovn+7M56PAKux0eMlDI4GGQ3JL 69pn12e2YNGaf3jlM56cGmsnYVJ8qqcX3+DZftdibG4BdJ78exuWwij8NJcGH/TpajXY MPfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=QPY3fFhy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k19-20020a056a00135300b004fa3a8e0066si8915734pfu.285.2022.03.21.16.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 16:31:16 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=QPY3fFhy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 09A95472125; Mon, 21 Mar 2022 15:22:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345308AbiCUIfO (ORCPT + 99 others); Mon, 21 Mar 2022 04:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243898AbiCUIfN (ORCPT ); Mon, 21 Mar 2022 04:35:13 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35057B851 for ; Mon, 21 Mar 2022 01:33:49 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9A7505C0148; Mon, 21 Mar 2022 04:33:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 21 Mar 2022 04:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=VtZrK2QJiD142HH3e GmHXidaImy2Iw8OCXmGcQVUc68=; b=QPY3fFhy5BPpxmLoGrFk6WJorIKyixJor 69vOYsoS8sXfCDN+02J5Y771+jowJidfQwr2ENoq2z78TL+7P717CetjPCJvDQ8T qKQcM20/dIxJHY2kYw5AE8Qu4azDD5A7EoFvkK6J2qq0EaUTGKaSVcenZc54gtzK Y7KgRDUcR/dCn+hXm2paWWcY1Rdc0VlHHvpE6F94jd4iMxn2RVT17rgPo03cyVLd B+E3LUo8GpzdduAOLC9a1BKgTUvVVS7oveVM0m20uCRjyKcYtTGKba+walTdKVBw d2TyQoN5KkYPOE+rI7//VIShPPBKIkvyqhDpHbOA6UQ+xLu7KYdsQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegvddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvufgjkfhfgggtsehmtderredttdejnecuhfhrohhmpefhihhnnhcu vfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrg htthgvrhhnpeefffejiefgheevheefvefhteeggfeijeeiveeihfffffdugfefkeelfffh gfehvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hfthhhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Mar 2022 04:33:46 -0400 (EDT) Date: Mon, 21 Mar 2022 19:33:56 +1100 (AEDT) From: Finn Thain To: Christophe Leroy cc: Benjamin Herrenschmidt , Randy Dunlap , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] macintosh/via-pmu: Fix compiler warnings when CONFIG_PROC_FS is disabled In-Reply-To: Message-ID: <39f63c1b-5a1b-8c8e-5991-813d3d3c2576@linux-m68k.org> References: <650f5577599a701fdd632cdd469a9cea9788cdf3.1647674431.git.fthain@linux-m68k.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811774-1870743231-1647851636=:12278" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811774-1870743231-1647851636=:12278 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 21 Mar 2022, Christophe Leroy wrote: > Le 19/03/2022 =C3=A0 08:20, Finn Thain a =C3=A9crit=C2=A0: > > drivers/macintosh/via-pmu.c:897:12: warning: 'pmu_battery_proc_show' de= fined but not used [-Wunused-function] > > static int pmu_battery_proc_show(struct seq_file *m, void *v) > > ^~~~~~~~~~~~~~~~~~~~~ > > drivers/macintosh/via-pmu.c:871:12: warning: 'pmu_irqstats_proc_show' d= efined but not used [-Wunused-function] > > static int pmu_irqstats_proc_show(struct seq_file *m, void *v) > > ^~~~~~~~~~~~~~~~~~~~~~ > > drivers/macintosh/via-pmu.c:860:12: warning: 'pmu_info_proc_show' defin= ed but not used [-Wunused-function] > > static int pmu_info_proc_show(struct seq_file *m, void *v) > > ^~~~~~~~~~~~~~~~~~ > >=20 > > Rearrange some code and add some #ifdefs to avoid unused code warnings > > when CONFIG_PROC_FS is disabled. >=20 > Why not just put those three functions inside an #ifdef CONFIG_PROC_FS ? >=20 You'd get a warning about the prototypes ("declared static but never=20 defined"). Rather than add an ifdef around the prototypes as well, I just= =20 reordered things a little. ---1463811774-1870743231-1647851636=:12278--