Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2810481ybb; Sun, 22 Mar 2020 08:14:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtp5ZoXPBIPciZelMW7sIwTbYHtl2jsF95G3sFUCKq4V1c2dloTNGFzuP8rQ0NeP4gupv9i X-Received: by 2002:aca:5f09:: with SMTP id t9mr14385057oib.5.1584890068082; Sun, 22 Mar 2020 08:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584890068; cv=none; d=google.com; s=arc-20160816; b=nTIqXwO0tXJacrohI4VCSfYtQi6oBUfm5RJBLAwkBagprMfJ11CSPWalk3tbbzt4jW BAKT3Th426GajTlg+LF6yCIo8l3ziEUgSE33YVzyHdhl6EX2cmGa1zgBX/rCHHFqTgTa 3I9xoU+Y8c/6dJ2WOKmg5CynOb9kmwAFco3PxjIbG5gEtUzBx8UVMcV46VoVoEn66u39 EznjeB9kDcAg7+Cepw3VOF897h51Er0B32/O0+dzT9ULIzt9edfL5NOILW6rG5IlSD0o wvLzctVlmTryvDcIMSpETB/3oQyY+3lDWtfaczq89YcFE447BSpizwhufOJUPHLLtigI VrCg== 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=1ZgBy6d5uTH9cQyHxB0mdEtYtz+qRxIYBiew+DXx3/k=; b=PHwpO1ksRmkGMaJEOvhlaUcQCqZFx9+ifj+JzT0IQijjJZ5UBn9OBVRXycTAWqfUBj 3uTw4yFVhEbzkkfLw0+bYNqmvmL1ewSrY3b0nyivCbeAFQn0YbpT0Wt6W4AFuu0VMQZr CitQZGY1ow9h4Ui9FfnpzqYu0DiI7mi1kbMM54GHSHt2u6LQKWV2kxN2+BLCxNTRjpHk eZRqbje8LAAL0i8x/Hjb+ZKekFpkvPFAzo0cZ93uIyU5l7AZeoSmku4gJiqVvN65rS2j YPYNJB3XgFjbgifkXYshTF933K1Maw9LlHcAWHRLdi4gVbxVM/iv0+RS5G7RBRiT9YH/ PdhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fJh9MbqX; 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 v6si6050127oif.149.2020.03.22.08.14.16; Sun, 22 Mar 2020 08:14:28 -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=fJh9MbqX; 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 S1726765AbgCVPNs (ORCPT + 99 others); Sun, 22 Mar 2020 11:13:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:49492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725785AbgCVPNr (ORCPT ); Sun, 22 Mar 2020 11:13:47 -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 6D03820722; Sun, 22 Mar 2020 15:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584890026; bh=tiusHdEiTydq4LjkwpW6vxcmdVY492SblJa37LMWCRU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fJh9MbqXdZ5Wwv5GuMhn/YZn8yTVUntg85d/jkfGHQzTiYPX79qnVFBs5X7N0FMbM d58VwB+6uDmJFjsKeDlMeCc1DqvAq4iESdaQGVrLTIxe4Vxkaw/lqLRT+uVWJmqfZ0 O7ZmMKStitfsDozulcLT5TbHM/LELIeRay6JjsBs= Date: Sun, 22 Mar 2020 15:13:42 +0000 From: Jonathan Cameron To: Nishant Malpani Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/13] iio: accel: kxsd9: Use suitable format specifier Message-ID: <20200322151342.1b65a5c0@archlinux> In-Reply-To: <20200321210204.18106-2-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> <20200321210204.18106-2-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 Sun, 22 Mar 2020 02:31:52 +0530 Nishant Malpani wrote: > Provide more suitable format specifiers while printing error logs. > Discards the use of unnecessary explicit casting and prints symbolic > error name which might prove to be convenient during debugging. > > Signed-off-by: Nishant Malpani > --- > > Based on conversations in [1] & [2]. > > [1] https://marc.info/?l=linux-iio&m=158427554607223&w=2 > [2] https://marc.info/?l=linux-iio&m=158481647605891&w=2 > --- > drivers/iio/accel/kxsd9-i2c.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c > index 38411e1c155b..39a9daa7566f 100644 > --- 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 %pe\n", > + regmap; Please make sure you do basic build tests. regmap); > return PTR_ERR(regmap); > } >