From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CD62156237 for ; Thu, 16 Jan 2025 17:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737048706; cv=none; b=RA21Q/AQbtH1Fe+fIhLjtjNaTx+VTiNRfOCPxt2HSkZRJJwRkR+c0NoCS9E3QgI3mDeA7sOiHNgKT5lJMDVHJGSRJuUcoLXXFpg1DAUWoqrHiaW6HIP71mAyFx03vcw61R64d/cIDimMUK7GK22LyF2OEbz3ed+XaGqJAAfbP/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737048706; c=relaxed/simple; bh=jE9L/BOwK8+0AGlykFDuU8fHxU9iBr9oOydHnEzwf00=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jqlXrSm7AiN9xFCOBL95hP9QwOuwS2MtzqzOhX+3nijPF7gO1ct769HA/DNU/PkcSe4Fc3v0mUdgKKmQTlEvkaRwMWS13JISfhoOjtazwR2efUrWmk+CTK/XOi6iGmHjk/XZ+UU/ZOKhk9MJvuRbeUFpTjG6qPtGDga5TNsKg20= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ThKco5io; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ThKco5io" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1737048692; bh=jE9L/BOwK8+0AGlykFDuU8fHxU9iBr9oOydHnEzwf00=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ThKco5io8TLRgK6KZFZkQ5itmBeTpkltKbB53xBdiS2LAMUq3jn5XlqPpHg1nxGcs 8BURBPtj6kuYopZZV+QM4wuwjfBraHMx78a99Ajxg9L/J0DpmzrAhDMvF7QqKtKYjS aLg0Sa4aAQVMGCl0BF/6PJJr4hd8oYAyYQ1QWBQQ= Date: Thu, 16 Jan 2025 18:31:32 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Andy Shevchenko Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , linux-kernel@vger.kernel.org Subject: Re: [PATCH] locking/mutex: Mark devm_mutex_init() as __must_check Message-ID: <404d182e-ba2a-480c-bcbd-4497350fc561@t-8ch.de> References: <20241202-must_check-devm_mutex_init-v1-1-e60eb97b8c72@weissschuh.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 2025-01-16 17:45:30+0200, Andy Shevchenko wrote: > On Mon, Dec 02, 2024 at 06:45:41PM +0100, Thomas Weißschuh wrote: > > Even if it's not critical, the avoidance of checking the error code > > from devm_mutex_init() call today diminishes the point of using devm > > variant of it. Tomorrow it may even leak something. Enforce all callers > > checking the return value through the compiler. > > > > As devm_mutex_init() itself is a macro which can not be annotated, > > annotate __devm_mutex_init() instead. > > Unfortunately __must_check/warn_unused_result don't propagate through > > statement expression. To work around this move the statement expression > > into the argument list of the call to __devm_mutex_init() so > > devm_mutex_init() directly expands to __devm_mutex_init(). > > Did it go anywhere? Nope. I'll resend it after -rc1. Maybe a Reviewed-by also helps.