Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp287814rdb; Sat, 19 Aug 2023 01:35:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtiNhXgNFz7si6e73ArLzkMLXK/6hDC/RS2tc0IG/tIDZaCCdJBIKmGb1lO+EVXfE2jv9b X-Received: by 2002:a05:6a20:3941:b0:111:a0e5:d2b7 with SMTP id r1-20020a056a20394100b00111a0e5d2b7mr1894080pzg.4.1692434114530; Sat, 19 Aug 2023 01:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692434114; cv=none; d=google.com; s=arc-20160816; b=rhcYkVGci5GuzFqu4p/tnhwCT06UYnQcZxLLuC4Z9ImVaw7Fk3GXNpIEx0qGvFlhH6 1tWc9TPmElXOoXY5c5Lt/2ngXdwr11S204U9xnWkJz7yLW6DDdwqRPgzI4fTFhpDgsO0 lyDoXhkH6FrS2qdkRQSSI9SpCPTYFoFJ0vWq3JUbWlGyPx//tOFDztc8ewgjQCm1zkjR kbTMNXoBMW7523mHRGyKj9fVuylHHFwXyZy0PXvKbsCDpuQxc+awKn0hxIXzYQt2VVoL ddlx+m8u/6cc/+IlI79SyBqTsAttbg0ZH96Zq1csuYfxTTjzVDqm3ng4SQ/AIGWQJR/N IFmQ== 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=tXuX+XLRKUCBgIrTdnNUChHqV7gJDCGrxnwU80goqho=; fh=obpesaWM0gStjq/gKr4WYdDyZcXoaIW3xkDJY+AS2eY=; b=uroHdu9XuiJNrh7epA1Z5zJhjXl2w7K63+O2+ltF7w4TkXniGt7Z0Fi3j1cwKaVoml ISi8GDuf7MiRfu2bY3Y+5PNQCgZOAvhASidVFeTLrfff6Upn2WgeSm2w72PfitHlaY3b 9+vZxLdR1I+IPH3zoRFZqAcXvOCxP7Yj0lg2vvC9rN2Ywm6gPObfNFLUzCOodEPAXOzG sRYS+U3UAHVVAPQRQBAOTjBaCwquey45Al6xQGOQpYa2pDjy6LzSdLJZtA1ZlwC6q/7h 3kzUkdd3QHIEWDyIKTeyVN6eYBatqVoNw2mGGN0VIcAmKRQzTud06bFQlGNK3DoQMl+2 Gi7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=O93rRiNU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b25-20020a656699000000b005636b73510fsi3013010pgw.493.2023.08.19.01.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 01:35:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=O93rRiNU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B8BE59EE; Sat, 19 Aug 2023 01:24:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231392AbjHNQ3l (ORCPT + 99 others); Mon, 14 Aug 2023 12:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230320AbjHNQ3O (ORCPT ); Mon, 14 Aug 2023 12:29:14 -0400 Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13015E62; Mon, 14 Aug 2023 09:29:13 -0700 (PDT) Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-56ca9a337caso2890548eaf.1; Mon, 14 Aug 2023 09:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692030552; x=1692635352; 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=tXuX+XLRKUCBgIrTdnNUChHqV7gJDCGrxnwU80goqho=; b=O93rRiNUHIGp7UPWQ8raXqlVPwGmvzNLTJ6VVFT7DPJf4FXXYUzU+NdCC3Q4xAH4Nm 4D0qUaEYTeFyXf8FMw1QknFxGAo1g92THDSigH1U+n4yKX5avGZDiwCCg+rtq3yyX7Ho uySX1U7J5mgiCD9CVZlfG93GOr9asSh3yEote3AgeA2isl6nQLZXwiC0HlNGp6R1yOrH Crn5+2tLU0CV06kvgYLrtUa0NigLVkvfhwnDTRNu4YlIZjLrcTg19i7YDjlJOAfkj2JD YXJ7x2SP0yshVKdzw3xVTj+s2WyxEV56WCh94XMIM3vbZwC6QUiZH5BlKbv9SdT3Yd3+ 4lLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030552; x=1692635352; 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=tXuX+XLRKUCBgIrTdnNUChHqV7gJDCGrxnwU80goqho=; b=lhNnSiNKZQoWwVQGv5M+G3G30vkhZTmsKKph4HEIFTl1OYQZ6ohEtM0yj9v83k4X4A 8Dcw6GU2yfctIADPd3PVLKmb1Ik6BfBWwtAUHuzRgaO+XQCMpj+bMg7R26GfG2QNNRra 2NQlbp/h0vin9Oz6ZPv80WUQAtGG8ZKWdlUbFxb1tHHXXA0wNC7tg3g2sZEXTkyZ2QxG /1TL+6bA0xnt9+tDxPyzxrZJ5oUoUMmpTYBW3wsHcD/A18YiEUKA5y8swaMHXuZljqi5 qthiEiG0GuDr9hn030n5dUZ3WMSCC8B8lndm+v6i9TpMwmLXev6oNKfuvETEX1ldkDJ8 cxrw== X-Gm-Message-State: AOJu0YxpKrA7hJ3suuhwbc95waIgGYIIiyTWrORJpnxhOXMJMU58LfO3 j02Q11uWUVl8QMIuaLsHHQhaDe9CMvu0uLpWnK8= X-Received: by 2002:a4a:2a1d:0:b0:56c:e747:4609 with SMTP id k29-20020a4a2a1d000000b0056ce7474609mr7457520oof.7.1692030552269; Mon, 14 Aug 2023 09:29:12 -0700 (PDT) MIME-Version: 1.0 References: <20230814112615.42448-1-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 14 Aug 2023 19:28:36 +0300 Message-ID: Subject: Re: [PATCH v1 1/1] gpiolib: sysfs: Do unexport GPIO when user asks for it To: Bartosz Golaszewski Cc: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Andy Shevchenko , =?UTF-8?B?TWFyZWsgQmVow7pu?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 14, 2023 at 7:13=E2=80=AFPM Bartosz Golaszewski = wrote: > On Mon, Aug 14, 2023 at 1:19=E2=80=AFPM Andy Shevchenko > wrote: > > > > It seems that sysfs interface implicitly relied on the gpiod_free() > > to unexport the line. This is not good and prone to regressions. > > Fix it by explicitly calling gpiod_unexport(). > > > > I wouldn't say it's prone to regressions, it's literally just that > gpiod_free() should not deal with sysfs. > > How about that for commit message (I can change it when applying): > > It seems that sysfs interface implicitly relied on the gpiod_free() > to unexport the line. This is logically incorrect as core gpiolib should > not deal with sysfs so instead of restoring it, let's call gpiod_unexport= () > from sysfs code. I'm fine with it, go ahead and apply with the change. Thank you! --=20 With Best Regards, Andy Shevchenko