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 02B25C6FD1D for ; Thu, 23 Mar 2023 12:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbjCWMp1 (ORCPT ); Thu, 23 Mar 2023 08:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbjCWMpW (ORCPT ); Thu, 23 Mar 2023 08:45:22 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CBE298DF; Thu, 23 Mar 2023 05:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679575521; x=1711111521; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=z034CEWDZWzBHQVHZYtVHoLpxMyCoA3kXaDvrv1Q98w=; b=XR4GbRRxOLhhGzwBKbILpOX2956u5kEKM+CllvviJ4Jy3MIGM93tW+TZ mSkinGjVbUsmmlOF8Or0B+wAS0kdxXGh9OigJWr3C+UrE63ERJ79538Nt hJczlBfMoR2s4il6/2qlHSll8Y8SXvoUq0g//i6PjhuyKr2VZ9UMZ+HJ0 LkQBmAOfb7uG5K1lsRJ9HFUO1SEz2mJZolQn8KdCyyuWVMXWoXHh8G3kg t2Z0Bc7kiFCbnNPz9/wyrA/YxWexLzaedr5iinOnLE//A7O3rkPxkMVuD TeO6DUipnZurcsVfb9HlHeEgjifMzkAXnClXpSYht2/X5cUHrrrNW3Ov7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="338196404" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="338196404" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 05:45:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="632383474" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="632383474" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP; 23 Mar 2023 05:45:07 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pfKJU-007VlG-0v; Thu, 23 Mar 2023 14:45:04 +0200 Date: Thu, 23 Mar 2023 14:45:03 +0200 From: Andy Shevchenko To: Jani Nikula Cc: Pin-yen Lin , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck , Xin Ji , linux-kernel@vger.kernel.org, Thomas Zimmermann , linux-acpi@vger.kernel.org, Javier Martinez Canillas , AngeloGioacchino Del Regno , Hsin-Yi Wang , Lyude Paul , =?iso-8859-1?Q?N=EDcolas_F_=2E_R_=2E_A_=2E?= Prado , Allen Chen , dri-devel@lists.freedesktop.org, Marek Vasut , Stephen Boyd , chrome-platform@lists.linux.dev, devicetree@vger.kernel.org, Andi Shyti , Dmitry Baryshkov , Douglas Anderson , Imre Deak , Linus Walleij , YueHaibing Subject: Re: [PATCH v14 03/10] drm/display: Add Type-C switch helpers Message-ID: References: <20230322104639.221402-1-treapking@chromium.org> <20230322104639.221402-4-treapking@chromium.org> <87edpg7nub.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87edpg7nub.fsf@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, Mar 22, 2023 at 06:27:56PM +0200, Jani Nikula wrote: > On Wed, 22 Mar 2023, Andy Shevchenko wrote: > > On Wed, Mar 22, 2023 at 06:46:32PM +0800, Pin-yen Lin wrote: > >> +#ifdef CONFIG_DRM_DISPLAY_DP_TYPEC_HELPER > > > > Ah, maybe this should use IS_REACHABLE() ? > > Personally, I think IS_REACHABLE() is a build-time band-aid solution to > a problem that should be solved in Kconfig. :p > > I think it always means there's a configuration combo that shouldn't > exist, and it's a surprise to the user when they've configured > something, Kconfig has deemed it a valid configuration, but they don't > get the feature they want. > > As a user, how would they even debug that case? Double check configs, > don't see anything wrong. Usual pairing is 'imply FOO' in Kconfig & 'IS_REACHEABLE(CONFIG_FOO)' in the code. And I believe it's not an abnormal. -- With Best Regards, Andy Shevchenko