Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp255997rdb; Thu, 21 Dec 2023 08:17:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8jF2wmZ8KyoY212uua7OCy68RI5FmtzJNllgjgtlWiB4NB64dwoBQSqh8GHuBIgwyRvZM X-Received: by 2002:a05:6a20:4d1d:b0:194:4cc5:4932 with SMTP id gb29-20020a056a204d1d00b001944cc54932mr1352219pzb.112.1703175449636; Thu, 21 Dec 2023 08:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703175449; cv=none; d=google.com; s=arc-20160816; b=RWUZO5Lj+vj7LhmAvmDaS2JhPtb49AeaY2PlIOybnus78Ca+Wp31Km5knta+O5mNtg obuup4jtfvzle1+QYVnWr4xXKtzCgX6evW5K4gmktDvg9UFhRbd5gVbGlS9QroX4647u bQHcl5U6eZ6dPV0XH15RktmjhhsIKT5rO5AjzHON0uf3N8IYC6ydDp9VAzXbMvC1j1/1 ToQSEVfOYIg2QGb1UqxsV8/cMDVS9g4nW9qI+y0OKbWA/FguEEedDdeWFZA6ERrXCDd3 Wx0g1LyOvasMt2v2r0GNuA47yF1N/G6NWG7reOhSZczfT6g10QDbn0HR83yROtN1TGEq mVTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date :dkim-signature; bh=A4BiEgNNwYotIHnLmmzoWFNLd7tsoun803tkNel9PHA=; fh=TFQI+YzLUQlYl4kOcmLiE6H8IBxzIqYzJVz8pYCx9C4=; b=jfUaXCeOTIyUrMGb0g2aCAYtWJwGZRvHxxt7qGxlExug/Kxo/rinL6MBHI0YiVJ/Qz myLE1QrEDGjDw082TdUvmW+P40xSEIBgRYP4WmpGNiaWD3nX24eMxQcFCBA7VjUXCG11 Jh6uhSzwYq0zy3wPnSxiove9W7Zqu7LM41EoYqyHFsuA82zTu2dl/CYf62Je3K0JKKNS 7NRvvsEyrpNZuzeWBGngnF1MunKwoeKUeBSh5WyX+tlX4621Al0tuYllBNNktWzIv8eH GoIbCNbGawcdlCvsJgScw6soD119GVOVACEs06pn3dwY8BvosuBr+fnfvjVbdZNegc/A SFsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I7diH669; spf=pass (google.com: domain of linux-kernel+bounces-8745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8745-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z64-20020a636543000000b005cdbf27fdd1si1728615pgb.684.2023.12.21.08.17.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 08:17:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I7diH669; spf=pass (google.com: domain of linux-kernel+bounces-8745-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8745-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 32A0EB24EC3 for ; Thu, 21 Dec 2023 16:15:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17E625993F; Thu, 21 Dec 2023 16:13:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="I7diH669" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF13059923; Thu, 21 Dec 2023 16:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703175219; x=1734711219; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=+F0n8TqaU3oiITLxGriRbvSDLCslujIfieiK6InccLQ=; b=I7diH669UfxPCG95lThkDW8LBCJVk8pmLb5JVHg2eWMO0v2GEcQT58oQ RKDjYUn7N9ts/Y/q5Umg81PJaj9fOy3ucOFq0xphiN2j1OZN84vBtEDKr +XO18u3j+sj0IfDq8k1z79GKOfsW1IQElT5aKB5CG33WZN2oND2UMa8e+ oEz3rzzmQxJDzNzQxCCNzRfVrj6qAAA/JJJJ/CZTyXnQLiJinttwv02B1 Bi9Ftzg2ezZ4XM7BnAZgI8GU6l17g7hVITDpudPbcBMWPEYp8DcnAkh/d 0gdEM79P7ry1KkV5pb0BEl3Lqjh6AyAzy2eiya7D6qiN/j6RVuf6zWTjj w==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="2828552" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="2828552" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 08:13:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="900142098" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="900142098" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga004.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 08:13:35 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rGLfx-00000007tKW-2X53; Thu, 21 Dec 2023 18:13:33 +0200 Date: Thu, 21 Dec 2023 18:13:33 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Linus Walleij , Kent Gibson , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [RFC PATCH] gpiolib: remove extra_checks Message-ID: References: <20231219201102.41639-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Dec 21, 2023 at 02:00:39PM +0100, Bartosz Golaszewski wrote: > On Thu, Dec 21, 2023 at 1:52 PM Andy Shevchenko > wrote: > > On Thu, Dec 21, 2023 at 10:26:03AM +0100, Bartosz Golaszewski wrote: > > > On Wed, Dec 20, 2023 at 4:28 PM Linus Walleij wrote: ... > > > Defining DEBUG makes sense to > > > enable dev_dbg() messages. > > > > Exactly! > > > > > CONFIG_DEBUG_GPIO is used by one driver > > > > By all drivers which are using pr_debug() / dev_dbg(). > > I am using it a lot in my development process (actually I have it enabled > > in all my kernel configurations). > > I'm not saying we should remove it. It'll stay defined in the Makefile > and remain seamless for debug messages. I just want to get rid of that > ugly extra_checks variable which has very little impact. I agree that extra_checks is unusual (or as Linus put it "non-standard") thingy. And I agree that removal is for good. My question here solely about that WARN_ON(). Do we need it always be enabled or not? > > > to enable code that can lead to undefined behavior (should it maybe be > > > #if 0?). > > > > I don't know what you are talking about here. > > I'm talking about drivers/gpio/gpio-tps65219.c and its usage of > CONFIG_DEBUG_GPIO. Oh, that one should probably be #if 0 ... #endif or if (0) { ... } -- With Best Regards, Andy Shevchenko