Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp799673rdb; Fri, 22 Dec 2023 05:38:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMlpsJhfX6RmwncsX4o8ypjaEkXj/RsoIBrePoiz9RFCctZ/+NchdNi4A+YgdMBZmVq98i X-Received: by 2002:a05:6e02:1aac:b0:35d:5d42:ba2b with SMTP id l12-20020a056e021aac00b0035d5d42ba2bmr1843330ilv.8.1703252285784; Fri, 22 Dec 2023 05:38:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703252285; cv=none; d=google.com; s=arc-20160816; b=gnYhX02CKc3a17EPVqQxXnTW5jQuEOzfk6B+/vyc3QalSMHiHKnjucNFIsu4FMgcbT a0TKs9HCevpzsSbXRO8+Clkx9jMemCYjHFteDaOnua63+xzZMzpYRjuPfQGCoszQjobk EBBMo9o4RbP9E/ntRj8fRtE104d+ytc1E7ZtbFO7L4UCyE774NfL9SzG5b3BL0T/sIZP MtELr0T2au+vknigJ66KnrttIlv3RjBCF9g1MDbvM5t4mQk+gNa8+JI3UTRZN2rzLLxm J7DFT54Iutf0LUvvWItSuKRxTvknxFlYIoa37yu2cDSiwRljugEl111kgLeiTJwBLt7x rACg== 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=yQffPd79rIlvwIW5ad4ad+UYT5D5mESBoYPE78zPUCU=; fh=sxlvwpd+36WjgT7PushYZmRqE6khRCk+SkI4A+OMj4U=; b=0Fo3NMUJd9DGJsz3Uk9n6wS+ZCnXI4+fcQ8JnOEW9GwM2iuZT/aooYqdRs8WlEo+Th YCgkEB+VY95nmzxJpDuE6Q7B9BHBb/1vNTmkkHyZiy04x0wllJx5ujdSWVH/4Ht5xnxn XXJy/xW+VktUQu3FRijx7lryhidBgCxlxvXoniP05zB2i+1qlm2JtYL4pXT173+Gycxv bFKGl1ER+PgAXaRCjW4mO80ETtO+ZF/oFCXubXF7Q7f7HndH83kBYytvcF+6EEdWE09N qiJVx799Kcr6hG28vSjo8HS1GG7SDGrolTz8ZqaK1FviurX7kKMRtWafCjfn17wzjlfs o4cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=IsUy6xnn; spf=pass (google.com: domain of linux-kernel+bounces-9759-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9759-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q5-20020a170902a3c500b001d36c48be58si3183587plb.86.2023.12.22.05.38.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 05:38:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9759-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=IsUy6xnn; spf=pass (google.com: domain of linux-kernel+bounces-9759-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9759-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 48DF52831BD for ; Fri, 22 Dec 2023 13:38:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63390199CE; Fri, 22 Dec 2023 13:37:58 +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="IsUy6xnn" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (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 E54E418E35 for ; Fri, 22 Dec 2023 13:37:55 +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-yw1-f169.google.com with SMTP id 00721157ae682-5e7f0bf46a2so19074797b3.1 for ; Fri, 22 Dec 2023 05:37:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1703252275; x=1703857075; 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=yQffPd79rIlvwIW5ad4ad+UYT5D5mESBoYPE78zPUCU=; b=IsUy6xnn57TKMwHAtg7yNBePLwU6r3l7Z5W6UIS3YkU1Ts9SCiTnaXTNSNZSEFo1/K uwD8GP+xsHN2bh1N4Z9E+1OY+LUMQLwp3aEW6IbEwNKUVSwfmtj51yrRuUmt2mstWws+ nH/lgIsC+k52/J9n6FpzRYg8PtYA1w9IJ9VxsYl0mJT933o4s7/di5A2JGgdPvrxMxaY hOoYj9vkH4+9HpLPe+grIvI5in0NyAOC+qKwEitmRWK2gM6/uUXZtdq1fn3amZU6CKhq 7NzFy3gMNwAt/1T5pyzex+YPG1OI5/GmAE7Q+y+YKLUSQ0zPDt8vbk0JSK+nN+im/HTf AY2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703252275; x=1703857075; 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=yQffPd79rIlvwIW5ad4ad+UYT5D5mESBoYPE78zPUCU=; b=f11TVP6Z+/5+XbMav2IgVNPdYuClfGuXS6DHH+MFfq1POnUZmyMvid0eGj2/wAi+RI iYkuTDkikLTEn6SyxSmuw4yGXoKieAuASbb3p/UNm4RgcfuwAx5o0UQQBwXZRBFtD8Ts viyhIxMI7akGxE0QSzXIUmjGyBanAaCNBH5347xaOl0oRJt3hf/rMFBjvohiVsmTFDjX 6LhdG6OHhdN4hLEMlW3LiHGGCz+iJ2prvNh+iddjeUXmEvXqW58fuTEBIuYuRIJuvZ2f GD/FNbByVAHXcmcPzZU37EcfJ9gApfPxaY2UcCFBEsYRXvb16mW0BjuQFELVJiOxAV3B UosA== X-Gm-Message-State: AOJu0YwXihEFwq2Cptu0pGCYOw3F3MOm+jjdC6tg/MEugk/UwYCernkR C/iR2uiD0PZJ7oCY41qqFoFVa+yGgCIcQiLaXR/JpXLvMPIoBQ== X-Received: by 2002:a81:6d0f:0:b0:5e8:91f2:baa1 with SMTP id i15-20020a816d0f000000b005e891f2baa1mr1415927ywc.6.1703252274783; Fri, 22 Dec 2023 05:37:54 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231221175527.2814506-1-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Bartosz Golaszewski Date: Fri, 22 Dec 2023 14:37:43 +0100 Message-ID: Subject: Re: [PATCH v1 1/1] gpiolib: cdev: Split line_get_debounce_period() and use To: Kent Gibson Cc: Andy Shevchenko , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 22, 2023 at 1:56=E2=80=AFPM Kent Gibson = wrote: > > On Fri, Dec 22, 2023 at 02:39:38PM +0200, Andy Shevchenko wrote: > > On Fri, Dec 22, 2023 at 09:12:37AM +0800, Kent Gibson wrote: > > > On Thu, Dec 21, 2023 at 07:55:27PM +0200, Andy Shevchenko wrote: > > > > Instead of repeating the same code and reduce possible miss > > > > of READ_ONCE(), split line_get_debounce_period() heler out > > > > and use in the existing cases. > > > > > > > > > > helper > > > > > > Not a fan of this change. > > > > > > So using READ_ONCE() is repeating code?? > > > > Yes. Because one may forget about it. > > Just as one may forget to use your wrapper. > This argument is a NULL - so I'll just forget about it. > > > > > > Doesn't providing a wrapper around READ_ONCE() just rename that repit= ition? > > > What of all the other uses of READ_ONCE() in cdev (and there are a lo= t) - > > > why pick on debounce_period? > > > > Because you have a setter, but getter. Inconsistency. > > > > But then "for consistency" ALL the struct line fields require accessors > and mutators. That path is insanity. > > The setter is there as setting the value now has side effects - none of > which are visible to the caller, hence the usage of the standard > setter name. > You are siggesting every function name describe everything the function > does? > > And, in case you've forgotten, YOU REVIEWED THIS. > > > > The line_set_debounce_period() is necessary as the set is now a > > > multi-step process as it can impact whether the line is contained > > > in the supinfo_tree. The get is just a get. > > > > > > And you could've included me in the Cc so I didn't just find it by > > > accident. > > > > Maybe it's time to add you to the MAINTAINERS for this file as a design= ated > > reviewer? > > > > You are patching my recent change that you yourself reviewed only days > ago. I would think that you would Cc me whether I were a maintainer or > not as I'm very likely to have relevant feedback. On that note: do you see yourself as a full GPIO reviewer or do you prefer I split out the uAPI part into a separate section in MAINTAINERS and nominate you as its maintainer? Bart > > Cheers, > Kent.