From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58F09C52D7C for ; Fri, 23 Aug 2024 08:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yp4pKPaH9PczaTr8JGBibTa2Z0QRF52/s5tchcuFGOI=; b=0JGv2/ozSCX/scwYCbb8Z9DtFv obURKkX1E271CZVcFJSfaDLANzs5XKkPKR5bhYLAnlNz/LQjgd3L89pyZfBi2dRCN+lYvd6G+IP/9 zbywZtvXPkkr84+OFTPzYRZ+TrieeWj3IaWJHhK0kurm5fKuTBge8ipEYdd6ARRx4+k/M9xsw3Db4 FzLhyOcxmVCSP9fhjDhfw5KbtbKQ13AroBH7uK5DtJ1IuyyLNGgWDl0jBRknuRqOWaF+Ua7jtSht7 lVxbarZikXUW+bUpxO3kpI6DGYuKrzQmij+JpwVSHF2CKpqbU65XZFWrnX12/HJDDo8b/pKbFnODl kckMnkKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shPsw-0000000Fw4F-41s7; Fri, 23 Aug 2024 08:43:06 +0000 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shPj3-0000000FtYW-3diz for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 08:32:55 +0000 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-5d5cbe88f70so1174697eaf.0 for ; Fri, 23 Aug 2024 01:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724401973; x=1725006773; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yp4pKPaH9PczaTr8JGBibTa2Z0QRF52/s5tchcuFGOI=; b=O0s9KKybNgwZsElpfcJg6ErUCzgn7O4+8+3XOsN4hy0orzCUYxkbrGoLvDBKfW50yb xibFM4d1IpOsDul1GqN9bMk3kzI7y6N9rMGTZkv525FXDywlAoAs7AQOkeOmecpIzNZ3 gkINsnvlzIKQLS5R9468eJBUV+n/7FQi3Cy18C14CkNzWjuoWuSAMUZVpeDJiI+VqSKP d0mq0fj6mCC2AJeHn81/adnAhpon6qK/vAlTRGV3r00iX+hvqX0aMUitR2CflxVNcfp8 OVlAWfdYETQY/mNDgYKQdp48goVqmZ+d8NFmy+W2fJ8mwDWNCRKPdo1DcrrcGrrd17rg S9bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724401973; x=1725006773; h=in-reply-to: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=yp4pKPaH9PczaTr8JGBibTa2Z0QRF52/s5tchcuFGOI=; b=KCMnem1F4bAdQfk6Wg3sBtVXD9PE3MiDh/ZdonwmjUx41n/VSGUtJ0Cv0qCOFu610e Xavyy3jt6Kw6ihhkJJy8WCqcCSPGUoWJfo6f86qTF6/GPv7qXSDvx7BKm0EaeEWWrHD3 i2Tz/T3/IS6arUHPatlxC9qZv05f22XZBugDwa8wKxd1QdnGBn77vvDEO1p5iIyiAsMp QCZmOS5/eqpolcqQNs0I0TdzF6IaOo/Q2THayhfeXcjNMTRqbehGb7qX48GBi0ozfdIK 6k951FXlE7+PER7Fd2ZQMEQiTtlf3WPIHlx4P1gwPaz4ssjqHVt/MPi4CLfBW1HkBSrd GBqQ== X-Forwarded-Encrypted: i=1; AJvYcCWSk/on+dmlvTB+4+Yh9mJ4OwJGesGO4iVdgqF9s0sm5WwBY8dXCDi0Cp5D6c4Fi97+ASXjiKLr7U6spLNKZHRG@lists.infradead.org X-Gm-Message-State: AOJu0YzKowm69GxlqArNXj9uhnmv9dLEc8YiGUyd1tC69+8itS2MmmEW kff8uG6kX6i1rKRWEnttcW4ARCyW0HU4NOFvoia2PyxPkxueoUZZ X-Google-Smtp-Source: AGHT+IEsGrMIBnE5i9swqXq/Apvogdiy73ZTSN5iJnCeHN2vFAylF26K8eA1Sr+N3GDp+gdG1bTwQg== X-Received: by 2002:a05:6358:52c1:b0:1ac:cdba:8c87 with SMTP id e5c5f4694b2df-1b5c3a4e88bmr144912155d.10.1724401972541; Fri, 23 Aug 2024 01:32:52 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:ccdb:6951:7a5:be1b]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7cd9acabbf3sm2265501a12.29.2024.08.23.01.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 01:32:52 -0700 (PDT) Date: Fri, 23 Aug 2024 01:32:49 -0700 From: Dmitry Torokhov To: Krzysztof Kozlowski Cc: Arnd Bergmann , Mark Brown , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com Subject: Re: [PATCH 06/14] Input: samsung-keypad - use guard notation to acquire mutex Message-ID: References: <20240819045813.2154642-1-dmitry.torokhov@gmail.com> <20240819045813.2154642-7-dmitry.torokhov@gmail.com> <0afadefb-ecb1-4ec8-a862-bfa06d171457@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0afadefb-ecb1-4ec8-a862-bfa06d171457@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_013253_930986_4855327A X-CRM114-Status: GOOD ( 22.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 23, 2024 at 08:06:17AM +0200, Krzysztof Kozlowski wrote: > On 22/08/2024 20:07, Dmitry Torokhov wrote: > > On Thu, Aug 22, 2024 at 05:48:33PM +0200, Krzysztof Kozlowski wrote: > >> On Sun, Aug 18, 2024 at 09:58:03PM -0700, Dmitry Torokhov wrote: > >>> Guard notation is more compact and ensures that the mutex will be > >>> released when control leaves the function. > >>> > >>> Signed-off-by: Dmitry Torokhov > >>> --- > >>> drivers/input/keyboard/samsung-keypad.c | 8 ++------ > >>> 1 file changed, 2 insertions(+), 6 deletions(-) > >>> > >> > >> You need to include cleanup.h (unless some other patch already did it > >> and I missed it?) > > > > Guard for mutexes defined in mutex.h which is pulled in indirectly, and > > guard() is not in mutex.h and in general we are including headers for > the things directly used in the unit. Oh, but it is: https://elixir.bootlin.com/linux/v6.10/source/include/linux/mutex.h#L196 DEFINE_GUARD(mutex, struct mutex *, mutex_lock(_T), mutex_unlock(_T)) > > > cleanup.h is included there. > > > > If we want to list all the headers that we need instead of relying on > > Fixing existing code is another thing. I only propose to add new code > with the header. > > I don't have strong opinion anyway, so: > > Reviewed-by: Krzysztof Kozlowski Thanks! -- Dmitry