Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2051845ybb; Sat, 21 Mar 2020 11:37:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvUUzyq5Ix+dCHaSlYrNLFMYbK9cF+QhIZ2b0yUI7Qovr3DGPu5tmsdDMK67WfpvrZ/pBl0 X-Received: by 2002:aca:d11:: with SMTP id 17mr11658852oin.128.1584815843019; Sat, 21 Mar 2020 11:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584815843; cv=none; d=google.com; s=arc-20160816; b=VKIx9Kc0RWylNkFSlexzak3VDp3wJxQ+bjfeykZ3bmbjLGolb3lDjqP3JYriYbSMvI Z3QK2z/k8q62H+YFjDaeTtJjh0sKKeCsL5z4I0eX+BdvIJcHv8P9b0+QGzHcgYyci3xI 3cKcS3Zj4yNREQeRpn8jrum+2oC9pGmjj9kw8Gf7EYUoLj5C/AXsKUxhg37xQMaFqNOt wZhRYS5aNNCNn+AKhZSgPukmtqTSTp4WG4XwqGV0BltETGgkdUUncycqQqX3jO7Sy+3Z wemCyKCRwvVJXEks5vrjxS9bHHX9CjHIuDPdhUFOVIUcjFGNlGCEfXns0qi85+3Nu3LM wS8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=xjYE+acyIl1MyQNPpOi8Z8teTLcc6GVGzKdkxPPHtf0=; b=N0WsncRP7VOR+DzjY/CNJdiI4dkke3/3zEHg6N0ZNVH7kHl2QSJ4lU7LC3XmGnCzNM oMEou6ow6gOCBXPKQL+zhWTKCAMF1nIWanFlzCi1TRmPg8PMbrF+UPDaPoGCJrHo0PGJ ELYA/5QSfgFPyXl1ixhh4Ue7b/Sq2sTUXV5chFc0CFx3Jz4khKHL2djU8rbJaok2Fv2k 4hMNyS+eUBXP3oERsMY8/qgqpshij3KRB1hjbjoYZCdn69VdpGZIpBGRqxGFpHGz2/PS GsJLoTXMrWzAwcEqcEVEbEKWrZFQGWnMDSP9BG4Z8fOdmCi+94DCs4gMOjyafGxBvL5S VM5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si506897otp.254.2020.03.21.11.37.10; Sat, 21 Mar 2020 11:37:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727314AbgCUSfj (ORCPT + 99 others); Sat, 21 Mar 2020 14:35:39 -0400 Received: from smtprelay0124.hostedemail.com ([216.40.44.124]:43138 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727015AbgCUSfj (ORCPT ); Sat, 21 Mar 2020 14:35:39 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id DB539182CED28; Sat, 21 Mar 2020 18:35:37 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2560:2563:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3873:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4384:5007:9025:10004:10400:11026:11232:11658:11914:12043:12297:12438:12740:12760:12895:13069:13311:13357:13439:13972:14181:14659:14721:14764:21080:21627:30029:30034:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: word42_6b2f3b9dd3046 X-Filterd-Recvd-Size: 2030 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Sat, 21 Mar 2020 18:35:36 +0000 (UTC) Message-ID: Subject: Re: [PATCH] drivers: iio: Drop unnecessary explicit casting From: Joe Perches To: Nishant Malpani , jic23@kernel.org Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 21 Mar 2020 11:33:48 -0700 In-Reply-To: <9aa90ffd-9574-d615-0bc0-f791e51b3be4@gmail.com> References: <20200318100754.25667-1-nish.malpani25@gmail.com> <9aa90ffd-9574-d615-0bc0-f791e51b3be4@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-03-21 at 23:56 +0530, Nishant Malpani wrote: > On 21/03/20 5:56 pm, Joe Perches wrote: > > On Wed, 2020-03-18 at 15:37 +0530, Nishant Malpani wrote: > > > Provide correct specifiers while printing error logs to discard the use > > > of unnecessary explicit casting. > > [] > > > diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c > > [] > > > @@ -21,8 +21,8 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c, > > > > > > regmap = devm_regmap_init_i2c(i2c, &config); > > > if (IS_ERR(regmap)) { > > > - dev_err(&i2c->dev, "Failed to register i2c regmap %d\n", > > > - (int)PTR_ERR(regmap)); > > > + dev_err(&i2c->dev, "Failed to register i2c regmap %ld\n", > > > + PTR_ERR(regmap)); > > > > Another option would be to use %pe to print the error identifier > > and not the error number > > > By 'error identifier' you mean the symbolic error name (as described in > docs [1]), right? Yes > https://www.kernel.org/doc/html/latest/core-api/printk-formats.html#error-pointers