Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1603008rdb; Wed, 20 Sep 2023 14:04:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIV2NSZm/+h5TVYWQR2VupDmGMwt9BaTzyFsK0Y3EomjSpnS1GKk1XWE9d4mTscCZZUnBg X-Received: by 2002:a17:902:c211:b0:1c5:64aa:b97a with SMTP id 17-20020a170902c21100b001c564aab97amr3306282pll.38.1695243889273; Wed, 20 Sep 2023 14:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695243889; cv=none; d=google.com; s=arc-20160816; b=sJqs0EN0fj+yMdy8UltmpxedL1lls8jS/EDYuezF00RU4I8OUj2Lu30Q4Xp+Zx/kWt pbkgrZM/+O67VmiXB1ReEdkghm1xxFlt9kA/hVPMICnoJKDw8rDDfg3EkCThPBbzVASQ oYF6IdmV+zXn3L70UXFaz6Z6HRsL3ZwbB4nqEUcDiHxn0F/MJw54zOyq3FrHXxoQ6Tob ThAqwu2mIgIXOUL38ynmrZXrFRY+Gh2reK4xE2jq6i/K3/hDPEtm5GgMRfG2DjXEINaT 1z3c74iYYX/zCzX7huBWNat2sz34O6ngkD9k6y9QjGnnVPjc8d9XTqAiukkJ/BjyI56B mGng== 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=AjGd1kAPcf2aLXmJRYoJYeiK4BfhJLJ63HpluIhATmo=; fh=MKy8oMqvDrJMGHWsOUAfvmEwzoE6Ip5QZqhgOBUGbAM=; b=V5KGart6q/WSOmaBU9ycwdEI6dMnHusR7uDg9Dw69s8F+oJrynJuMNC4Mjd6TbaNOU /UH3u5EnGmPbAIgV7W48bUeZ8fSqwq/uSVrRFKQxSGfzAPRZwtTX3uji6Vk63uHuOgQk pNVFsFbmY5Auw5tAXtOjfdlds0f1bJXvNo1n1XkkdZfL5OBkdIVdXLRknFbSqDTii4Kg QPpNKn8OLkkOUqZ5HwnVPFdUD6yC1o8+kvnCfGdex8UsXcMfSpjIMxgGEGyJqvNPyQHx +hxVV0bqPTu2/2+VjXl6oKRqgea17YFJhuUdntGQTuHIweSoqkPU0PgKC8n3kNf5hhu1 GptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O30kftMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id j7-20020a170903024700b001bb86cdf12bsi12850409plh.147.2023.09.20.14.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 14:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O30kftMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5F93A80EE773; Wed, 20 Sep 2023 11:09:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229674AbjITSJW (ORCPT + 99 others); Wed, 20 Sep 2023 14:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjITSJS (ORCPT ); Wed, 20 Sep 2023 14:09:18 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4700C6; Wed, 20 Sep 2023 11:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695233352; x=1726769352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QkeZCJ+wbV6YBiqruqO3WbNO7KU2wC4MLYBVcJfsgoo=; b=O30kftMdhUXNjDUiWf0UdGZjAHpXUxpKa4RmMAuWotabc0d9Ac4i9+ib JiVb82GbFEgjjYV+l5HtaUfkk/IaxdCN/2Kxon5CcmR3ByXu2AGxQqqZZ UuXxJWqicLRZqLZj+VPymu+sxxZjQ3EgHUSaIoc8a//Cn2yrOvPzrkBUY COKU0wQ91NG5zc8JsjiiO5KsuD+gGO2hobJYCm3KPp8zcaa8OakE7N56Q +C8Mx04EsUNKA3+gsqwO9LM9uKf52HXrCzbe5FLBPutWyXCqAzZZp3UDl /kJQ4UKZrux/TuhuitPzEjV8BCnGK3tfby+YV77xaNZyvwQYpaKr2HcqE w==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="359685158" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="359685158" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:09:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="870469682" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="870469682" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orsmga004.jf.intel.com with ESMTP; 20 Sep 2023 11:09:09 -0700 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Lobakin , Tony Nguyen , Richard Cochran , Arkadiusz Kubalewski , Michal Michalik , Milena Olech , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK Date: Wed, 20 Sep 2023 20:07:43 +0200 Message-ID: <20230920180745.1607563-2-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230920180745.1607563-1-aleksander.lobakin@intel.com> References: <20230920180745.1607563-1-aleksander.lobakin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 20 Sep 2023 11:09:30 -0700 (PDT) Starting the cited commit, ice_lib.c unconditionally refers to three functions compiled only when CONFIG_PTP_1588_CLOCK is set (as they're located in ice_ptp_hw.c): ERROR: modpost: "ice_is_clock_mux_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_is_phy_rclk_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_is_cgu_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined! These three are HW feature tests and it is safe to stub them as `return false` when PTP support is disabled. Fixes: 8a3a565ff210 ("ice: add admin commands to access cgu configuration") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309181001.G72eBLpj-lkp@intel.com Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h index 6f277e7b06b9..405a72864dc7 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h @@ -271,10 +271,33 @@ int ice_read_sma_ctrl_e810t(struct ice_hw *hw, u8 *data); int ice_write_sma_ctrl_e810t(struct ice_hw *hw, u8 data); int ice_read_pca9575_reg_e810t(struct ice_hw *hw, u8 offset, u8 *data); bool ice_is_pca9575_present(struct ice_hw *hw); + +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK) + bool ice_is_phy_rclk_present(struct ice_hw *hw); bool ice_is_clock_mux_present_e810t(struct ice_hw *hw); -int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx); bool ice_is_cgu_present(struct ice_hw *hw); + +#else /* !CONFIG_PTP_1588_CLOCK */ + +static inline bool ice_is_phy_rclk_present(const struct ice_hw *hw) +{ + return false; +} + +static inline bool ice_is_clock_mux_present_e810t(const struct ice_hw *hw) +{ + return false; +} + +static inline bool ice_is_cgu_present(const struct ice_hw *hw) +{ + return false; +} + +#endif /* !CONFIG_PTP_1588_CLOCK */ + +int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx); enum dpll_pin_type ice_cgu_get_pin_type(struct ice_hw *hw, u8 pin, bool input); struct dpll_pin_frequency * ice_cgu_get_pin_freq_supp(struct ice_hw *hw, u8 pin, bool input, u8 *num); -- 2.41.0