Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp127281rdb; Thu, 21 Dec 2023 05:00:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8j/Y60rnQtiMcBw7u9SZ51ec9ArfsF3EkUrYgMYA+dTeyRI6RLmPJiAtXqMZvcpv3DOGG X-Received: by 2002:a05:6358:a1e:b0:172:e56e:93e3 with SMTP id 30-20020a0563580a1e00b00172e56e93e3mr427871rwa.61.1703163641684; Thu, 21 Dec 2023 05:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163641; cv=none; d=google.com; s=arc-20160816; b=jAXlomD/PDwZptbCLRm1WSBvVqhGvnLygIFaxHcsLyStUlVUs1nDTzibmcUzCq2bey Xc3gI5xZlZJ2E/5kiQ82uf7iFbPF9I0Ii3/3M1h4lzDX4RajwRohGB3AVYlZ7pCMLda1 KHkEPt0M2zTGsT2FIIKYv9dOwkWwU3s7ulnbR6UJwd2cMB73RT7OTgSeTQLYAJUGWZP/ yBxClxyhdb/3hkaJ0JM7YZJyzUGAMh+dURxd79sCY4YSxuTl9veVsB98PVBg8HcoicpW dj/x2P4xJxzM/zRkgZ76PkUHXdRipsyXzxvP8kJNYf/SkYAod7rUA+3fM2RnVZiUZvKG +eNg== 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=ou0NGcHJEBae+G0pE5XBembJ38dYpTT/Dt8MPlOGmeA=; fh=TFQI+YzLUQlYl4kOcmLiE6H8IBxzIqYzJVz8pYCx9C4=; b=sFEKcBxH6CI1V9HBcSIlTakhbCFMl+2+JQP6hHnLLW2BOP7S3CHjKOhpQCS7Vp70vA 0GSXUZjMe7zILuGh+MLh5LGX6teUuiqpA1KJ//r1FD1TitwdTscHqVpPSnhCXPk/IgtP x5dR7A5m2SHG8t5v+wVrCQ0jiis7qBBdzPj5s87XdCRjFvZ2RX7jWJnAiijhibMSo8mt Ce2EmNauON9Xe/ZC5xqtT93Bv+p2tHgVXlWKy+BGj4kRNsFzn5JwybS5N/A0CZckj5G4 Zds3euWYOW3qn8mb2kVMaeN1pcZbGGCIKpA2iQ9J2EhWQa1PMKaWuqyzF4XPxwhh5KUS esMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jTZ6LZUZ; spf=pass (google.com: domain of linux-kernel+bounces-8403-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8403-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 i135-20020a636d8d000000b005c6ac5b5fd0si1460109pgc.248.2023.12.21.05.00.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:00:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8403-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=jTZ6LZUZ; spf=pass (google.com: domain of linux-kernel+bounces-8403-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8403-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 D8CC2B25EC8 for ; Thu, 21 Dec 2023 12:58:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 367EA77651; Thu, 21 Dec 2023 12:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jTZ6LZUZ" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 1FE5077643; Thu, 21 Dec 2023 12:52:11 +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=1703163132; x=1734699132; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=FbPXrgzp9CMlNqZjP3ebUSZqWMGld04TyVhznkGVITo=; b=jTZ6LZUZp51bxftqHPoNIiVb/LG4r9wLEve2KL+zRSsL/fWMg8wlsSc5 59QxDDVdjzTubYtzGzdNVqYYSLCL+QwZS3jpun4Zmn4c/jd2SOikMOqiY azRcbDQ5vt7CUZT8wtrNMsAI/DrDzxChk4cckd4umCTfUOzBYV4QyZzi2 +SntVZntgLIbeUuTLUkeIuENRzXYK0gUbHhQtjNfdnCdz0Q5onl1ipo0J jJjDsulXSkXxfA/Xjuur8oDeaMR1oWJ1CUpXKJGwbT1kBaeN1gWZxlEum RCtU5YquP0B/RTV/dCCHKaEI/E0X1OA2vSk0u9RRoHfxXLLsNrP3Xr4bd A==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="14653875" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="14653875" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 04:52:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="780183598" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="780183598" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 04:52:09 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rGIX0-00000007r0i-19N8; Thu, 21 Dec 2023 14:52:06 +0200 Date: Thu, 21 Dec 2023 14:52:05 +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 10:26:03AM +0100, Bartosz Golaszewski wrote: > On Wed, Dec 20, 2023 at 4:28 PM Linus Walleij wrote: > > On Wed, Dec 20, 2023 at 3:03 PM Andy Shevchenko > > wrote: > > > On Tue, Dec 19, 2023 at 09:11:02PM +0100, Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > > > > > extra_checks is only used in a few places. It also depends on > > > > > > > a non-standard DEBUG define one needs to add to the source file. > > > > > > Huh?! > > > > > > What then CONFIG_DEBUG_GPIO is about? > > > > Yeah that is some helper DBrownell added because like me he could > > never figure out how to pass -DDEBUG to a single file on the command > > line and besides gpiolib is several files. I added the same to pinctrl > > to get core debug messages. > > > > I guess Bartosz means extra_checks is == a non-standard DEBUG > > define. I agree on this statement. > 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). > 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. -- With Best Regards, Andy Shevchenko