From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4E75C761AF for ; Tue, 28 Mar 2023 14:51:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233330AbjC1Ot7 (ORCPT ); Tue, 28 Mar 2023 10:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233306AbjC1Oto (ORCPT ); Tue, 28 Mar 2023 10:49:44 -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 79AFBE04B for ; Tue, 28 Mar 2023 07:49:10 -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 DA3A46181D for ; Tue, 28 Mar 2023 14:49:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAAA5C433EF; Tue, 28 Mar 2023 14:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680014949; bh=+VWbyQBxRxbuoIFyaBdMXRSSVTR3ezzmLyjGexD6PpE=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=Dfw11QL18hd/OBQBiU2/1JyCzkjDO3h/71RtiORTDkPHQFmMcndCKQ8TaHVWGqT0l eNxnCkfU3FhTuxyq2ibZ3qqqhJGtXSQHcNzhu/3WfC8/RhEih1JraTKlJLHrNTBBxB 382dFfoaXkQaTIk5fYDbWTbo+8IGRvTeBqdeGnMhC5ewjCWcYWJPpGnECY6H3CbvF/ r9RY6RkDH2us1fq/dAboxVodJXJJJwFSuZpSbxzIHkKYp/pGKs0u+eexBXVgREBc1F UbQjAZn7eEs0/j4BpDUSdoppBkAugWNecklfgudXFeSuDfEQiOUiKc+9gnOON9cgeu ZZAWMx/BaNzFg== Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 9B85C27C0054; Tue, 28 Mar 2023 10:49:07 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 28 Mar 2023 10:49:07 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehgedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusehkvghrnhgvlhdrohhrgheqnecuggftrf grthhtvghrnhepvdeviefgtedugeevieelvdfgveeuvdfgteegfeeiieejjeffgeeghedu gedtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghrnhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduvdekhedujedt vdegqddvkeejtddtvdeigedqrghrnhgupeepkhgvrhhnvghlrdhorhhgsegrrhhnuggsrd guvg X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0D58EB6008F; Tue, 28 Mar 2023 10:49:07 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-237-g62623e8e3f-fm-20230327.001-g62623e8e Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20230328142455.481146-1-tianfei.zhang@intel.com> Date: Tue, 28 Mar 2023 16:48:45 +0200 From: "Arnd Bergmann" To: "Richard Cochran" , "Tianfei Zhang" Cc: Netdev , linux-fpga@vger.kernel.org, =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , "Andy Shevchenko" , vinicius.gomes@intel.com, pierre-louis.bossart@linux.intel.com, marpagan@redhat.com, russell.h.weight@intel.com, matthew.gerlach@linux.intel.com, "Nicolas Pitre" , "Raghavendra Khadatare" Subject: Re: [PATCH v3] ptp: add ToD device driver for Intel FPGA cards Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org On Tue, Mar 28, 2023, at 16:42, Richard Cochran wrote: > On Tue, Mar 28, 2023 at 10:24:55AM -0400, Tianfei Zhang wrote: > >> v3: >> - add PTP_1588_CLOCK dependency for PTP_DFL_TOD in Kconfig file. >> - don't need handle NULL case for ptp_clock_register() after adding >> PTP_1588_CLOCK dependency. > > Sorry, but this isn't how it is done... > >> +config PTP_DFL_TOD >> + tristate "FPGA DFL ToD Driver" >> + depends on FPGA_DFL >> + depends on PTP_1588_CLOCK > > Try these commands: > > git grep "depends on PTP_1588_CLOCK_OPTIONAL" > git grep "depends on PTP_1588_CLOCK_OPTIONAL" | grep -v OPTIONAL > > Driver must depend on PTP_1588_CLOCK_OPTIONAL and then handle the NULL > case correctly. I think this one is one of the (few) cases where the 'depends on PTP_1588_CLOCK' is correct and 'depends on PTP_1588_CLOCK_OPTIONAL' would be wrong: Using PTP_1588_CLOCK_OPTIONAL as a dependency for PTP_DFL_TOD would allow enabling the driver even when PTP_1588_CLOCK is completely disabled, which would cleanly build but not do anything useful because the driver only handles PTP and not also networking. Arnd