Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2059477ybb; Sat, 21 Mar 2020 11:49:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtQjhLnyauXLK33eXSVPu99KLjWiqmBFUopPxdD37Omx+VCplMMraGsCKygDZTWzV/h/+Tl X-Received: by 2002:aca:ec16:: with SMTP id k22mr11665372oih.177.1584816597957; Sat, 21 Mar 2020 11:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584816597; cv=none; d=google.com; s=arc-20160816; b=QZXqHAK/EXZ6ohxuCm/3QV1YaEyLrywpRwZtWsTHKe2GjYlNHO97m1F1N4/Q88hzpU HKL8/CdpufFOGnzvOt0WxdgAETVf8hpuG/GUWfz2f9s3JTBQh/6PmHQg2HEKCB5ugg4X Lht1tiz7xjzexX+dGZQO5tg2ppTFAxkW2CWSwV+VL020JSjmBQPTsiPF4h1jquIl6/hW ic3Zf9M5r+gdaZ9zxitDvTkdcD5Ga56WA4MxImvTrzMwp40ik/V5vcp4BlJgTFMFiar9 3SxW/KEP+xJWrr/SfJ+SA70kiZjAvJyFFOR3IZMrIdm274+eLJFOm5SiZAFIgpmjZFuY i/Fw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=otee3h2I9GYdUkHChS7Anxi+83p8f4SvY4I3un3Wq7s=; b=BAGG9w0JsAkXbyJgjYNWJFkuAxWpM/uVBzXvUo+lehW6d5AThNXGOC2UXyGM3tXF0z vszm0P8JR3KROQKlon/9+mkk5wQLINqBNJDfgK644ZzQ3F5q6HciY6hd6wWnoG4zfS0U iFLTHwuFmJCNR0aLADHg048vdwjPE+DxM2b1SKIrDLyx1drZOLZTLujKic8lYNgY+I85 sv4z/C8zoFUifyqBFvkv14i7zIx7B87EaEFDDCE6cQ0Ak5ap5ZCw+mvPM08zxPcC9tms ncCw3g3LYyHhPx00KNgbfjWx3nllYVJih9wCkrIEVJ5MGTglShXOF70hrSPTKdDfv3iu BMVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cIvp9hgm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j23si5298035otp.31.2020.03.21.11.49.45; Sat, 21 Mar 2020 11:49:57 -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; dkim=pass header.i=@kernel.org header.s=default header.b=cIvp9hgm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbgCUSr4 (ORCPT + 99 others); Sat, 21 Mar 2020 14:47:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:35028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727262AbgCUSr4 (ORCPT ); Sat, 21 Mar 2020 14:47:56 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDA9320722; Sat, 21 Mar 2020 18:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584816476; bh=2cT5cgTSXrYWRUgqTyPsF3K14RwZy4F0nyDHrnhmO3I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cIvp9hgmq4hqcNeMIIjqkKKRyy2Swlb9i/NFYUNmDmtSXxPFwcZtFoqs1F/cyuK0F y3amug9uWe39nvzBjmzfG7jbanBA2TuWIoyWlpA7GSGURzhYilOCZii41J/xSc1GEg TbMzLAxE0oEPWQ+NmoGSl/CoWu5MRsrEtLAUVYco= Date: Sat, 21 Mar 2020 18:47:51 +0000 From: Jonathan Cameron To: Joe Perches Cc: Nishant Malpani , knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers: iio: Drop unnecessary explicit casting Message-ID: <20200321184751.717f1d4d@archlinux> In-Reply-To: References: <20200318100754.25667-1-nish.malpani25@gmail.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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, 21 Mar 2020 05:26:52 -0700 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 > > etc... > > Indeed that would be even better. I'd missed that one being added to the magic of prink :) Jonathan