From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ni.piap.pl (ni.piap.pl [195.187.100.5]) (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 413E930AAC8; Tue, 14 Oct 2025 04:24:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.187.100.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760415898; cv=none; b=dE6NsryDXIM3K6XMWXWQcrqPiIRtcXYUnwaveLuM/RpJWozuC+MRVE0rr3fE90KIQag12k+fxDMwUvFhBcoZoPMOHo5IwqqB2y7rfB65mdUTbv4hTpdMnnV95I1CqKsan0gWlOudHyA+qsz/Wo7wi+oHGUCE1aMsdCQXu0kVA7o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760415898; c=relaxed/simple; bh=NkEIvHvSMBdftwCCgim71nKU1aLS5jLHCWC9aM4TShQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=KfujT17SU1ghYIEVNdTGfm3YfXDJmdD8n6OV+ijf5Duzmbw6ih1iknFUDxyX+p9zkUMUViof3QjxzgP2dUpWqM4nvllV9NY2DbkoNN9GdSqac8DWw0Ab8xqTpiAVbhMZdbkGgAO0cNYsb4OxQiKif4ai8gSpvgjlgtYqDwJj6os= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=piap.pl; spf=pass smtp.mailfrom=piap.pl; arc=none smtp.client-ip=195.187.100.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=piap.pl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=piap.pl Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) by ni.piap.pl (Postfix) with ESMTPS id 13FA2C3EEAC9; Tue, 14 Oct 2025 06:24:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 13FA2C3EEAC9 From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: Ricardo Ribalda Cc: Linus Walleij , Dmitry Torokhov , Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Tomi Valkeinen , Leon Luo , Kieran Bingham , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Niklas =?utf-8?Q?S=C3=B6der?= =?utf-8?Q?lund?= , Julien Massot , Jacopo Mondi , Daniel Scally , Dave Stevenson , Benjamin Mugnier , Sylvain Petinot , Yong Zhi , Bingbu Cao , Tianshu Qiu , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno , Rui Miguel Silva , Laurent Pinchart , Martin Kepplinger , Purism Kernel Team , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Dafna Hirschfeld , Heiko Stuebner , Sylwester Nawrocki , Krzysztof Kozlowski , Alim Akhtar , Yemike Abhilash Chandra , Greg Kroah-Hartman , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 05/32] media: ar0521: Use %pe format specifier In-Reply-To: <20251013-ptr_err-v1-5-2c5efbd82952@chromium.org> (Ricardo Ribalda's message of "Mon, 13 Oct 2025 14:14:45 +0000") References: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org> <20251013-ptr_err-v1-5-2c5efbd82952@chromium.org> Sender: khalasa@piap.pl Date: Tue, 14 Oct 2025 06:24:43 +0200 Message-ID: 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-Transfer-Encoding: quoted-printable Ricardo Ribalda writes: > The %pe format specifier is designed to print error pointers. It prints > a symbolic error name (eg. -EINVAL) and it makes the code simpler by > omitting PTR_ERR() > > This patch fixes this cocci report: > ./i2c/ar0521.c:1113:31-38: WARNING: Consider using %pe to print PTR_ERR() > > Signed-off-by: Ricardo Ribalda Thanks, Acked-by: Krzysztof Ha=C5=82asa > --- a/drivers/media/i2c/ar0521.c > +++ b/drivers/media/i2c/ar0521.c > @@ -1109,8 +1109,8 @@ static int ar0521_probe(struct i2c_client *client) > ar0521_supply_names[cnt]); > > if (IS_ERR(supply)) { > - dev_info(dev, "no %s regulator found: %li\n", > - ar0521_supply_names[cnt], PTR_ERR(supply= )); > + dev_info(dev, "no %s regulator found: %pe\n", > + ar0521_supply_names[cnt], supply); > return PTR_ERR(supply); > } > sensor->supplies[cnt] =3D supply; --=20 Krzysztof "Chris" Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa