Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3344244rdh; Mon, 27 Nov 2023 11:44:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyJZEutK/Rlqozr3nxvlv8OOxHcpHSHVRKQnTD1isHdMWEAqwp8rW8MzEe+qdO+79Tj3op X-Received: by 2002:a05:6a21:3293:b0:18b:3c54:e6d8 with SMTP id yt19-20020a056a21329300b0018b3c54e6d8mr12429449pzb.39.1701114298844; Mon, 27 Nov 2023 11:44:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701114298; cv=none; d=google.com; s=arc-20160816; b=YSCBb1lGrLIiI3cKGVkwSyRWuTWyyFwd9mS0eribfWga7vO5PyGl7z1/Kb16NIyShz wH27mUvipCb5dEUTikaBTJy45ahPrZYpswhzGpAN1UF8EgBtbgBysIwSZVHZtRKyul76 DYyY7ap09uH6MJQb4kVIETHdFqq/PQXENyFKI4cE6r1iVl7PUwLpzGWlDtII8RuUz50N KAuPFJO5gHqJy6JWKfWhQX1lbatVq87O9hJgTe/i4fdO29kTJ4TeMo8kapT9fxr3O7oz YKpekUTyqkUsiGoEXQUFdtOM52G3RQxgCuylL5UlQ2C8D/5W7uF3Wl6NQLals6HHxgMb 7Kyw== 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=BeXFsw6k+b1yqi2ijxZf9CyVKX0PO75Po1++MiTzYuY=; fh=AnxdB4ueDdB5RAkchH5o9ApuZKCG+won7k8V56EgLEg=; b=mVNEAJXvbXEfRYLn7zcAfvv5QWJsCl0DND3LoEH8OybZiPDu6ZTfsVt3BeidyMpH9v fZXGk+znI6kXWEdqtMgPr7ZjAlTTZ7azztQ2qujxpm2I5O1CNnQjtxKv9Mla1oKWuD7C 9IeIf1tecWex3LyuArQkzbmmAJmWfsDbQuVb2nI+hJNvG/72lCuxNtaBsZ2x7HQm9spp 0xZZ1gmBKLkkJsmBZdXQZgKAgOEjgHmouRRVb81dOezIGqqDTrRYO7sPyuxmLozcPR66 Y4c1DXlx8Rkn2hKmKc8OlPr2sv1EC/TgiPNn6HXDLx+yUGN1dfXytDHE/P9qfdmB0nQu TXPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=FEPqbSMk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id bo23-20020a056a02039700b005ac8d44bad5si11603748pgb.7.2023.11.27.11.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 11:44:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=FEPqbSMk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 5C6B6823FAE9; Mon, 27 Nov 2023 11:44:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232785AbjK0Tom (ORCPT + 99 others); Mon, 27 Nov 2023 14:44:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjK0Tol (ORCPT ); Mon, 27 Nov 2023 14:44:41 -0500 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D05E194 for ; Mon, 27 Nov 2023 11:44:47 -0800 (PST) Received: by mail-vs1-xe31.google.com with SMTP id ada2fe7eead31-4629c0109a6so1465752137.1 for ; Mon, 27 Nov 2023 11:44:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1701114286; x=1701719086; 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=BeXFsw6k+b1yqi2ijxZf9CyVKX0PO75Po1++MiTzYuY=; b=FEPqbSMkLCWlHExazb8l3du43DCyK6IikRz+A4Wlja32mB1HEnRSGk5FcavHkBuJsK HP9tf3WVB/k11+pCOXGpG4+J9e2qgHoq9Dmu18qjoq3d3DDjkYSgyOcxQSF0WVXlzBeX XdfOJBbRUZSs0VqW2euyJS99CHeyBsNxvM3r0JOKWNLnP4yPut86v/PzaPt37kaH+TPG VtOtu2VlRYovQl8rlqPxgkvV9IqZoCEGWKGyNFSj63ZhkSlXmB4t119gqIlnrMFjbY6H GSVVyKWqKj/ZoJQcdwYRGLf78mWwQGZjzc894cWC4sYXNI0m5Ej4iWOIdb3v5DTMBMhx UzgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701114286; x=1701719086; 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=BeXFsw6k+b1yqi2ijxZf9CyVKX0PO75Po1++MiTzYuY=; b=XObqk32kV1WECWdFQJtGj1/B6AUYwyb3/CqmVzp0P+IQnBslvqEUiDMPoNyDXbrLOj 8z8snPLPrbfYSnZu737k4nCAVEZrZULbbj+UufaH2LZHmIj3fXgtpK+IRGCUcUZZ3MCj Qo1xj1cA6XXCemjvE6wK96ZNoRRnhEzZWQNzfHKE6yEn5GmF4sPfXGnlVK4DaeBi2N/w k3X0dO7WP0DtRmZy/hP6lbmhrTVwqifEweW3IwWcjCc3OOhq3aB74qsnhAnJT+a7K+Ay xPJy8XaTdCFVWTYMsQFhd3KLVqsgIyeS1WYGUkoMLsDjILf9gcvp/ipuHFo+k8LIuuu2 1Z/A== X-Gm-Message-State: AOJu0YwyW/7b9aYLCx9rQ9h4SwERPhS/JAialN0h809/McYD1dT3JHZE CfALpb/uSntrZGTuibJpZIj9zjp+/M5zg/9bNyvKs0SOt88/RUMIEME= X-Received: by 2002:a67:cd0d:0:b0:462:83ac:e6bf with SMTP id u13-20020a67cd0d000000b0046283ace6bfmr11630637vsl.30.1701114286325; Mon, 27 Nov 2023 11:44:46 -0800 (PST) MIME-Version: 1.0 References: <20231125-dropcomment-v1-1-15800415aae0@linaro.org> In-Reply-To: From: Bartosz Golaszewski Date: Mon, 27 Nov 2023 20:44:35 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: Drop cargo-culted comment To: Kent Gibson Cc: Linus Walleij , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 11:44:56 -0800 (PST) On Sun, Nov 26, 2023 at 1:14=E2=80=AFAM Kent Gibson = wrote: > > On Sun, Nov 26, 2023 at 12:05:08AM +0100, Linus Walleij wrote: > > On Sat, Nov 25, 2023 at 3:40=E2=80=AFAM Kent Gibson wrote: > > > On Sat, Nov 25, 2023 at 12:25:47AM +0100, Linus Walleij wrote: > > > > > > -/* gpio_lock prevents conflicts during gpio_desc[] table updates. > > > > - * While any GPIO is requested, its gpio_chip is not removable; > > > > - * each GPIO's "requested" flag serves as a lock and refcount. > > > > - */ > > > > > > Perhaps provide a comment as to what the gpio_lock DOES cover? > > > > Normally yes, but Bartosz just said he is going to replace this spinloc= k > > with a mutex so it's better if he adds it then. > > > > If that is happening soon then leave it to Bart to change both the > comment and lock. > > If not, then we now have an undocumented lock. If the coverage of the > spinlock and proposed mutex are the same why not describe what the lock > covers now? Then Bart wont have to update the comment. > > Cheers, > Kent. > Yeah, I think we should maybe leave some temporary FIXME comment once the mutex patch is in saying this must go as well but it'll take more time because the problem is quite tricky. Bart