Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp766700rdb; Fri, 22 Dec 2023 04:39:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOJnS5TGZBCL2ns32OCgDlVy0YCerfsb8LH2WHllawba2k09IiswQgk77+Qp+aqFya3mCc X-Received: by 2002:a05:6214:acd:b0:67a:c4d9:dc0e with SMTP id g13-20020a0562140acd00b0067ac4d9dc0emr1464398qvi.70.1703248799720; Fri, 22 Dec 2023 04:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703248799; cv=none; d=google.com; s=arc-20160816; b=T4qWfsZ1iPwsV2SuSxDbPx84mHaTX030E/b8TyMLyWtp5vTaHo+rgDOyWYhHlTPvpm f7NZEpWNrM55r31mpnU1Xx7d/G04zxEBLMXvYP5nW9Tt39Fa0GESa7Pjvk4dzNyHHqO0 qScSdkohwVScTOpg5DnIj4ZVPU9FInnGLAtyGlWvfi8eD4dsAptv/pq3tQITAeH4Gm4U JQt4490xnWDUHygPAn+tsNdoBPgVcKZiEFwtpfprmofVV934IDOGqcRcSSirkMnYt9vk 3P/usFmWxQxXhPoUzXlT702iG2D6vjqm2NZWR8kPOZBcxYmN7qXWhD7LmHV86t/CY3Iz KbNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=yVWgp67mWCflJKaSGoBtEtNh6aBigdgcv/cESp8oraY=; fh=1DgAuBF46JqacuU0Ft7cMykqepefzM64CzSi+W+XMWo=; b=AXpTei90n6TIdbQI+2SSiyhsBrirpqc5BYwqSitV//8CXeR7kv9LVOmZpE3i86IOxy y5dDYw6B7qttISKlMYsijTmjqhx9AVdOdQhhd8A2C9HiRgOuFdZy8In7YnECqVXbM62J sv1lUCmoX4wVfaZTxWP9k59eQRia4kxXOQYzcDL/gH3TVK6CX0UyTVk/eMTGDxpRyuDX lHehWrflg0Iowtg7AnXyHrxGDGC8/uYdTCOOJ9JivQjLza1nF2IDy8g06XQgsMPydzav e9JtR+3oRSoNrk0fQDLbpTjIIfID7aig+2YyHIg/AxWUdGujrWgXNR3eWNrAYFJ5cZYe 04AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fw2tCvjq; spf=pass (google.com: domain of linux-kernel+bounces-9713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l3-20020a0ce083000000b0067f753c0f73si4381358qvk.278.2023.12.22.04.39.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:39:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9713-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=@intel.com header.s=Intel header.b=fw2tCvjq; spf=pass (google.com: domain of linux-kernel+bounces-9713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9713-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DC8091C23E60 for ; Fri, 22 Dec 2023 12:39:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74852182C1; Fri, 22 Dec 2023 12:39:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fw2tCvjq" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 7375F1805E; Fri, 22 Dec 2023 12:39:43 +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=1703248783; x=1734784783; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4jzU/jOI7fcuTOLcNvkWp28yln/orfWdR4vIx47zvaM=; b=fw2tCvjqN2+jKslhF18/Z+52QGQa1dI1ktdk0Oq9KN0XqJdWxQFfUNfK GrokKCPxtikZWU3k6JscCIsB+1LsCEQ/Frql+NWOqsVv3fbkPpNX5k4y2 T7NPcm52Am/jQr53SQD0liGQum+oQhDefz2rVzhmrDWCa98K4UEsbIO4p zvFM3oV4PwU0AxeFfxExkCEZ+6wEdO/3I7mHziafXRsnUtEHjB2o6cIxy /+i0RQkTI3I21qTThxC4Mo9PpGvWR4xiM2GdveZFs/wTSuqOgF8yaGJPD Sgyg/spukaY3JAYrcTEjSKASbIB2jctyzcpOZud4mtqJFWGRU9hjT0E2E A==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="3196402" X-IronPort-AV: E=Sophos;i="6.04,296,1695711600"; d="scan'208";a="3196402" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 04:39:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="950265472" X-IronPort-AV: E=Sophos;i="6.04,296,1695711600"; d="scan'208";a="950265472" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 04:39:41 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rGeoU-0000000890A-2iUd; Fri, 22 Dec 2023 14:39:38 +0200 Date: Fri, 22 Dec 2023 14:39:38 +0200 From: Andy Shevchenko To: Kent Gibson Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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. > Doesn't providing a wrapper around READ_ONCE() just rename that repitition? > What of all the other uses of READ_ONCE() in cdev (and there are a lot) - > why pick on debounce_period? Because you have a setter, but getter. Inconsistency. > 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 designated reviewer? -- With Best Regards, Andy Shevchenko