Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5425324rdb; Wed, 13 Dec 2023 08:16:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXuCahDjAk2Hpgu6DTNZBsMlpkPrZuBQb9tbctUpVkXK6VVu03aqerNDdOKFMMcRuKl99x X-Received: by 2002:a17:903:245:b0:1cc:6cc3:d9ba with SMTP id j5-20020a170903024500b001cc6cc3d9bamr5225906plh.4.1702484201477; Wed, 13 Dec 2023 08:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702484201; cv=none; d=google.com; s=arc-20160816; b=wB092nBafLGcAdrYKtqkBM+duj76Td8JzCs1GtpBQU4b/GV9IV8zTT7gMWjkAqBv25 aDx4mHmW31lP5cv7k4wIetlb+n1QU3iWVbOcPZdoFOwTY7nnlnIpl4rIGLFDqGnzycmb wcIIN3kcxBbZsxQMNp6UVDyZ1kqyCrKgnPVkbpr4VvDuUAGypGBcsSWjvJLzl/p/Rfj8 i5uHIDs2VZ5TtHCwvlzGmd1lNOdBYOl2JRS+ktAhhjQtCkaXHTVmmUJ8txrKGNgN2f3k kSxsEG1BsiLtRcoS1xzZyYHLGKyk3nqklxh8S0rHEhTkkvJFIKeWuReNuJ5jBjQnMw7N 89Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mcK4XOgKqcNfFHL25gziBNAjwVCjjEmkms+6zHPdluY=; fh=LBhGixWNRo11MyGXiSWGCjYvem55ULBjnOqEhpMVKoE=; b=wp7zBDwnuuKF/I0u7uplnoAZT9yCK16J2hxhzaRG2cH/lWKxF4G82ZvpQgqGN3mk/6 Ty8Y7rZr/4LP3+rxC2HsdQOmJPNf7vjaRu/0xa10uhdkALjqxtPSVw8WGRahxyqDj1PD lmWkWIPoDByOyvhbNVoBE8VTmvaizFhi4fbSE/jNdrnhRXv7qFOV4NH+BZy7RzurHsqT 7X0plt4RUfr4k00T0GojZkUnzr8WGltk4cbjDH4QPeS/+3k2oYwtCqsww1AyYCc5IuiZ cA62ccvxxOYlc8fp6ZOvPTQzjGY6h7G1+wErZTWzfDnSDS6h07Ad9Jn5lfa/jGE/nCYN 3jAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=nhnaC05k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 23-20020a630017000000b005c5e276b55esi9520613pga.441.2023.12.13.08.16.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:16:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=nhnaC05k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D7371803FFB4; Wed, 13 Dec 2023 08:16:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233658AbjLMQQY (ORCPT + 99 others); Wed, 13 Dec 2023 11:16:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235318AbjLMQQN (ORCPT ); Wed, 13 Dec 2023 11:16:13 -0500 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D499411F for ; Wed, 13 Dec 2023 08:16:18 -0800 (PST) Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6d9d307a732so5397612a34.1 for ; Wed, 13 Dec 2023 08:16:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1702484178; x=1703088978; 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=mcK4XOgKqcNfFHL25gziBNAjwVCjjEmkms+6zHPdluY=; b=nhnaC05kq3PKokzDucBZksgkSK21xDk6JCUHI+OewuiE27ffxmC0hrFbRLKEWDX8SK Z31fyKLN2G5KBQj1WU9nPfg+Tdj59z1F9h0tEr88feWUnsTctUFMqrA8oghOqtiVmLLX KKS/IjCvt4KRyuq9ijlc0e7GpAUHVCbjEBXYSTzNMyCV1gZgvM0lijTkvaTHP8w2gd2c skXU+RQjtvFk2qQ/smMn0aOciPOsOk0RGh4v9Ofb9n8Asm3k65H7GowC81V0UmXUjT4G VjzY4XEDvz6G3q0K/uhuZ0DOmJAEGv9l29iI09CncCP/uGi918AvJxT+NO7vQSpiSG3e t+lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702484178; x=1703088978; 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=mcK4XOgKqcNfFHL25gziBNAjwVCjjEmkms+6zHPdluY=; b=ZbeKNGJ0DHeGKlF2WZ7U++LU97BjsCj4X5Vj7TgME+81p1hnCBZpqyjRX/jsbovFbX G3Yo2P++JqL60tOfVzlCy5Uh1V8N1wjecBtEw4wMUgX73yIATlujP9xWa9chySwcQpng TUCh39Di2MggOOPQmIz7eY4v/XVSPJf/o8zoZ510TL5EgcQajLTuLrsp57Z3EH3Eh2Tw ilNBLqVXBD9ZDFoNhAGbn1KlIanBVq1w74mXsYJJbPKu9YwrpxRhsV1941LpCzNq/h47 TSkLYjsJZ31NlllkheUE8+0EDitXMVqTIduxQqbuSqeoCgKSOMMxZmzanbPz7mrDvI0U 7ykg== X-Gm-Message-State: AOJu0YxshDI0grjrZHz9Ejj4sOy35CapIKjnCHMmF9yI/lIPDhGwwdFd asP7M84eGjPYcw8aD0lh54pHnf7JGmmexHqz5nTfSg== X-Received: by 2002:a05:6830:1e82:b0:6d9:d4cd:88e with SMTP id n2-20020a0568301e8200b006d9d4cd088emr9023832otr.12.1702484178252; Wed, 13 Dec 2023 08:16:18 -0800 (PST) MIME-Version: 1.0 References: <20231212054253.50094-1-warthog618@gmail.com> <20231212054253.50094-2-warthog618@gmail.com> In-Reply-To: From: Bartosz Golaszewski Date: Wed, 13 Dec 2023 17:16:07 +0100 Message-ID: Subject: Re: [PATCH 1/4] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc To: Kent Gibson Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 08:16:39 -0800 (PST) On Wed, Dec 13, 2023 at 5:15=E2=80=AFPM Kent Gibson = wrote: > > On Wed, Dec 13, 2023 at 04:40:12PM +0100, Bartosz Golaszewski wrote: > > On Wed, Dec 13, 2023 at 3:27=E2=80=AFPM 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! This is precisely why they're so great. Bart > Cheers, > Kent.