From patchwork Tue May 16 19:45:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94898 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp665904vqo; Tue, 16 May 2023 12:55:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QZGs/9vaWnFEZRvtAfayVWhFezSeCG553jFTcTo9AEJvao39aVD8sZgO4JsSRNUcoujAJ X-Received: by 2002:a05:6a20:12cb:b0:104:1ab7:8242 with SMTP id v11-20020a056a2012cb00b001041ab78242mr22504969pzg.43.1684266899899; Tue, 16 May 2023 12:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684266899; cv=none; d=google.com; s=arc-20160816; b=dLgwfRgcx8h2wwMJCooNqFU6ZtSJjZwsDiNrFe8tW2BCmO8uGjjQL9lS7rKNVN3X0T RdufcRW+qaHxhvHLnRa85c997WT1QliY72RS7bfH7xz/3HzWtc1GY24g6t0SRiItJGjg lucEdwFSLcC+qsmMdA9mEgXLbl8Ro2oEcQjtNADgQcM/BkmPgVB9horftlqCoWutyG3z OWpiePom1/eLE2HUWmcYdOMTUMjhPBsfWAOMbNrM5vq/9a56f661mLM0gX6oG8AFIv0O cv5DcfHjnxe8YpaJ2w0MbdtxclMPpTW2IMfyxdHLlVBu/HWrXsbSj34lcWjfyJgEbNJj CQuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E1hujHLviDGxuswpWgYEWFYXTyDR/AVj4cdAvsE8yTg=; b=NnJzB1ha5yg7RvpNOYdE2eXXdrWwImY6LHraBvplSV1NCHZMcGMYPNeV62KwGWSs++ eMtyN9dpRVTEL1PcuY5kTdsBa0j4bTOH+oB50JE+lNVeY4ySjHyYQsLzcQ38TcSEPLy1 PTLlE4I2XhFyihFJOOjsHKr8mgLoBAZcEKBN1xaeS7sL3kt+uuGx0AwlBorId8FESvIB mDf6NXMm4TZfIPHPZSDTDThDrr0o9N/zkN7YYLZ3wJC64P1wpwmfr1Vr+zvBJL3IsS0X zBtlbGLKHFOLssqQunt4d5tm78+8PeMOlxWASwBZSWchSd4L5KsPmQA1LnWs0H0/SLVB nhvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="loFs/j/K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a639305000000b0052ca3209fc9si19717606pge.654.2023.05.16.12.54.46; Tue, 16 May 2023 12:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="loFs/j/K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbjEPTqn (ORCPT + 99 others); Tue, 16 May 2023 15:46:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229869AbjEPTqm (ORCPT ); Tue, 16 May 2023 15:46:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C600E66 for ; Tue, 16 May 2023 12:46:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0C723635A1 for ; Tue, 16 May 2023 19:46:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C80EAC433EF; Tue, 16 May 2023 19:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684266400; bh=/xw8L/SqM7J5+dB7LsHWwXKvpp+WooOj5QzCg+QboCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=loFs/j/KwTSIPj1772KxBpDHgWJJ2vaLRapiw5FjTF4PabYT16JDupLW+SSGmRpf1 wCfewaZ3l0WoTJRovGojaLEA+HxlJ1NW45LcbWix6XzWOmHyPzvBAybAIbjtrhFERg WrOFlPQNpCh2GpB+sRNgOKrAqZsmYy31q+0kOkA1uWk2a+Dz63iuOnaI3jcN1M2ChW 0JN9odgtd1dNcOIlPE2384QQyALu//fAB9uQ+pQG0a9tBG1UjTym2EYq3MRePy4qCZ XNWzpQQSX1y3BYj2VVPgldVCKuO/P4BXEl9UEsv8ecAHFhOT/duQ8z6RE7yik7OAvc jARhqLL/RZqdw== From: Arnd Bergmann To: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] atm: hide unused procfs functions Date: Tue, 16 May 2023 21:45:34 +0200 Message-Id: <20230516194625.549249-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516194625.549249-1-arnd@kernel.org> References: <20230516194625.549249-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766081848813636492?= X-GMAIL-MSGID: =?utf-8?q?1766081848813636492?= From: Arnd Bergmann When CONFIG_PROC_FS is disabled, the function declarations for some procfs functions are hidden, but the definitions are still build, as shown by this compiler warning: net/atm/resources.c:403:7: error: no previous prototype for 'atm_dev_seq_start' [-Werror=missing-prototypes] net/atm/resources.c:409:6: error: no previous prototype for 'atm_dev_seq_stop' [-Werror=missing-prototypes] net/atm/resources.c:414:7: error: no previous prototype for 'atm_dev_seq_next' [-Werror=missing-prototypes] Add another #ifdef to leave these out of the build. Signed-off-by: Arnd Bergmann --- net/atm/resources.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/atm/resources.c b/net/atm/resources.c index 2b2d33eeaf20..995d29e7fb13 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c @@ -400,6 +400,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *buf, int __user *sioc_len, return error; } +#ifdef CONFIG_PROC_FS void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos) { mutex_lock(&atm_dev_mutex); @@ -415,3 +416,4 @@ void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) { return seq_list_next(v, &atm_devs, pos); } +#endif