Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2595955pxy; Tue, 3 Aug 2021 10:04:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1hynTVu2r2GXWmDoXx1A7oPXrItOwfNnVj7fmxaBXjVdv2QbsetLRT5uuF0sD0YIi9WGp X-Received: by 2002:a92:c748:: with SMTP id y8mr637279ilp.2.1628010254300; Tue, 03 Aug 2021 10:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628010254; cv=none; d=google.com; s=arc-20160816; b=u8L/B5FS1llYDUCJVRaApBRa1hWtDilCkXUg16mDxrt6BlakqDx+9v+ZTx3jMRDGya MwptD9KF3NOP1RQ6iG2KOWr0kbRNfumtHhZv1F0VosnO0EHqdiHi2PuKMCQep4JZk7ZZ GeHNCOueHa2yev2Fj4JiuZIjIIrXQ2MpiAhYWOVzJ8VtHS1JMGHMAcSmvFXVG1WsYE0C y+Re9rs4vZe7UgzQvS/iVb7oziswuTwCoC1Pjil8mnzlkWEOG2HDz+by1EN+y6TwtHuR /x4Hj5OxCFYep6VlDc8e+y5YEYGP/7oJELK+m2Cj3rgXAKbJFcGEh9wjZ86pJXvrdF06 TCZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9Cd5hSvld/CkHKN5cIYMdpd6Y5kyPMi/skOkJXTIzgw=; b=cnV2Fjq3wrxuv+/Udd11UwZDVc+63J0bMsffFtpOyFpiWqXZ4yHSd4dsXiSpBedkcc fitxG/k5F2txCMHIeTzEHGfy7+u0OvUWrt/mDYrXRPytnIXWwarqipqkZRG5uD7Y9PdM YywQeedkzb16R+Y4RUR8eUVg7Zyywj1fjD5xmpv4c6pOFF0/FGq3S0YeRDTIbwMwr7vI vHfEIsBJvPV6tBIeKiyhlz+beMTk1E/lcaiSCRgBOXgxW9VE3M6/GK9b6ug0X4rcSKgp bLnHp5LPe2VMuPu+gPHTxqZjOrAsRJbZTgyCrCNdtfXbRcZH1vs+1LgqwODOuI2XZa+k 6ijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i9nbXs1p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si15152602iod.50.2021.08.03.10.04.00; Tue, 03 Aug 2021 10:04:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i9nbXs1p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237740AbhHCRB5 (ORCPT + 99 others); Tue, 3 Aug 2021 13:01:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:36630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237691AbhHCRBS (ORCPT ); Tue, 3 Aug 2021 13:01:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D58C60F0F; Tue, 3 Aug 2021 17:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628010067; bh=xv6HDs8f0cdED9oqlZmIGfjdRrTqv1FrSIw7uMIr0g0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=i9nbXs1plRNmd9Odlhglnfe32A11VJ2JkyljXHuSCLliCVz9Vi14AeaJfWRM4fQB4 SVZulln4H9D+zlY1z/9KmEHt/BEZf4H7GGw7O0ZhZHnqQdOAqnv0rnMSkkoNyAoDhb UH5WFTtcj+xdhkasiTcvMY/TEHvVc7DYNBJ57EvxwOlcmT5mDgKoWpvRv+G+oRd9T2 9q2hcBKQnq0DmLiOv+cbFX+rFhLyaxlYIFqArk8Fr1pc84qh8u8ClndXB+UGdQp2bI LcURHqPudxt3UeurSjRAwizq6wvNBCZx3B2iqt1IUCi2+pjOQLh7b9mXru5SMSbWGG q43TrVh87VW1A== Received: by mail-wm1-f54.google.com with SMTP id l11-20020a7bcf0b0000b0290253545c2997so2535599wmg.4; Tue, 03 Aug 2021 10:01:06 -0700 (PDT) X-Gm-Message-State: AOAM531JTDpTZJB738l98frdNHDbiGkxyovtqnV2ybLlLlRTRFfGZOv/ ZZBKe0mOvODUXvCbJ1KxYFicJX9Qu+rqfjFP89w= X-Received: by 2002:a7b:ce10:: with SMTP id m16mr5114379wmc.75.1628010065645; Tue, 03 Aug 2021 10:01:05 -0700 (PDT) MIME-Version: 1.0 References: <20210802145937.1155571-1-arnd@kernel.org> <20210802164907.GA9832@hoboy.vegasvil.org> <20210802230921.GA13623@hoboy.vegasvil.org> <20210803155556.GD32663@hoboy.vegasvil.org> <20210803161434.GE32663@hoboy.vegasvil.org> In-Reply-To: <20210803161434.GE32663@hoboy.vegasvil.org> From: Arnd Bergmann Date: Tue, 3 Aug 2021 19:00:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v2] ethernet/intel: fix PTP_1588_CLOCK dependencies To: Richard Cochran Cc: Nicolas Pitre , "Keller, Jacob E" , "Brandeburg, Jesse" , "Nguyen, Anthony L" , "David S. Miller" , Jakub Kicinski , Arnd Bergmann , Kurt Kanzenbach , "Saleem, Shiraz" , "Ertman, David M" , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 3, 2021 at 6:14 PM Richard Cochran wrote: > On Tue, Aug 03, 2021 at 08:55:56AM -0700, Richard Cochran wrote: > > On Tue, Aug 03, 2021 at 08:59:02AM +0200, Arnd Bergmann wrote: > > > It may well be a lost cause, but a build fix is not the time to nail down > > > that decision. The fix I proposed (with the added MAY_USE_PTP_1588_CLOCK > > > symbol) is only two extra lines and leaves everything else working for the > > > moment. > > > > Well, then we'll have TWO ugly and incomprehensible Kconfig hacks, > > imply and MAY_USE. I'm all in favor of removing imply elsewhere as well, but that needs much broader consensus than removing it from PTP_1588_CLOCK. It has already crept into cryto/ and sound/soc/codecs/, and at least in the latter case it does seem to even make sense, so they are less likely to remove it. > > Can't we fix this once and for all? > > > > Seriously, "imply" has been nothing but a major PITA since day one, > > and all to save 22 kb. I can't think of another subsystem which > > tolerates so much pain for so little gain. > > Here is what I want to have, in accordance with the KISS principle: > > config PTP_1588_CLOCK > bool "PTP clock support" > select NET > select POSIX_TIMERS > select PPS > select NET_PTP_CLASSIFY > > # driver variant 1: > > config ACME_MAC > select PTP_1588_CLOCK > > # driver variant 2: > > config ACME_MAC > > config ACME_MAC_PTP > depends on ACME_MAC > select PTP_1588_CLOCK > > Hm? Selecting a subsystem (NET, POSIX_TIMES, PPS, NET_PTP_CLASSIFY) from a device driver is the nightmare that 'imply' was meant to solve (but did not): this causes dependency loops, and unintended behavior where you end up accidentally enabling a lot more drivers than you actually need (when other symbols depend on the selected ones, and default to y). If you turn all those 'select' lines into 'depends on', this will work, but it's not actually much different from what I'm suggesting. Maybe we can do it in two steps: first fix the build failure by replacing all the 'imply' statements with the correct dependencies, and then you send a patch on top that turns PPS and PTP_1588_CLOCK into bool options. Arnd