Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2154327rdh; Sat, 25 Nov 2023 16:14:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUEJslbNVh8IVJT6Li73noeCHoQOxbsAvV7rNhuZChpgscXN9gilxGE2D/lnrmg+iUDpjR X-Received: by 2002:a05:6a00:2e8b:b0:6cb:4361:773c with SMTP id fd11-20020a056a002e8b00b006cb4361773cmr9737969pfb.5.1700957680043; Sat, 25 Nov 2023 16:14:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700957680; cv=none; d=google.com; s=arc-20160816; b=sbM77TAVZBaLd45sKsh+wfqj/zVShdyaN/VeFQgFxjTWjZLZJwOW5fjk9+E7//TJIf QGwALr9L5LfzVmY+MS37Oh8v6xZ1UeLARP+sTOI/8IpDOeEI7b5TYqBzmvPIgFzJE93N /Wa21lrfu1goEcAVQ366vO3Zkl0bAOo129d4PaMWmxiVjE3JSZ+WNa/5kCSFckbC05cX zWHov9eknPLsHCCUNBvmzdjKyoYwrYiLykHdDpjDl9bGPF0p0N2AKno1zZA1qZua7JOa hjzxfWABxTx7x90ROtbiMcqzmKhJKaLbqYCC/7ZQWdZbDdUYWTTgyuyDILX/N2q55Ecs /jSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FL56cXoUtmBrEdcA0tYY4TzRDBeIrF1a5avi6GDovCo=; fh=mSJk8uFzjgzSLjnAiHB5YwTXDLkjCBoRznFMj+oD7Gs=; b=HhotJUzIb6hBCUY4BxN6q+BJ6thLppMYoLlnOcJ+xTOJmq9HzRPvdbOH/Ou7gLzDBM rCw6FDw5HW9wm8iVQchHuCArmHhDNY4r+wGtqB1l9zXDqv92Tmu8m1Gwvh85QOCtB3u2 GH6M1knsAqA0siNxK7tZphfGLgtOcIiRBJpHb7BjbfiPnn7+jDwuUi4/PeBH9kT1v7TA ljR04qsbn8qmG9IiloCSaWaZ8VVa9dIEflZiB2XGS+CV7rzN7G6FWU1WjjquX7ZBNABS MmKj6SSQx6B1PZaLrbfQ5vVMcqZIOjBivh5j87QigPCWrsarZ7Wk4LFFReWD/Ua8pqFj lzUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kSNlldhu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l27-20020a63ba5b000000b005c21936252csi6995046pgu.307.2023.11.25.16.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 16:14:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kSNlldhu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id ECC2E8065024; Sat, 25 Nov 2023 16:14:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229505AbjKZAOA (ORCPT + 99 others); Sat, 25 Nov 2023 19:14:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjKZAN7 (ORCPT ); Sat, 25 Nov 2023 19:13:59 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23A62E4; Sat, 25 Nov 2023 16:14:06 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1cfc34b6890so1047595ad.1; Sat, 25 Nov 2023 16:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700957645; x=1701562445; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=FL56cXoUtmBrEdcA0tYY4TzRDBeIrF1a5avi6GDovCo=; b=kSNlldhu2tfVHBZm2/lPfA1X9Cd+OV6vtDS3NDVA3nYQCMH6gRctHcyQLYNKhPghUt ypU8VdjwDmm4556CmoFWZAK3p03goZcvc6+99UOXwR50QZoVtP8MddZcOGEbF6jyD7dp vUtA/y1l4+Y/FnRwz6d7ujYrkO9aHGMwCi0kfSH3xAq4tizt/PWda5GIm2hMbBy37hOm iXl1F5bF1vPFcaiV8G5+lUnHIowi4Z4ea/hcfExSbAFfLehfio4Z+X+pCQ26wLHyh4ic M5EaTXLTm3pewV2TR7m5XON4W5i16rM8Q8b+xrP4ffrrHHbQ574jvT85IqL1WdF83Ev6 kipw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700957645; x=1701562445; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FL56cXoUtmBrEdcA0tYY4TzRDBeIrF1a5avi6GDovCo=; b=R8LbE+Dl6fCyg+V8iRQnkd2+zfL6Rbkthv08qd5O+9UtawBFUz2Y33exIhaaVpr0oq YVk6XV+3FCEViHce9uAXHBhppNfrCKrBJ6p7duq2I2/Ggx/xyeRsm06Gpg/29zOUuh/C qgK2xcCq6YYJkAgWzZc/kuYOfJeVSllZVa0U2MmmG24uxbtUQE5KV/g7gm1yB5nFR1Tm KPMEAi3XCZafoPcdE5cmWD0uRZsjTG6CKJ35Wt53SPrd0wvsgIWHT/v07mu0RgbL/RLn elwcYiKjpnC/lzylHbqenN/Vv+zBQAQbyg86wRA7yOE8REL+HrG6HMlFeXvkZbWZ0/rt OiaA== X-Gm-Message-State: AOJu0YwNRsDujcBipmHE1VOO/7IuPYC2lqKXAUQQN0EdHr8MNdn7UwPb +hyJZOh/a1Xnyi2DTvAlds9O3OlyN0E= X-Received: by 2002:a17:902:eccd:b0:1cc:52b5:8df8 with SMTP id a13-20020a170902eccd00b001cc52b58df8mr15199466plh.26.1700957645533; Sat, 25 Nov 2023 16:14:05 -0800 (PST) Received: from rigel ([118.209.207.221]) by smtp.gmail.com with ESMTPSA id ix4-20020a170902f80400b001cfba9dac6esm1233886plb.115.2023.11.25.16.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 16:14:05 -0800 (PST) Date: Sun, 26 Nov 2023 08:14:00 +0800 From: Kent Gibson To: Linus Walleij Cc: Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpiolib: Drop cargo-culted comment Message-ID: References: <20231125-dropcomment-v1-1-15800415aae0@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sat, 25 Nov 2023 16:14:38 -0800 (PST) On Sun, Nov 26, 2023 at 12:05:08AM +0100, Linus Walleij wrote: > On Sat, Nov 25, 2023 at 3:40 AM 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 spinlock > 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.