Subject: Re: [intel-net] ice: remove unnecessary CONFIG_ICE_GNSS

From: Jakub Kicinski <[email-masked]>
Date: Wed, 22 Feb 2023 21:17:42 -0800

On Wed, 22 Feb 2023 14:35:58 -0800 Jacob Keller wrote:
> I'm sending to both Intel-wired-lan and netdev lists since this was
> discussed publicly on the netdev list. I'm not sure how we want to queue it
> up, so I currently have it tagged as intel-net to go through Tony's IWL
> tree. I'm happy however it gets pulled. I believe this is the best solution
> as the total number of #ifdefs is the same as with CONFIG_ICE_GNSS, as is
> the Makefile line. As far as I can tell the Kbuild just does the right thing
> here so there is no need for an additional flag.
> 
> I'm happy to respin with a "depends" check if we think the flag has other
> value.

Sorry for late response. Do you mean depends as in keeping the separate
Kconfig? IS_REACHABLE() is a bit of a hack, makes figuring out what
gets built a lot harder for users. How about we keep the IS_ENABLED()
but add a dependency to ICE as a whole?

I mean instead of s/IS_ENABLED/IS_REACHABLE/ do this:

index 3facb55b7161..198995b3eab5 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -296,6 +296,7 @@ config ICE
        default n
        depends on PCI_MSI
        depends on PTP_1588_CLOCK_OPTIONAL
+       depends on GNSS || GNSS=n
        select AUXILIARY_BUS
        select DIMLIB
        select NET_DEVLINK

Or do you really care about building ICE with no GNSS.. ?