Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp775467rdb; Fri, 22 Dec 2023 04:58:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPqzmScjxFu2fgUoQeSiZxeBCU08+ttEL/59wKaC3m4Jk3FJwMMeNRIjYRr2vKYcFW84Lr X-Received: by 2002:a17:906:ca4e:b0:a23:2e9e:1f7c with SMTP id jx14-20020a170906ca4e00b00a232e9e1f7cmr618548ejb.122.1703249934952; Fri, 22 Dec 2023 04:58:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703249934; cv=none; d=google.com; s=arc-20160816; b=OT7YYvhau58MfvKc7zKcIgA1MZFZOzKkLXEv2gG6rTjHISFeB4GfmeogTJRz2bZT1y bm251iojVvzGvH/yG6NSGKJn9pI3g3kr0cMS2iEXvYxyiaOJFszASN1MF3mA37euw4Vp qM2UqVrxI3+qrRfQvsiUZ36wqc/S+HK3IxkWFtnsdZIZlkFK7EWSCuxNPog+OdWC189f MBK07Nzx04hFIYyPcZd08i4thIxpNd3Wg9bRigKubNNRW9d99O7GsUrNw7ujs2lCS7V/ uSUJtjgwNytnRKy/uZcxhNdrK9ApSdVakJGSoX4X4ojftnrgmZjkCXW7EIFX0bBIqwut v7Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=9HjnNbNH2TVinJM34IOYgMM2Kxh5j+hwMU83vJZ9rBI=; fh=18kjfotKR7dbkGBeLRg9AvP1wE7+AQYj3euOTB2gaQo=; b=anDSfhfbqRxr/XOzamFlHF8ScF9Qy3cwX/g5MnihQvPDt5zI5ldyWUliIEknk7xqzE O/nj19Ls14ZYAURToEzynUBKmXsbRdPLUS5JWsDGnM6dHsIxhmExvjV1PGGh1FHVdgCs xAOpUxgMjT9itmphk+ksxBw6/nKqPNLULuh+uYEsbqS3YI0UJ4ojreY4LcYUaFz3SoEA V2vzqa9g5qQtGJSozPXa+DJ3/TL2HGw0/HlSwObQYM10aAB6KBSBfwmCPIbfiahLnVDW xsBJ/T40PiNGFcsqD6/1UjHlNP+bnqtPw5jorH+NpyAPdjD2mswbCfJQXxuzW7PYFGe5 SP6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DTnxdcqI; spf=pass (google.com: domain of linux-kernel+bounces-9731-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b3-20020a17090636c300b00a2335cd0e9bsi1793671ejc.992.2023.12.22.04.58.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:58:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9731-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DTnxdcqI; spf=pass (google.com: domain of linux-kernel+bounces-9731-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id AA33D1F22A75 for ; Fri, 22 Dec 2023 12:58:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9263318C20; Fri, 22 Dec 2023 12:58:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DTnxdcqI" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 A529B1863F; Fri, 22 Dec 2023 12:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1d3eabe9321so12502845ad.2; Fri, 22 Dec 2023 04:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703249923; x=1703854723; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=9HjnNbNH2TVinJM34IOYgMM2Kxh5j+hwMU83vJZ9rBI=; b=DTnxdcqImOHwB7iWELzSs5yC/WL5o5/3POS1vHTygsGImBKEjI4e7JLoP2YqQrQrKK Q8z1hjBK3yXDnFVMGFb7rFNKwWFy/MpcoIeayFPZmoD6M0WrMt3In45FwtsUVgeNEAGY KONz/qV05KLrqR1kPt7MFpQFm+oaIMvPr/vEmVv5safw7EsMqnv7xdic2lzWE8iC+lnz 3uu+Saaa+dmFrqUFXk7/kZBNwpVg1/2P587hijOMQA1i3nL7NoGq5+hQUqv4av+5grMD t+93iQCiPehc4hwuJp+P/E01wpLEl5u7w84J1R6sbkGdjzBg70Q5Rq+ZPOnGhZe0CWdK gqfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703249923; x=1703854723; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9HjnNbNH2TVinJM34IOYgMM2Kxh5j+hwMU83vJZ9rBI=; b=Xlm+3KrFVAu0GVXL+NGZC73Zno3eKOcIoYMIgtCddrO4695MeqOO25RbrcyTwEEY3p 90Rg+fenYST7O48+mTsTiVL2yL7q6XUcJS4afJ2E10QxrmuAIOpCVx2W8XMUpeZlBRcm Nqh/GU6ac3IlX6ffqOu7BLRtR+8WtK5dOQa3cEN/Em12J0G2dHZVyIXsEia9X9DK2D0T Asr/j28T7mTt2F36O/w6/Ey74HAZ44x5IlCpkdArZYzthxQ81nJCOyJFMhVhloNouEsM b7NeTlGfGsi3NsRk0GENLnZdolplYaK/6TJqbO4w9SjyXflzCdx5C6PxXERUYTkLxvBw qGAg== X-Gm-Message-State: AOJu0YwvPEoiWiZSePCwScnjJtZKSMWXuR2ift5FCYzrhYIfPbSo2v5P YnmwezhHwdcmOl8M8qPC94U= X-Received: by 2002:a17:902:7293:b0:1d3:fa3f:6688 with SMTP id d19-20020a170902729300b001d3fa3f6688mr1001796pll.61.1703249922833; Fri, 22 Dec 2023 04:58:42 -0800 (PST) Received: from rigel (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id f3-20020a17090274c300b001cf6453b237sm3385299plt.236.2023.12.22.04.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:58:42 -0800 (PST) Date: Fri, 22 Dec 2023 20:58:37 +0800 From: Kent Gibson To: Andy Shevchenko Cc: Bartosz Golaszewski , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij Subject: Re: [PATCH v1 1/1] gpiolib: cdev: Split line_get_debounce_period() and use Message-ID: References: <20231221175527.2814506-1-andriy.shevchenko@linux.intel.com> 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: On Fri, Dec 22, 2023 at 02:40:59PM +0200, Andy Shevchenko wrote: > On Fri, Dec 22, 2023 at 09:58:48AM +0100, Bartosz Golaszewski wrote: > > On Fri, Dec 22, 2023 at 2:12 AM 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. > > > > > > > Yeah, sorry but NAK. READ_ONCE() is well known and tells you what the > > code does. Arbitrary line_get_debounce_period() makes me have to look > > it up. > > We have setter, but not getter. It looks confusing, more over, the setter makes > much more than just set. Hence another way to solve this is make clear (by > changing name) that the setter is not _just_ a setter. > As I mentioned elsewhere, the side effects of the setter are irrelevant to the caller, so from their point of view it is _just_ a setter. Calling it something else would actually be more confusing. Cheers, Kent.