Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6803580rdb; Tue, 2 Jan 2024 14:13:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxPLtJNsj0pK2Ba39m+O2LbZkUsvToF45trtoXIJ1TYGj8n/PLV7ZIQ3UwSFB1FEaaHpX+ X-Received: by 2002:a05:622a:114:b0:423:9642:7824 with SMTP id u20-20020a05622a011400b0042396427824mr27932467qtw.49.1704233587279; Tue, 02 Jan 2024 14:13:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704233587; cv=none; d=google.com; s=arc-20160816; b=uLLe2zvAUPpZdwFE6OfSsmHD0CMcj8avIzJR1BBx5f/YIq7N2J9gZzpoRdyBawao+d 5hDAmOjNT8sPLd42eam0jJNsgEG2T7Cv1S38Dz+T7TlMRfw3uuQXXLQn4tk4bo5YIdPS 9KwitUsv7oeqc7+9PcysJkO1iNST193EO+/BvpNSrVD8a8DycViGLSAKPdP0qy7HZm5n L17jzOwLLaq1lij0U8BOYZccOA1s5l8Aq75SN37Id3Q9T3AY4Zkza2HJJo9GcDZKYV5w c6ubocBh9QoiLNrsVFpSmCCgzK48Z9BYDN2U2kVVknBB8u4xcq3r2KrSrKIDHM1U3LhT SjSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=UGUJijc4OnYyIel7J37KEqrTE1jlQtmqCqdxc5ZaayQ=; fh=NVJXV9SS7/7ryeZ0ezgTXMwHi/jCmlypXVcdgHj9O18=; b=toKXam4RKFlImCEhOYtOKUNIiq0ejt2+l9AKK9lwaOlP+b4FrulwsJtwtgVg3QHe7m oXpegwQxAJGyfnxlI2Acc72TgEhX33Vx+mnNZnTv/AWWxU8CDXVXnPOiB7WBXZvsthgk fJl00RaiwfyqLsElbKpnm5xq8QttS1d9C62mhwVk0Ygya+v6B1l/K8lFTpagEW8fG4CA zXlsMglRlS++GiidIE6oSM0myjzxDp3uwDFg9pp2Q4oW09tIlxi0Bbkv7zkXQighQXuI NcKhzn8BTr8y9znYKA84jkNicfc2Q1JSNwdl2aZNtnHoHFvUnLcPVQiIvLCEYgG18vNC ewOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HsilkCjj; spf=pass (google.com: domain of linux-kernel+bounces-14927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s18-20020a05622a019200b0042825564d68si4239626qtw.312.2024.01.02.14.13.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 14:13:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HsilkCjj; spf=pass (google.com: domain of linux-kernel+bounces-14927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0FBC81C22B5F for ; Tue, 2 Jan 2024 22:13:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40BE0171C5; Tue, 2 Jan 2024 22:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HsilkCjj" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FDC7171B9 for ; Tue, 2 Jan 2024 22:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-5e75005bd0cso89550577b3.1 for ; Tue, 02 Jan 2024 14:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704233578; x=1704838378; 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=UGUJijc4OnYyIel7J37KEqrTE1jlQtmqCqdxc5ZaayQ=; b=HsilkCjj24/HE77B6kTgN6uROOSOGzxYdIcPPESg82BkeLzb8h+QXhqf0wnKXJYQ78 MpTKdcexihC70+CRpZjUrNM/wOvA+VO4Ee9LxR+iUEENR8cDCqvSFoyYrGxzF+ZPzlN+ r+NyQzTPBEM6U9LjXAZKK2jSaw4hLaiiH0+dRYMZ7CNhDUPRGHxgIZAFho1lppSTNb0C ROUULkq3g8Ie4pB4dHTl6ltNFvgNhAQ095YJ3E7hTsv/KqX5jkyfJKAnpzwgURtTMkl1 2oAanYqhP9GpGXo6FmK9mibEuBKehARNX1rGiZ5pl4d++ylyIuwzIaCD/Lp81xo7iou/ 3Ysg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704233578; x=1704838378; 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=UGUJijc4OnYyIel7J37KEqrTE1jlQtmqCqdxc5ZaayQ=; b=ARgVt2rSCIRjRYUonUI2yw/MTPraXF/AgZV4T/Fo0ag3Nzbofl+aJAiCSGKsZ7GJO6 iBukmU8KUH9SzWa+ptfaGC3zbbB1oLs4q7p0Jh4PnWfkUH4KfT59PvOr/H+6lp59Zwuh A/pvv5R/nJqR1eMk6lwF887v3HKFVEdAzFb0GJG536vpwlxmryNdVbCkeBUsUSBDiNhO dLZXVvJQUybhMM5ebCZT5F1ZCDdTvSHpGHY3eKHV9jK5YbrMtnsn/EySC+iRHll2T2SD ezJr9iMzcDWfC9HjKP5k694yr5Fg05PTbM0MzFZ8TNyP2Ia+q07aUAhphLut6cHxzpfv AUZg== X-Gm-Message-State: AOJu0YyqoyrXlBuIF63gLjLCYWW85q862Vfdqgiw4yPqYv+e+zGJ/xPE gyCDReH74UOJQ7jOa1a6KorMBID6dtnwn1W0vFT7qlBnP1NAHw== X-Received: by 2002:a0d:da46:0:b0:5e7:8d32:dbd5 with SMTP id c67-20020a0dda46000000b005e78d32dbd5mr14305900ywe.41.1704233578063; Tue, 02 Jan 2024 14:12:58 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240102155949.73434-1-brgl@bgdev.pl> <20240102155949.73434-3-brgl@bgdev.pl> In-Reply-To: <20240102155949.73434-3-brgl@bgdev.pl> From: Linus Walleij Date: Tue, 2 Jan 2024 23:12:47 +0100 Message-ID: Subject: Re: [PATCH v2 2/3] gpiolib: replace the GPIO device mutex with a read-write semaphore To: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 2, 2024 at 4:59=E2=80=AFPM Bartosz Golaszewski = wrote: > From: Bartosz Golaszewski > > There are only two spots where we modify (add to or remove objects from) > the GPIO device list. Readers should be able to access it concurrently. > Replace the mutex with a read-write semaphore and adjust the locking > operations accordingly. > > Signed-off-by: Bartosz Golaszewski Looks correct to me. Reviewed-by: Linus Walleij Yours, Linus Walleij