Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1624696rdb; Mon, 2 Oct 2023 16:05:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxLNAom/Ogw7qB3tPw/eXw7ab5nBbaR+P3GoOXSICdJUZr4UxPjuoyICI2I36BmJcgRdSU X-Received: by 2002:a25:7609:0:b0:d12:d6e4:a08b with SMTP id r9-20020a257609000000b00d12d6e4a08bmr12159201ybc.22.1696287937408; Mon, 02 Oct 2023 16:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696287937; cv=none; d=google.com; s=arc-20160816; b=ZVz/Aea9bwgnljo7ONeHke2U0NXXNLwDpBOTGilYORoFlmO/NSsp/ionvapDQh0wIJ usI6X+Q9OV6dt7Aar8Rh6pv2kmypnc1Cn5Mklyc7ZfmHwtsouYpn6wD0sE1oFnPo6gRJ Npf2OMiTBT+2SOMNkFfZJJd6fJrSL/1SieTNgJ/IgSUYsjBiLkGvqF4jApTAiwBfZ1hh BOB6nU45LCMkltWQO43y8DjgtsCXeL09ioWgqb4xl1lGPwPjU/1Nqh7x3e07rcOSJ7Lp Cb+iIFPrZHok7Kk+JH5m0juWJP++4zVl6tqkq+WFdbD5yUrhEcXSEpVaONc8JBIu89EA dMZw== 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=T4s3u9gzn1fY4vQKJrXTM8R1Ev3FuIqlDuJZ92Kxk4Y=; fh=bD0irRExCR9U/CdLuI02LRr7jOWxzGkti19Icxfbv34=; b=Ah7RP9wnoNG5rWnZbVuWzIvAUkLh6s4eGJovKY1JarUybLyBl6iGT9KYuOAa71zGwk aO7fAg/Fe2yQNRSJycWSyuQa3u3iylZsP5p5FdLxroN7AXgJik8he+y+2n44CPCOTg3A LnkMrlvMMtjzEOZ5L8jXPlh1bXJkM21/81fbNVDHGHdbU3KgOyVEzJHeTZHlp/brCOYS JzQuKFQkLbm8nyyWw3wRb5FL65MUfVfUSt4zcYB4eyAMsuc7Lg0aWHg9fS/pwkwi7GXE eyTCWoKUSrxxjqbTn42ij3L9H89KAeflS3XGSPVs0cAjjUjf0/WAwtuMZlPEqvTKOBEU G+mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=ZsAYgIOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e26-20020a63545a000000b00578bab760desi28626875pgm.278.2023.10.02.16.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 16:05:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=ZsAYgIOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 460D6804C531; Mon, 2 Oct 2023 10:10:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbjJBRKB (ORCPT + 99 others); Mon, 2 Oct 2023 13:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238039AbjJBRKA (ORCPT ); Mon, 2 Oct 2023 13:10:00 -0400 Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03347AD for ; Mon, 2 Oct 2023 10:09:58 -0700 (PDT) Received: by mail-vs1-xe33.google.com with SMTP id ada2fe7eead31-452951b27d0so9945137.2 for ; Mon, 02 Oct 2023 10:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696266597; x=1696871397; 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=T4s3u9gzn1fY4vQKJrXTM8R1Ev3FuIqlDuJZ92Kxk4Y=; b=ZsAYgIOfMblc0IodGrr3B3ZWhxqMurkYeXj4klpS7u1iuGrNPsb8myNa2Vcn3KAIU8 s9d6OEScFyeZARlEAiAVGg9XavxpjwWDkLQqtJ35MmgHRr0aqDDIpQMkXnxXWOiBdaSY bFCWoOUxY+fpd3JyTiNsTw4+x9ysA80crX1xQ6wibdli4LLpRk5u79hH8Ln87cbqnE01 yViIH7pqu5TfsnpDsFgxRXLyA1a/MkyXjUJ7EoZA8ooF7T2EsqwJdVJEVms7gshxfKUy hugAXwLcEYwRMrT/KE5bwHPJ5NpNreFikZW/3VH6xEnzey2PwCBvj2tS6TO0Up9qinQZ 2rEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696266597; x=1696871397; 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=T4s3u9gzn1fY4vQKJrXTM8R1Ev3FuIqlDuJZ92Kxk4Y=; b=w2uHBOgLQ0vJxWS4DnSH1CLDuR3wi4sODtcMEtIiCCrX4tP8oGJoQYgd21YBvkMWTp w7r8FIZ0B0PMYz0zcWhYSWTUtm+oOsucVwPu/3IlnzGvtgYZImYUFQ4jaa67g9tDbch6 gtOr9iU/YbhUHBEwr/5zaQKCoGt/ORF0oA4k2pkrOTF3LeWeB5u4MZAMfYURdAQEPC6I Kky5mE5GlJMUDa/y+4iCTc/PMycO1krGYQNxzFQRYCzqHn2Fo36Er6o5w7kvzGi6vY1M aGUyC8pDaCEKAC4pUqT5+tMNE7htpSSty3HP7AcajYVeVUDe7vxdtQ/zxZwC64Q3QTKr 9jmQ== X-Gm-Message-State: AOJu0YzzARNlWDi8/lHgI62zxKDfdzlzNFWuHCjLiQPHMese2ttdBHPM m9zk4siaKCn+b4aiZP5SZrnhXWadkBnyC8YN6s3qgw== X-Received: by 2002:a05:6102:109:b0:452:5a95:16a with SMTP id z9-20020a056102010900b004525a95016amr10676892vsq.1.1696266596905; Mon, 02 Oct 2023 10:09:56 -0700 (PDT) MIME-Version: 1.0 References: <20231001-pxa-gpio-v4-0-0f3b975e6ed5@skole.hr> <20231001-pxa-gpio-v4-5-0f3b975e6ed5@skole.hr> <4528128.LvFx2qVVIh@radijator> In-Reply-To: <4528128.LvFx2qVVIh@radijator> From: Bartosz Golaszewski Date: Mon, 2 Oct 2023 19:09:45 +0200 Message-ID: Subject: Re: [PATCH RFC v4 5/6] ARM: pxa: Convert gumstix Bluetooth to GPIO descriptors To: =?UTF-8?Q?Duje_Mihanovi=C4=87?= Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Linus Walleij , Andy Shevchenko , Dmitry Torokhov , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-spi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 10:10:03 -0700 (PDT) On Mon, Oct 2, 2023 at 4:53=E2=80=AFPM Duje Mihanovi=C4=87 wrote: > > On Monday, October 2, 2023 9:42:52 AM CEST Bartosz Golaszewski wrote: > > This changes the way this code works. You release the descriptor here, > > it returns to the driver and can be re-requested by someone else. Its > > value is also not guaranteed to remain as "active". Is this what you > > want? > > Good point. Is it enough to not call gpiod_put() at the end or is it nece= ssary > to use a static gpio_desc instead of a local one? > Technically it's enough to not put it. It will live on but the reference will be leaked and most likely this will be reported by kmemleak. So static desc would make more sense. Bart