Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6051169rwr; Mon, 1 May 2023 15:42:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Nr6IWmEQb8siX/xL1cxmGkOiBQtL9nQIlMTK/ClwMVbQvPhV27LxP/hI7xaKLyAeocWZ+ X-Received: by 2002:a05:6a00:10c2:b0:63d:38db:60ef with SMTP id d2-20020a056a0010c200b0063d38db60efmr19783351pfu.26.1682980934695; Mon, 01 May 2023 15:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682980934; cv=none; d=google.com; s=arc-20160816; b=taToRz4PX947N+1vpIsVOCtcFKuztIYCQgMbTjASzoEIgPuTfktjAnM5qtvwFYMhaa RljBacWywqUXyUXsqC6fK4OyKuvFpOsXInmFeogaHkCETFhgpgBop4ToxI+J8Ku9dqRs 4kDYuz/ksBHvsBZuWPMSyX1L1lHdocqE3O5SeCrZ+uN5xUzZb2E/pvSmeZ7omTKTPURL 2q6MRl63l6bbAWJEPu7jqj4I8WgujSi5RBhj2zhXg/+vnUlGKGhRc1AJyOWGq/03Zwpp zTMir9kQY3f8SgGYRHB4g9+t1dn3A65m8rmIzpfgBd7xDny2wlurh1tstknalL5g65M/ 52Bg== 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:subject:cc:to:from:date :dkim-signature; bh=+kUBjlWYeqtazCni0znSAuLB8whxYYgcnLNuAUqKxKA=; b=oipmzfWq5sd/sUI+1JB8DPXvqJYvg2Es8NLuM5IPV31r+HyFkYlG5ITApVPu5jBRrQ UZQ0FEF+Rv8MZCHnT9ELzR46m1rrXfjmGORTItVzoXH9uJjwKf+nL9aflCEJTxMrvCNr u79WKJrzRawW6RRx61tiuSNujP1xnPK3nqRgwpSCyGpNY7DVY7vsFijz5S2/KeOrWvKN wip2JkiNMlQAHluH0lHR+SE6C6brtMWF82bZCCja2I5UsN+ydORdf7bbnoN6jMArGaGh t3VZnCVu8JRvJUEYVxA2+X/J3QmV7MbX1tq6rbd+go1ZRy3JqMPrS605KRe2/9Z0VTAy 2OUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G3zly/zu"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a625507000000b006423f1949c3si4123588pfb.389.2023.05.01.15.41.59; Mon, 01 May 2023 15:42:14 -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="G3zly/zu"; 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 S232966AbjEAWfU (ORCPT + 99 others); Mon, 1 May 2023 18:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233283AbjEAWfK (ORCPT ); Mon, 1 May 2023 18:35:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7BD226BC; Mon, 1 May 2023 15:35:04 -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 53AE361FFD; Mon, 1 May 2023 22:35:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 551CEC433D2; Mon, 1 May 2023 22:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682980503; bh=tFgPQnUGzkWSyNbxoqNLA0lCOJAEhy+Hl6nBDMeibNY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G3zly/zuoUp/BaN3h2TTKmhO2jNFFyPjfY6kTuBst7h7CX4xh0XOQmpjKt5+XfpLn CYhWL4ekIGhgb5Is7uJGiVQNCln08JMxt0y95iuiPYOeNDVdYw+2RL0wxvHydgid7T Ilt28qn0cF3QD8sbbeb0VVcxLjnj1wtUMfuXchcO2KonOGlBTsc2bSDL4A9pcsq0AP QsrbVzT+AY0/9lzSPwPoUajAPaEcZLhuodxh1x3TOdAvsUBvS7PL+mGXefUvJvuznU rijeB/LKwhDoni4rgyupPLw5o4WrR100CY2IwCv0zk64CnwVws2HQJNm3XQRx5MfKv B0gQa+j5aoGJg== Date: Mon, 1 May 2023 15:35:02 -0700 From: Jakub Kicinski To: Arnd Bergmann Cc: Shannon Nelson , Brett Creeley , "David S. Miller" , Eric Dumazet , Paolo Abeni , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pds_core: fix linking without CONFIG_DEBUG_FS Message-ID: <20230501153502.34f194ed@kernel.org> In-Reply-To: <20230501150624.3552344-1-arnd@kernel.org> References: <20230501150624.3552344-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 1 May 2023 17:06:14 +0200 Arnd Bergmann wrote: > 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. Debugfs should wrap itself. Doesn't this work: diff --git a/drivers/net/ethernet/amd/pds_core/Makefile b/drivers/net/ethernet/amd/pds_core/Makefile index 0abc33ce826c..54d1d5b375ce 100644 --- a/drivers/net/ethernet/amd/pds_core/Makefile +++ b/drivers/net/ethernet/amd/pds_core/Makefile @@ -9,6 +9,5 @@ pds_core-y := main.o \ dev.o \ adminq.o \ core.o \ - fw.o - -pds_core-$(CONFIG_DEBUG_FS) += debugfs.o + fw.o \ + debugfs.o