Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp129253rdb; Thu, 21 Dec 2023 05:02:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqsrvw0S9+a4/6AK+imhs+6x7KVtTqkDtNjjC5/m3sncvTzYTV8sC2X2N518nhJVSO7Ihw X-Received: by 2002:a05:6808:151f:b0:3b8:b063:664d with SMTP id u31-20020a056808151f00b003b8b063664dmr21169972oiw.68.1703163774589; Thu, 21 Dec 2023 05:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163774; cv=none; d=google.com; s=arc-20160816; b=0cm5pc9b4b8UeCLydCSFCzBRCuKq456VDVWDGpVnhZuZyny9Q1xDa+DppaeMcA9aTl tRPcXfqMW+IaOpzeoneBgYYWtLclhofbpH765cAJWnXKRMcOiQPR2DQAabeglishIXWT Rz7J4ops9R9qKXxBgIoffttOz1yRk0RPfxSdWRM+2J4pudRaojFyJ1yIB5TkFsCgiMPE xXYBvrlYnquekP4ocDLW9ktF2qmHAY2gknhUFnslX3DgWykGulRWRZcsGkVlDH+tFw1X JaJ6LhmqG+FG9I7PKFaKW5Ar/KwxhXvm23tAa7RYDF5Yknfr/NvflzSMpSbVsuQxsmuY Bw3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=kiJR7zOQcvwlFGaNEo47xsUGjO0IgSM5buQ6dPTuemc=; fh=NA2IZTsBFwjREUcds8Nt2e3faPWWUm3ShfnoxYpp9Xc=; b=aaGuCk4fzpbMdf+vsva99GA+3b0f96n5bvwtY/aSkkrqRO8Ll2ggPoBbdANpjPVUqb qmE2RqWsSwMUHEc7Wx0u0tvRzVroG6PtePtCBEWxRJ+zw+cZr6ihR4EGbUzFYuv4lcwg o1tu0GGh7FJxEVyk4vAs30uOWn56rUqWuYD4oon5AT0bz+7w2T3ssFXgPmODRJJqosaD /cA8e+WDsY959W7xIdpCw53CscZCifVkMrjfEo5W69pRxaudWbsWoGfdRc3XFpf9i2ks eQqbMezNG4fzXqhjfvS6czMGK7mj5y5g135kfcHSENrqvtnZYyY/as38zj/vrfSRRID3 kGGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=vG5uM4kD; spf=pass (google.com: domain of linux-kernel+bounces-8418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8418-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l11-20020a056102316b00b0046684e57eefsi217808vsm.449.2023.12.21.05.02.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:02:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=vG5uM4kD; spf=pass (google.com: domain of linux-kernel+bounces-8418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8418-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4ECDD1C25A60 for ; Thu, 21 Dec 2023 13:02:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA82476DC7; Thu, 21 Dec 2023 13:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="vG5uM4kD" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3F9173198 for ; Thu, 21 Dec 2023 13:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-vk1-f170.google.com with SMTP id 71dfb90a1353d-4b6c387d7ffso130369e0c.0 for ; Thu, 21 Dec 2023 05:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1703163650; x=1703768450; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kiJR7zOQcvwlFGaNEo47xsUGjO0IgSM5buQ6dPTuemc=; b=vG5uM4kDk0c6hJl7SUui41i0IXZ6ZJSZrgDOrKmVcSwFp1Abrs0ByVOIb3S0UE8xd9 rf9GLcxMiNWbxwOiZf8dsALbLX4hLsG47NO96HEi8ZPrGOv8qV8Gb6WLtX/pIDgG0Ofo guK1i/ClfjXaeNcZuxY0NYxOC9wxviU0+Mmuoi4nrBDJBUot7VlNdqdmRUIId66+qbBB HMWToRMSbrvNTofOBCPvP2L3jvi+ljuV30L+L6axHszUmX5p1lhIaQt8D2osYiM8srwk I8AGVk/j5ml2Vgzn4kthjKRJwUYwCo2XTUUV+0O4Shp/ONd1M6J8gEIDwGKSyBxYztjm Ez2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703163650; x=1703768450; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kiJR7zOQcvwlFGaNEo47xsUGjO0IgSM5buQ6dPTuemc=; b=bFS61zotLhVwSaIjgPKjN9bU7RT6XfqTDEEejYN6OT3z/sn9pZ2kvTwZVdca5SR270 m/muCcZe/6DrWqU+yrTJusFhodTXGtqM+gYdbDKmjAV+VjG+pHG4K1WWBGMnRbtV5EW7 +bfc9VhdmQd+rBK2X9LgGID7snFyzE2bxNx1nyx0qVbdbVEd/EMG9+sImchGbILLgK6E Kz2xb6EV6KOpOhConmex1DUlbmLEL39JTY7RyFEkxlye5h29D6qgaOAEcd6lv0zVDYML oaNhCzM/PlLi3Etjq/M+p7D6Mk3abzaxv0zP+iKNM2OyA63VNkTLSxikFZqL5nluLfZU g0rg== X-Gm-Message-State: AOJu0Yxgu0mgLJ8+tiinrwLzTgcEGqUJgRO14WrKSM3F0GfzyTuD/ADJ KLOk2dfEfUNgnz5/bLOLdZZFrBOtzBGB7alY6Vvf6w== X-Received: by 2002:a05:6122:459d:b0:4b6:c771:47e8 with SMTP id de29-20020a056122459d00b004b6c77147e8mr476742vkb.20.1703163649751; Thu, 21 Dec 2023 05:00:49 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219201102.41639-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 21 Dec 2023 14:00:39 +0100 Message-ID: Subject: Re: [RFC PATCH] gpiolib: remove extra_checks To: Andy Shevchenko Cc: Linus Walleij , Kent Gibson , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 21, 2023 at 1:52=E2=80=AFPM Andy Shevchenko wrote: > > On Thu, Dec 21, 2023 at 10:26:03AM +0100, Bartosz Golaszewski wrote: > > On Wed, Dec 20, 2023 at 4:28=E2=80=AFPM Linus Walleij wrote: > > > On Wed, Dec 20, 2023 at 3:03=E2=80=AFPM 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 pinctr= l > > > to get core debug messages. > > > > > > I guess Bartosz means extra_checks is =3D=3D 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). > 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. > > 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. Bart > -- > With Best Regards, > Andy Shevchenko > >