Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp398298rdb; Thu, 22 Feb 2024 07:11:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZZNqwHqISK0gV0DEp8tCpTlyemV3kexczkJgDg0h/UbMYhI4plzQ2HzLDlWcp8yejE2h1SrEvhkmKLY8OjDwXaJKlJF+8APy9QaNCOg== X-Google-Smtp-Source: AGHT+IEGFm7idRgTvmIyG89QU3vvbXVvo43Xb93pvbksJdR4WHFgO9cP/hkVOVUPXavkg2VobdmX X-Received: by 2002:aa7:8652:0:b0:6e4:6163:7e05 with SMTP id a18-20020aa78652000000b006e461637e05mr10839156pfo.6.1708614715161; Thu, 22 Feb 2024 07:11:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708614715; cv=pass; d=google.com; s=arc-20160816; b=wmrS+b6VcPyc9sCkX51Nhdk1cwrZUCvnGYPFmyU1mrTwhAZ4IkU0dF1QD0yFagCcLs 17qGr9e0qWSjzSuMaTDR6885LC7Uof8QvtXKcQsrQEMMiLfPzXuyZHHbrLErhLEhrEdE 3d6TLljuAyNy8b1PWcwbgC6KluvFrH3Ydmq5MUTzEKwP9V6hnkqc8cpDMrI9v9dAx2K/ i1k7p4U0WxdgQxV4CqVqfS+jbEvu3iepbF84DvsAFfjLrgwa4KHtsNHRLeSlv259Ems/ rpw5trHaLAikCIwARuNY/3eO9T4AaGajj33AOG2fZsSBqTniRUBJjujz2aJ2l27pvrnY YNtA== ARC-Message-Signature: i=2; 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=+1MyTAa9W6rwmrz4X17WTkjYYC8wuvxkD+qfkCmD8gA=; fh=bNHKNyhQ+AG2/wyDKEcOnKc79QUsijIEYoZS902ZDr4=; b=ZDmGtpPBVAcUFQRMJyegNFbuEE/TlLo4JfxhwWwZ5KBOpY7l2bl3FXeBdBsWCY07DD IzqrJf100wbaxGl6gQx/qcHd/DDIetvZebyEHD5qvle27RKRzvVQZYigTRTd/7Jx62lM AEXSo8pfs/KQfTITOsfzaKhbEeY73KCIGJCtxynTsfAJPzI0FirlblMgTw7qcpkn8/Z8 Dg/GkDdF9r6Ib8K2w9UaZ24NTSUw6lFCbQyHrqedgXH1rcmyYBCSgroGkUrJIWIPuyNn lgGK5e6U1U0sri9QAXaLww3mB8PEMMF2BoMbfz8WKJ/M0eHpxfLWPewC9Aaqzxmnfp9T 4epQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=UwkIsLyk; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-76752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76752-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c133-20020a63358b000000b005d8c19ca98dsi10313126pga.137.2024.02.22.07.11.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:11:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=UwkIsLyk; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-76752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76752-linux.lists.archive=gmail.com@vger.kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D6C12286798 for ; Thu, 22 Feb 2024 15:11:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFD7414A094; Thu, 22 Feb 2024 15:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="UwkIsLyk" Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 6DA7914A09F for ; Thu, 22 Feb 2024 15:11:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614688; cv=none; b=Q9hiaz8pS+ATcIwG+ncwVHbT/qa64Ii1P4Ykq7CanO73olQ++oSNXNog33/pmecmtTwDv9VFgDYTqoNrsJs3RFdAIpgUYIWbeF+Y+SreX4T017eJELNZao9nspoLPdbn1pnqqCjYpmM5fKqcau2SHFrHRU7NUwyDdfEp0+gRULY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614688; c=relaxed/simple; bh=E0AvIIn162mSDyZwPDTo2b1xyRz7jAaOfrYbNUsD19s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=dhY8dLnfwAJvQLtedxUgAnuv5vShZXeYTBVJS0ZG8A7bO95tTP7JKIjDp4xGqFRSvyoWmZWMZmkzcH7GCE6Igt8lwt8KAMYhjMuH/a08KmaoERIDtrCBm4c1gGxFEC9bobC6ZeHiSvh7+se28kZ9i8d/KrQhSIvfOpHaOwxd+fQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=UwkIsLyk; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d2505352e6so35529711fa.3 for ; Thu, 22 Feb 2024 07:11:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1708614684; x=1709219484; 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=+1MyTAa9W6rwmrz4X17WTkjYYC8wuvxkD+qfkCmD8gA=; b=UwkIsLykfJRFNvIHoHGBPHMNOiHcdcQuVYCHaWoS5aYxT5Ka5iGYvLPTlpAaP+ej2l LkSANWN1ECg+wxpZc13XRS2NPCmfmdUMvRLiA3BV6HEdlghd1rdFyBB9kG3FgENyu2l/ s2QvMk5J6v6XoSo9GqdOHWlQdTP/C8L3G6CQ2CKe2UVU1Lp8B5PacI1vk4kwZjZcgpnm ofl2c4aUnIHqRT6ifeTSNvRL1QmW+os+Fku/Nz33UOl8QJBgkr+rn2oI8K/hKqFQpmoq gKuDgoTMhWmU1ZnRh2GxW1UVcfpmHgexdkEe5WeeSEejr9sClJ5ibqIctcgrIy+95J+u C4dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708614684; x=1709219484; 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=+1MyTAa9W6rwmrz4X17WTkjYYC8wuvxkD+qfkCmD8gA=; b=qbit4AXh7Zbotep0Go21CichtKbQ+uxwKxXEvjeQ/FpHwMV16mdrCN1+v0UfhW67LA ENSLW6iXIrkAnYKHzQEP7fuVeweUhC1Kl9t7+rqQBd0791oHidIcZgo6js5sv/hJJ0qQ wlDCmRECMQfSjVoETttpFZlKFl/Dsda46c1mWyrGokrtBX78k7noAM3SiV4Ol5El1jyo j/Alrdl7tkkII3DqroMkGZmWZLSvR0jq078WJW+ZK8VrZNuG55TtpOq4YhHdv9Fxce9E elsIYPTfgmlGhqxgJS6YLJCq8S0pRQrxjI9MjVsL0DewRJP1FVzhf9EC/fVXmel59h/R lXjQ== X-Gm-Message-State: AOJu0YxOk7q7R+CQ00FHgljSyuCKZyqRLd0iqFQ30ezIr13A2mI1FfeX c//WJM/fv4Hj4+7Bs+dnAe52rRkXpW+IojhF04YTBRfZTI6Ag083fIigfoTjqM0z8HoalpuaiHJ 0H22JftlxUh0jVCgFc75I69HJbykRAEiRVbGz9Q== X-Received: by 2002:a2e:b166:0:b0:2d2:6002:c239 with SMTP id a6-20020a2eb166000000b002d26002c239mr1510902ljm.3.1708614684451; Thu, 22 Feb 2024 07:11:24 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240222145838.12916-1-kabel@kernel.org> In-Reply-To: <20240222145838.12916-1-kabel@kernel.org> From: Bartosz Golaszewski Date: Thu, 22 Feb 2024 16:11:11 +0100 Message-ID: Subject: Re: [PATCH 1/2] devm-helpers: Add resource managed version of mutex init To: =?UTF-8?B?TWFyZWsgQmVow7pu?= Cc: linux-kernel@vger.kernel.org, Hans de Goede , Matti Vaittinen , Linus Walleij , Lucas De Marchi , Oded Gabbay , =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Aleksandr Mezin , Jean Delvare , Guenter Roeck , Pavel Machek , Lee Jones , Sebastian Reichel , Matthias Brugger , AngeloGioacchino Del Regno , linux-gpio@vger.kernel.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-hwmon@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 22, 2024 at 3:58=E2=80=AFPM Marek Beh=C3=BAn = wrote: > > A few drivers are doing resource-managed mutex initialization by > implementing ad-hoc one-liner mutex dropping functions and using them > with devm_add_action_or_reset(). Help drivers avoid these repeated > one-liners by adding managed version of mutex initialization. > > Use the new function devm_mutex_init() in the following drivers: > drivers/gpio/gpio-pisosr.c > drivers/gpio/gpio-sim.c Yes, please! For GPIO part: Acked-by: Bartosz Golaszewski