From patchwork Sat Aug 6 07:05:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12937953 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62524C25B06 for ; Sat, 6 Aug 2022 07:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237969AbiHFHM6 (ORCPT ); Sat, 6 Aug 2022 03:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbiHFHM5 (ORCPT ); Sat, 6 Aug 2022 03:12:57 -0400 X-Greylist: delayed 451 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 06 Aug 2022 00:12:56 PDT Received: from smtp.smtpout.orange.fr (smtp-12.smtpout.orange.fr [80.12.242.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D1C8D17042 for ; Sat, 6 Aug 2022 00:12:56 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id KDsAokBsU9RnzKDsAo3rnw; Sat, 06 Aug 2022 09:05:23 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 06 Aug 2022 09:05:23 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Daniel Scally , Mauro Carvalho Chehab , Sakari Ailus , Jean-Michel Hautbois Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH] media: ov5693: Simplify some error message Date: Sat, 6 Aug 2022 09:05:21 +0200 Message-Id: <2937ae40c2043cff0eee238877da9656475b18df.1659769500.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org dev_err_probe() already prints the error code in a human readable way, so there is no need to duplicate it as a numerical value at the end of the message. Fixes: 89aef879cb53 ("media: i2c: Add support for ov5693 sensor") Signed-off-by: Christophe JAILLET --- Sometimes, some people complain that dev_err_probe() calls should be limited to probe functions and functions called from probe. So maybe this should be converted to a plain dev_err(). Personally I don't fully agree. dev_err_probe() also has the advantage of not being a macro and avoids some inlining. So it can help to prevent the filling of the instruction cache of the processor with things unlikely to be needed. --- drivers/media/i2c/ov5693.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 82a9b2de7735..8cf9516b6d57 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -403,8 +403,8 @@ static int ov5693_read_reg(struct ov5693_device *ov5693, u32 addr, u32 *value) ret = i2c_transfer(client->adapter, msg, 2); if (ret < 0) return dev_err_probe(&client->dev, ret, - "Failed to read register 0x%04x: %d\n", - addr & OV5693_REG_ADDR_MASK, ret); + "Failed to read register 0x%04x\n", + addr & OV5693_REG_ADDR_MASK); *value = 0; for (i = 0; i < len; ++i) {