Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5431583rdb; Wed, 13 Dec 2023 08:27:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWdhTvZh2GnWHSFPPoV3cv9456ZxxELPcvr5KBfR2g8MLYrAru0rlL9D/09+hWZ42HcVnA X-Received: by 2002:a17:90b:2688:b0:280:4ec6:97e9 with SMTP id pl8-20020a17090b268800b002804ec697e9mr6191083pjb.30.1702484845878; Wed, 13 Dec 2023 08:27:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702484845; cv=none; d=google.com; s=arc-20160816; b=KnRXaoVDL1XJxCo+H+ywg5TA77OVDCzsEMt5JQ25BilHTEmqJg5LGk83sOOzZW3mZU 0f2N14H9kpzDqsRzXfkYVO/n+Ss4vHJ+7fCyFXKxW/b4vEEyh5PEtoxn3zMqGjcktmm1 8AqfRgqCkqsAZoxBr2TPj2YQnU74d7C431aWW9abVRQZ7R9ng81N8sUg84lhNlxojoIx 8tNmAR1vIMueltH2eWck42seXRQBhnyaVBu4XnF9hIvOzNujPhAmW9QzIMGbk05Wr3w7 X6ZLHtDwtdaNJRv7cHrTVMO4mvHmxoMLpKvzzRBgs7zBo5XdHV/iGbKe9AemHHCoa1gy a2vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wTfya/dXzDXZfGoKZVoYyYftxDOjr/RelAuumNZveg4=; fh=uibF7Rpw8M3HrAOf/+C5LZJ5s3wA2NKuQJDWE3CxQwk=; b=nvez+ejDis9qxDkPNJobvdWhI/Ty03Kn/pIwohn8gO5Ic0TKvdgDGSQvfcWQJ2lmY/ at3pRSRwE4+ymjCk6d09RaOoKy61O6wAZdpKLld2SdTPW4TjE5c4Rbe1bqobs2/oxKAS NybYT40jxn7HfCiRPR5uwe+hJpYYM0daN2Fmef5AmTm59N7sDVL2NjvLsTY4xwylFOMi x3gqDEDlYvRpvHzrb2VxbsRLnnYthuklKGNgY2LdIG6IX5Y1uHmh1OIiBBsOXfXAog1F qIeu9adNU932cx2iBWlu7WiRxnMzB+Q3+D5enHeBb19NIwy3zHmVpBzOt3Z6Qoe8oHNM 6DeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bj22-20020a17090b089600b0028ad3c73e67si2104739pjb.102.2023.12.13.08.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:27:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9AB8C822A4B1; Wed, 13 Dec 2023 08:27:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233087AbjLMQ1K (ORCPT + 99 others); Wed, 13 Dec 2023 11:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232736AbjLMQ1J (ORCPT ); Wed, 13 Dec 2023 11:27:09 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BFD783; Wed, 13 Dec 2023 08:27:16 -0800 (PST) X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="375140168" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="375140168" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 08:27:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="777563600" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="777563600" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 08:27:12 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rDS4l-00000005ZXT-2mfP; Wed, 13 Dec 2023 18:27:11 +0200 Date: Wed, 13 Dec 2023 18:27:11 +0200 From: Andy Shevchenko To: Kent Gibson Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org Subject: Re: [PATCH 1/4] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc Message-ID: References: <20231212054253.50094-1-warthog618@gmail.com> <20231212054253.50094-2-warthog618@gmail.com> 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 X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 08:27:23 -0800 (PST) On Thu, Dec 14, 2023 at 12:15:10AM +0800, Kent Gibson wrote: > On Wed, Dec 13, 2023 at 04:40:12PM +0100, Bartosz Golaszewski wrote: > > On Wed, Dec 13, 2023 at 3:27 PM Kent Gibson wrote: > > > > > > > > +out_unlock: > > > > > + spin_unlock(&supinfo.lock); > > > > > > > > No use of cleanup.h? > > > > > > Again, that is new to me, so no not yet. > > > > Yep, please use a guard, they're awesome. :) > > Before I go nuts and switch everything over, is it ok to put a return > within the scoped_guard - it will automatically unlock on the way out? Yes, should do that. -- With Best Regards, Andy Shevchenko