Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1894534rwr; Fri, 21 Apr 2023 00:49:43 -0700 (PDT) X-Google-Smtp-Source: AKy350ZsX02WTbIZ89uX2XpLMe7IGcoNNFfM1tIjKDizKCZlFRT/L2jcdtbcx8PNIrV+6+ASNyd5 X-Received: by 2002:a17:902:f681:b0:1a9:2693:2e29 with SMTP id l1-20020a170902f68100b001a926932e29mr5055007plg.42.1682063382612; Fri, 21 Apr 2023 00:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682063382; cv=none; d=google.com; s=arc-20160816; b=f/mAH4934DzSihoIQe5yjbBt/iKI1ffOM1IURjzOXx0paIpymFqIGdZPfaGYUDlflA lfKmL6xI7Bnp2borp5Mh+fqFMDzHcjEkCRq27e+80v4pJv7q86ncSuvhGJowWV7KmbYb exwZVqOHORPWzxbiWQknN+qEzq4gOwGldOgtrZ+wqqY894xZtZrfDmjUkzCTf9edOVxr Vm9yos1yhdKYLhnoXre1dTPpRv2mUy4iWMviXLxxY3QLe5fvT8O+AFq0WIuNxbI3g/hS Qij8O6d0yuH/wjl9oeKjw15tZzmf7saiSswvFkqkwpNaZ/DlhU65rH5SNkM/07WRLh5/ 4j7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=fn2oer3i6kSJ4yvvaI4ArdFA9BrNa4cNIkIRsF1vbMk=; b=AlCBSgaorVMchjRcuOrIUS/0weMmxknMb87ouN4P6Lr8qwAW2o5N31WxS1n/8SDzca y+UpXOiouyjkOb+qn7EF1yiymp/z8qQ5geBsMpk+3Rd3lz00b7LW/pnWAwHA4NRf+U1O DCxvOA3W5oMy0x9xch9dxjhFzkG0ZGI2iOY2ZzkO6YcCNLqqTg8/mh/rrDOakldyNJmH axsd9PInuU/Mzhi9aOXeCQL1uKs6WawxQ4aTkEviQi9Ns7NjH7pXIPOYvG/KKxk4LA2/ pi6EeVwktnv25XTE+RDmkSRq5TV3Lcd4q2gsSRvbfxxaV/eCI6deDqIecCI0Pd4fb4o9 aAxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a170902f79000b001a6ff6a83e2si3754777pln.522.2023.04.21.00.49.30; Fri, 21 Apr 2023 00:49:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231244AbjDUHiY (ORCPT + 99 others); Fri, 21 Apr 2023 03:38:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbjDUHiW (ORCPT ); Fri, 21 Apr 2023 03:38:22 -0400 Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 435D686BA; Fri, 21 Apr 2023 00:38:21 -0700 (PDT) Message-ID: Date: Fri, 21 Apr 2023 09:38:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 From: Matthias Schwarzott Subject: Re: [PATCH] media: ov5693: Simplify an error message To: Christophe JAILLET , Daniel Scally , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org References: <928f2f70de241d0fa66801b46d736ad0f881eb72.1681576102.git.christophe.jaillet@wanadoo.fr> Content-Language: en-GB In-Reply-To: <928f2f70de241d0fa66801b46d736ad0f881eb72.1681576102.git.christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 15.04.23 um 18:28 schrieb Christophe JAILLET: > dev_err_probe() already display the error code. There is no need to > duplicate it explicitly in the error message. > > Signed-off-by: Christophe JAILLET > --- > 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 e3c3bed69ad6..d23786afd754 100644 > --- a/drivers/media/i2c/ov5693.c > +++ b/drivers/media/i2c/ov5693.c > @@ -404,8 +404,8 @@ static int ov5693_read_reg(struct ov5693_device *ov5693, u32 addr, u32 *value) > ret = i2c_transfer(client->adapter, msg, 2); > if (ret < 0) i2c_transfer returns the number of transmitted messages. So I think the values 0 <= ret < 2 also need to be handled. > 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) {