From patchwork Mon May 1 15:06:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 89073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2590vqo; Mon, 1 May 2023 08:27:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jPXIkyKRbI3X14guR9Kg2bnT/A4h0kS6B4lmmWzoaLuTFiOk8UqH/NfAnE37K1rIhZSGy X-Received: by 2002:a05:6a20:440b:b0:f1:8f7:eeb6 with SMTP id ce11-20020a056a20440b00b000f108f7eeb6mr18441466pzb.59.1682954827012; Mon, 01 May 2023 08:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682954826; cv=none; d=google.com; s=arc-20160816; b=fQ0nLUxLcB/7viPZGnua8LDZ6bz8gd+XPNuTo92WjG8A2eSXOzNq+Rjq5Wj9HCUs23 SZB5R92l3YNMlPw9lPrk0dGrIVGVIgRSxwv9ivvTNwj2QYb2gFwjMR3L6RcbsJS+H4XC hlYFhUAeScfyDcSlExtjRqmgK0xu7D/SrlXjYmX217Ohv+xrVt4X6Q5UxUOFGpVP91kT yAjy1tmva4xhp6PCb1BEqVU44mOR0s3Y9uhP0qY5SDYP9m1/FyD6f0/H/fDXM5A9NE+z nHWMIRMMtuSH1f+MupfJI0cVxiDrz24EbxKl8ZWXS0kOJ/okTCSEfQYtFyieJjMxXoq1 v5AA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=6WSMULbEIYZ81cLFHjr9aE5q309YStDUhO3F5X/W3G8=; b=Xd/HN6ZWZUvkx46/hCiuN0AmFCAwjZ1Ah8KaEPt1H1NKgENVy+Cj9uwro+/rjoAp03 qqWRlomIy+fCPWd7fe/kg6jQ6+WJ3scr/UizwaUepVBFgZ0RS7c+fUmzp8nrieStimbw DPqe6xJdFN8LF0h7LwAhoIRS8S7BBR2hkyduHrpMv0RLhkvjrTTZ0RUCDa3B30VfEGuW pbPY7gXjR6Xf7vDKDfp33XxDkWoqqDvl19WrAd3A8L60JSAKC2tiaCScA35fEOUs06wc cuZwcPUCN1b1ikj+PrmGgJew6Mibov/p5OX+LEzAjU+BSeik1XfVShyaABSGcm3r2gT1 y3CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jPNPhyUO; 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 l7-20020a6542c7000000b004dacaa17ecbsi26447970pgp.559.2023.05.01.08.26.54; Mon, 01 May 2023 08:27:06 -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=jPNPhyUO; 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 S232677AbjEAPGg (ORCPT + 99 others); Mon, 1 May 2023 11:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbjEAPGb (ORCPT ); Mon, 1 May 2023 11:06:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05AE8ED; Mon, 1 May 2023 08:06:31 -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 9569B610A5; Mon, 1 May 2023 15:06:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCF05C433EF; Mon, 1 May 2023 15:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682953590; bh=7ON5awAEDJjN8Hex2o/+imLwvCcOHq32ieI0j7qLVgk=; h=From:To:Cc:Subject:Date:From; b=jPNPhyUO0Fx+LIO9XJXgIAQIkuQHzhl0Fn1PLRTFWcRR8brLdXuXqrSMM8wOQ0IvA HpzhBSY1PVem4z1yig8+zTt5jdXaJI/57AN4m1cniMgcSSX0jRgRhVPJ+acsgdTe/a 1NpKG9SBeCR5zkbb9xtvWgQ4kgnk+SLVzMpNGENmkzBUY+lLYZUQd9YougVu9d2txx /fuZPjCxr2dthcBqHH101rk5BemNratiNhJIEabW0fHkhilcEydDGq70HZ7Vkumg/0 dqQbAdofCdJfDB+Z0tsY3diiXVYHP9flk24TYCHFgRPmFbf4NnizokCuv+aYjPr3+o 5qTveQaL/FpxQ== From: Arnd Bergmann To: Shannon Nelson , Brett Creeley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pds_core: fix linking without CONFIG_DEBUG_FS Date: Mon, 1 May 2023 17:06:14 +0200 Message-Id: <20230501150624.3552344-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1764706040815565623?= X-GMAIL-MSGID: =?utf-8?q?1764706040815565623?= From: Arnd Bergmann The debugfs.o file is only built when the fs is enabled: main.c:(.text+0x47c): undefined reference to `pdsc_debugfs_del_dev' main.c:(.text+0x8dc): undefined reference to `pdsc_debugfs_add_dev' main.c:(.exit.text+0x14): undefined reference to `pdsc_debugfs_destroy' main.c:(.init.text+0x8): undefined reference to `pdsc_debugfs_create' dev.c:(.text+0x988): undefined reference to `pdsc_debugfs_add_ident' core.c:(.text+0x6b0): undefined reference to `pdsc_debugfs_del_qcq' core.c:(.text+0x998): undefined reference to `pdsc_debugfs_add_qcq' core.c:(.text+0xf0c): undefined reference to `pdsc_debugfs_add_viftype' Add dummy helper functions for these interfaces. Fixes: 55435ea7729a ("pds_core: initial framework for pds_core PF driver") Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman --- drivers/net/ethernet/amd/pds_core/core.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/amd/pds_core/core.h b/drivers/net/ethernet/amd/pds_core/core.h index e545fafc4819..2cc430403e9c 100644 --- a/drivers/net/ethernet/amd/pds_core/core.h +++ b/drivers/net/ethernet/amd/pds_core/core.h @@ -261,6 +261,7 @@ int pdsc_dl_enable_validate(struct devlink *dl, u32 id, void __iomem *pdsc_map_dbpage(struct pdsc *pdsc, int page_num); +#ifdef CONFIG_DEBUG_FS void pdsc_debugfs_create(void); void pdsc_debugfs_destroy(void); void pdsc_debugfs_add_dev(struct pdsc *pdsc); @@ -270,6 +271,17 @@ void pdsc_debugfs_add_viftype(struct pdsc *pdsc); void pdsc_debugfs_add_irqs(struct pdsc *pdsc); void pdsc_debugfs_add_qcq(struct pdsc *pdsc, struct pdsc_qcq *qcq); void pdsc_debugfs_del_qcq(struct pdsc_qcq *qcq); +#else +static inline void pdsc_debugfs_create(void) {} +static inline void pdsc_debugfs_destroy(void) {} +static inline void pdsc_debugfs_add_dev(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_del_dev(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_ident(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_viftype(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_irqs(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_qcq(struct pdsc *pdsc, struct pdsc_qcq *qcq) {} +static inline void pdsc_debugfs_del_qcq(struct pdsc_qcq *qcq) {} +#endif int pdsc_err_to_errno(enum pds_core_status_code code); bool pdsc_is_fw_running(struct pdsc *pdsc);