From patchwork Sat Mar 21 21:01:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D24641392 for ; Sat, 21 Mar 2020 21:02:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0C6D20775 for ; Sat, 21 Mar 2020 21:02:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D9hWL3zk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727184AbgCUVCX (ORCPT ); Sat, 21 Mar 2020 17:02:23 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42384 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbgCUVCX (ORCPT ); Sat, 21 Mar 2020 17:02:23 -0400 Received: by mail-pl1-f193.google.com with SMTP id t3so4064391plz.9; Sat, 21 Mar 2020 14:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Kub2Immkly+v0+a50bHcYDmH6E3zS101ZhdlILuqunE=; b=D9hWL3zkh0AJQPnHGYZmvkSqSduBQc7IcB6sceLjk5iRaeUfDOSD3Rgf8vybJ22EGi mXe5XOKCTmc1r/Lhu5KlgGtxwxHcPacH4243C7O1buCAj/SjWHKFtCXyQCBVxxtMBY+b 3CLL/cnKpeYNRiV6fzpTZFEFxN8jT2WuzQlIMeijn6Zkf2vfsQlIaqQRAGOUCjQqzz2G 3Y8bsAhQBOoKTHGVgFGF4EZgLjgMx294CnlraS5vxXRKevaHF4yyQIKtdtNGS30KzWBP cJ5ABn+ZH/VrG0AJ4qwYQ4JZdCGqB+X+dssXcCSBI8z900NDAqIYKDGOJzT23FFvkpQ6 VEQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kub2Immkly+v0+a50bHcYDmH6E3zS101ZhdlILuqunE=; b=qC0Jfb4QvEDjZ1y7/vAtNY5zfmuM+Iyzvl2mL6eAVGtCzsfQCn+sfyiTdSGtYcM9az HNqhkev5ooO+ggf0y8NglxPLydGWXngCmuzkEiGyqIk56GGwUTlB1HDDY75epKOm+1yY w0f6kCCrSCpf4JJznEJO3Xb7bUq4AtQRb4tO/UGUoBYRpzbOENmM1ncLODwFa2NQr++M s2/ZCBbwixO2891yGRnF1T9FUZKepaqs2nuVXPmQsfm/ER3EnHS01B7jaFEvKjTrGizG sTiRoEqGKMb4t0QR4bol9QZRTqn3IvT8GzoVKKYp1Wd9o28SPhyAdYGSvDqAjJNiTaLi HRxA== X-Gm-Message-State: ANhLgQ0epvZdCGtG47CaNbgZRSPbBh6xjpbj7rLQkOI4zW8e/SeqoMwG VzW6fwPy1jFt3wJNKFmWH7QVHB3w X-Google-Smtp-Source: ADFU+vvF5kTEqWE9dOsJ42A61jUlldEtS4m5hwYhJ562Ov4VD2Vr0TaqGBzKdP+ujUdw0Z5jBMH5Tg== X-Received: by 2002:a17:902:b497:: with SMTP id y23mr14780086plr.81.1584824542492; Sat, 21 Mar 2020 14:02:22 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id a10sm2206947pfi.16.2020.03.21.14.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:22 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/13] iio: accel: kxsd9: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:52 +0530 Message-Id: <20200321210204.18106-2-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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 Reported-by: kbuild test robot Reported-by: kbuild test robot --- 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; return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:01:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0751C1667 for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAE6620775 for ; Sat, 21 Mar 2020 21:02:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RRJ83wd9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbgCUVC2 (ORCPT ); Sat, 21 Mar 2020 17:02:28 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37723 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727906AbgCUVC2 (ORCPT ); Sat, 21 Mar 2020 17:02:28 -0400 Received: by mail-pl1-f196.google.com with SMTP id x1so51385plm.4; Sat, 21 Mar 2020 14:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E//bqMfh3++0a3x1eV689Eb4tyW5vXhzuzOkHH+VoWw=; b=RRJ83wd9s0+rtemr/K7ZtqReMR0422O8FtKNEYYf+FscQEMu1YFlVxBvXrnb8i+tqc +eQi3iq44LXJfwSUxiej3XmMlN3t47w3ZN4yVlrPfKm7V441aoyTy1XqSz0i0lI7ve+v EGGnlzltrY798kGJ53COgTiGYOTCd6I7npxFlFTBQCUBE1Q2Psi6CzPisYQjuaCnZ5S1 D5tp91axCtWYshzqe6Kh9y50COzZ46Jly2KhBK/aNe4gJKGDXjJ5ov2WNTZCH4HVuYli CzJglQP5ixMBmjvPjXwxr+FH1qA2xOsDVPiuu09W1hm2exB3789NURyGh7/4x63UEO0c 5oow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E//bqMfh3++0a3x1eV689Eb4tyW5vXhzuzOkHH+VoWw=; b=aJjhmy3ph7vZiLGBfTbAGr3ySR9+9Xfpo+Ts3/OJsjkaISh169Mos01RPs+JRjYflF UyCMTtN6YSRQC8yf6MFP7NU/b7pFv1K+Ip6wCpUI806C+s6Bzhdj6/mivL9lnc6Fq0FK yFCO7+MK78Hzg3IpaT44lviqBl8o27vXbxuCJyx+ghxgoOmqj3diWHrp1zhDnrSbJC+h hsIVQAe8Z10Ly55SYY20LC+Mvix73oYRoznzBUO+6f9mI+4hkzL/VrQ3h6rbkFHdMXUE z5vpb7YbMcUHIocByu5/DySRN/WBAK43l65i7tqk56uASpKl6Vq4knuCXOFwO2LMpHq7 jE+g== X-Gm-Message-State: ANhLgQ1KphD5ROGFe4TkYJiIGbInetE8cXxSbuLLUNMVHtT31OCQn1o4 TVtN787aXxoQbDzyv/72JwnygZ/b X-Google-Smtp-Source: ADFU+vtFsH28AQpZNdScVeEvnwT8Phhpe+Hr7IehCcG0HjxZbgnbjQjAf1DVaz9T6ncQuE0MqcBeMg== X-Received: by 2002:a17:90a:272d:: with SMTP id o42mr14501887pje.194.1584824547369; Sat, 21 Mar 2020 14:02:27 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id k5sm8103170pgl.3.2020.03.21.14.02.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:27 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/13] iio: gyro: bmg160_i2c: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:53 +0530 Message-Id: <20200321210204.18106-3-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/gyro/bmg160_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c index 4fc9c6a3321f..d276e3308b13 100644 --- a/drivers/iio/gyro/bmg160_i2c.c +++ b/drivers/iio/gyro/bmg160_i2c.c @@ -21,8 +21,8 @@ static int bmg160_i2c_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &bmg160_regmap_i2c_conf); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:01:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451407 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30FFE92A for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FD2220775 for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fZiFHy5m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbgCUVCd (ORCPT ); Sat, 21 Mar 2020 17:02:33 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44517 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727700AbgCUVCd (ORCPT ); Sat, 21 Mar 2020 17:02:33 -0400 Received: by mail-pg1-f193.google.com with SMTP id 37so4951979pgm.11; Sat, 21 Mar 2020 14:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vUR4vUI2H/op2Y/GeaRC3yK8z5DR9htwEZKJfMZkURo=; b=fZiFHy5m/uYRvrLNjXMZAHrmm5haL1wJZqUUYVS8TFNG8/NdiFbd3Y6lBjmvirjYwW yElptqFFX3x4QjtagMJ9sUCunoogB527OHQhQMOaWjL5oXV6DZJvc4+4x89vHMblK/Lr adNbi13AdiBjlXf1YH/UZ98u+DdH6O1MDZ+KWjuGf1ydaG01c0GbKomON/AnJarrRGET fCjVLp1Vg+qNLG6k+HJgcmrAzPzJJsYQQVgZSh6yW48OcL+RqXlCAP6qX/lgJ9FddIV3 AFlwoaKt9XA+8bGSHDj4CLPg87EL8r4C5ObV6Ze7gNssuGPMVztSAzyyG/5cjoKoYnVG 6hKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vUR4vUI2H/op2Y/GeaRC3yK8z5DR9htwEZKJfMZkURo=; b=lkxLe4dTaKhzbK3bAHmvmVHA8XqVsl0DitEnIOmUoVLhQvG3jY+5mbujFHVNmA8JvW 7Oimw1lIsUpSY/JctQOv/osSMTbJdJmXWJh2IQnoS+LwjPZi/3eiNbBISUz6jRGOUbJT PR4QRKUljYZZ0+jcYpYFDQBP9Lx8Lnsm0BYpJs+Bc20Fi8AXlRl2Xp5A+AVCDb+4Nijy szRX50zVBt0mq6/o3l5wV4kjvCDtCaTPicVYYgD9xv06dqmoq4vQap6kGJJJadUHXPep VIyFYmDGAk6Pa/hAnt4rfNWXVpgo7db1emAXAV0SD4wEQwqMM9PPLZCma7TK33ZbzAQO 5a/w== X-Gm-Message-State: ANhLgQ2avJ6UAa+RhhVB9NcUxxLLWqKaJRtXarVG2Q7JxwxcF35sZqV7 WII8zOPo3ROQHkFEcL4tvor38Z8bxco= X-Google-Smtp-Source: ADFU+vtQ+PHTX+WAs9k6d4ukit5LYDG04hB6kGndxllRgV5Vb29xND6FBoSzeRr9O2/hgaPhudU12A== X-Received: by 2002:aa7:94b9:: with SMTP id a25mr17083615pfl.193.1584824552520; Sat, 21 Mar 2020 14:02:32 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id i187sm9008831pfg.33.2020.03.21.14.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:32 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/13] iio: gyro: bmg160_spi: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:54 +0530 Message-Id: <20200321210204.18106-4-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/gyro/bmg160_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/gyro/bmg160_spi.c b/drivers/iio/gyro/bmg160_spi.c index 182a59c42507..75e63a9214d8 100644 --- a/drivers/iio/gyro/bmg160_spi.c +++ b/drivers/iio/gyro/bmg160_spi.c @@ -19,8 +19,8 @@ static int bmg160_spi_probe(struct spi_device *spi) regmap = devm_regmap_init_spi(spi, &bmg160_regmap_spi_conf); if (IS_ERR(regmap)) { - dev_err(&spi->dev, "Failed to register spi regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&spi->dev, "Failed to register spi regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:01:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5AC7D18A5 for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39CDF20775 for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZnVsVaRe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727700AbgCUVCj (ORCPT ); Sat, 21 Mar 2020 17:02:39 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:36289 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728076AbgCUVCi (ORCPT ); Sat, 21 Mar 2020 17:02:38 -0400 Received: by mail-pj1-f66.google.com with SMTP id nu11so4116864pjb.1; Sat, 21 Mar 2020 14:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zPLDUPQN9PY4WCwahZp4kxTJsPYR6KiPIaERqbHD00o=; b=ZnVsVaRerzlZE1QhvvBhBl4M2q+7eAKkzdUaMiuWa5ZeJfWrpX+27Wy+yc/IGmqbmh qcr8PWZDRI7nO7tC9fLbbE8oUK1Nm/MIoOa5O0uGqX+yTeN/Ue959IKIbQWZYcdw/TIJ NgvocFdhCg//fuUbxc2Kxr3F+OW4/0iMLmOzyxfavwAPDMTXZmqToapfFT8tOcfK6NCw zuep2cB3V9B8GrNScPHGKbwceackbEtg8l6D2BAq00TdK/J//zRPHCwSpQrUpqnLSXjD lv65yILrpqzm9UxJddosvJLWE5dcx13yswssxQz+blD30ndiwry7qri0/GJhxDNjZE3X blVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zPLDUPQN9PY4WCwahZp4kxTJsPYR6KiPIaERqbHD00o=; b=g8SnD/hDn9VJD8D2shcWgprnv/1hR94O5NYrhueGM/2UxgJT0uw+FCM1pWNH9LK3Qi KcTpdtmQJb+b5uVyjz+Q/tFN9gesH7+F6mQAifpf0rSZfqdVnUpOCWECXb2RsSnCfV6B aU4uF68pAthRUGPnFzTcLeSsfjowe2OMJJce7PO5am7tLBAzva3FL9d3CFyzdXNIZ+HS NKS+FdPmv/Ik65f0QUKJcTzBtzNf1Hdm5m2Dqoe72TvE8aKpXdjORCz2LyKMljtPoJSy eWmZlt9N4W8yzKpF5JhDfBcn7ttTJ+c2JiBz7KeyjCNxVTuVEzVCtxiRB3Ma5zDQM8Ut L8tg== X-Gm-Message-State: ANhLgQ0sYU99AF3v2H61kG30RfNfPNi1mVNmkB1kacS4D+VGuP8K8yWV 1DTueMIPjLlyuNlNsTALSMWvnzEQ4wY= X-Google-Smtp-Source: ADFU+vt3iRrh6lkZ3cc6Bq2C5qHbDXbLWYxO+GDgvQulx/+hY2u0WGEGK/AugR33qKHA1C4B3vlbtA== X-Received: by 2002:a17:902:8d89:: with SMTP id v9mr14987534plo.83.1584824557584; Sat, 21 Mar 2020 14:02:37 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id z37sm2167242pgl.68.2020.03.21.14.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:36 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/13] iio: gyro: mpu3050: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:55 +0530 Message-Id: <20200321210204.18106-5-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/gyro/mpu3050-i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c index afa8018b9238..fbac6972f77b 100644 --- a/drivers/iio/gyro/mpu3050-i2c.c +++ b/drivers/iio/gyro/mpu3050-i2c.c @@ -51,8 +51,8 @@ static int mpu3050_i2c_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &mpu3050_i2c_regmap_config); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:01:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451411 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8403B1894 for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6357320775 for ; Sat, 21 Mar 2020 21:02:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zok/kDa3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728102AbgCUVCo (ORCPT ); Sat, 21 Mar 2020 17:02:44 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37740 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728076AbgCUVCn (ORCPT ); Sat, 21 Mar 2020 17:02:43 -0400 Received: by mail-pl1-f196.google.com with SMTP id x1so51602plm.4; Sat, 21 Mar 2020 14:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1A9apg+b4EyJs+2ycxMl5PacpRpliWrxG1kc1+BpvWQ=; b=Zok/kDa3Wt7kWm3AIMB3b1QGIXG6TOyyB7qTaKGhVjOCt+m91W7zb6Rjoz4U6u3Fw3 mCf2WV04ht2Mel/uBy47693fjgsXh1eRPzbivXT6OAeFc89XAMV1YtS2EQCMTCCFPt+n xOZkbK24guPga2EL//rbUMGUn9df892EMSARcJfFEMdqIM00McIcXxb1vEsmLaepv0ud DdrIULTxb8/9NrcgojXXFmVvzdiHevQCqA6j9eBnCyfQdliEZvpvN1iJiMp5DYfOFzIX 9LHwp0f7/kDvDRu7zcHf58ga22+aGmpxxNdrNZiRUMe2kz9rCA4HxFYilAZw06nguwhb Xktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1A9apg+b4EyJs+2ycxMl5PacpRpliWrxG1kc1+BpvWQ=; b=B88DomO6Z4oRWuUV8xYYQIsspmYAowvp67WyfCxPBNbKvm9VkF0xWRh4Cj3QiyBLPl j8Git7Qsn9JDk7r4ozr1BuqqA0FfGuGzuZGBsGhduuFOWtStoluwc6di/Wi4ds2wqHqy jnU7JUf8cJg+OrBblNZvauCxZ7ZQlFC8tzXjmWD5ULp5TGJq7Y4TCfz+3JC2K6TW2o8n 1YHX3MBCQQgCmxkEjIn0ajUv6m+W4M4gh9tzA4nizvZj+kU/nJPKksmiy2FmqGFlEevp zg7iOwylTC+ssJc8PVzEvW6yTU13QgdsTdhuNxPAVa1AD4R/gXpNGavYin0U3SADMN+q BGcQ== X-Gm-Message-State: ANhLgQ3UKBRTLDtQeZTnseTzU1is14lIP4aa+T4qPmASgU/1RJGeVUzc IDO2ZCeR4XKL78WQ7iVigM+U8k5JT68= X-Google-Smtp-Source: ADFU+vt6yciclt8T8U3VHueQk+CoFcYnP+IMgsBORICJNBOosvGQ6KqHH998dgI2yEiAxnQf7EF6Og== X-Received: by 2002:a17:90a:ad87:: with SMTP id s7mr4358262pjq.52.1584824562772; Sat, 21 Mar 2020 14:02:42 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id w6sm9085155pfw.55.2020.03.21.14.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:42 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/13] iio: imu: bmi160_i2c: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:56 +0530 Message-Id: <20200321210204.18106-6-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/imu/bmi160/bmi160_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c index e36f5e82d400..97d7a39c03df 100644 --- a/drivers/iio/imu/bmi160/bmi160_i2c.c +++ b/drivers/iio/imu/bmi160/bmi160_i2c.c @@ -24,8 +24,8 @@ static int bmi160_i2c_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &bmi160_regmap_config); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:01:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451413 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6383492A for ; Sat, 21 Mar 2020 21:02:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4120A20775 for ; Sat, 21 Mar 2020 21:02:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="omXL3G5z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728120AbgCUVCs (ORCPT ); Sat, 21 Mar 2020 17:02:48 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39790 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728076AbgCUVCr (ORCPT ); Sat, 21 Mar 2020 17:02:47 -0400 Received: by mail-pl1-f195.google.com with SMTP id m1so4073283pll.6; Sat, 21 Mar 2020 14:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s2aho2z1FyUdK2dZzDAU5ewsvt7HCb+Birg8KAiBXYY=; b=omXL3G5zUt2ezV5XVEGhq/1h7u2YEZbw1RvuKUvYK27w7izcowU+mwLtArGr9Pmnmp UnglIki/NTtZNnK5j+xeB/lifUS+gNZROTRRrpV0VqRTy5koh1nVVzopO/GLoDi8flcj D81H9IMtdg97dgBWjJUFmGRUO4dO6nLsCqUW662WhiQLSVZtnKLXuGzv4LWs2nHiTkzQ jERBnTd4CV43LCQUYd89JocxXFmBIQMhK9Z26/d5bSGvfSoDj2khnWwzsnHybk5qKVnL 27TVU8y7sjE+2EyIL0bG2eamnrgNpwH2iNqu1FRJNtjmPPvbQ9XcPtj7gdNKjYRf0s+H LXhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s2aho2z1FyUdK2dZzDAU5ewsvt7HCb+Birg8KAiBXYY=; b=qdYXwQ5w8PI2UHqhmEL9i6K7JyJHJwPbbP/tZYmzTrfpPtS4daJVD7JoAbLTjsOLB4 tsij8dIe6z3vgTSg1jhsJ5fUptGAxG4jhfQUwT5B5Rx+qKpRbyIkNTASSrUyMeMm18bg fysUP8mWeEt3j1OQzP7FNOFsq9ZqwgHVqDOKDo6Axzh8TFjrTWUZfJhcr6txn7JJwjoO taMJS/i2e1vhqAIifpU8oLlifKEOTad7G0WU9mmS5IEAb93dxBfkDS4rkAD0nPUbXzha Hr9p5q+FhCz4J0Ki5d0epJFgHYVcWavnN0synSxUBGJ7vLw8H/0ZL0wadqEytfoSySu5 jb4Q== X-Gm-Message-State: ANhLgQ2AiX+oNIokVjA/5mdoc7iSjbbHw5enh3yrr6II4TKZ4B/y82y3 yfqkHyzuAs470H3lDfS01+CB4YlERIk= X-Google-Smtp-Source: ADFU+vt/Gt0ROamUB3tI7Bl6vcpW9oSr8BP61YRewdEP+lNirgByg9kHbnhTQHHoDFobpxT/ZPbIfg== X-Received: by 2002:a17:90b:11d5:: with SMTP id gv21mr17512752pjb.191.1584824566817; Sat, 21 Mar 2020 14:02:46 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id 184sm8236778pgb.52.2020.03.21.14.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:46 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/13] iio: imu: bmi160_spi: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:57 +0530 Message-Id: <20200321210204.18106-7-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/imu/bmi160/bmi160_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/bmi160/bmi160_spi.c b/drivers/iio/imu/bmi160/bmi160_spi.c index c19e3df35559..b52085937fb9 100644 --- a/drivers/iio/imu/bmi160/bmi160_spi.c +++ b/drivers/iio/imu/bmi160/bmi160_spi.c @@ -20,8 +20,8 @@ static int bmi160_spi_probe(struct spi_device *spi) regmap = devm_regmap_init_spi(spi, &bmi160_regmap_config); if (IS_ERR(regmap)) { - dev_err(&spi->dev, "Failed to register spi regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&spi->dev, "Failed to register spi regmap %pe\n", + regmap); return PTR_ERR(regmap); } return bmi160_core_probe(&spi->dev, regmap, id->name, true); From patchwork Sat Mar 21 21:01:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1BEE92A for ; Sat, 21 Mar 2020 21:02:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A059820836 for ; Sat, 21 Mar 2020 21:02:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MiZQhITh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727628AbgCUVCx (ORCPT ); Sat, 21 Mar 2020 17:02:53 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34931 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728076AbgCUVCw (ORCPT ); Sat, 21 Mar 2020 17:02:52 -0400 Received: by mail-pf1-f196.google.com with SMTP id u68so5292917pfb.2; Sat, 21 Mar 2020 14:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7hmgJGWzVkKtIDfK7DCr04tH78rbXV1H1joYwA10/tU=; b=MiZQhIThLfh4XVRHc8IBfzzuiRv8TlTbh8grovFpxGZa7U8xuFk7DbFToQe5bY4zFx 8OVfbc6D3EPoA2bozUlKyKYzPiiYmXVsZuKenGslsaaLGHQTwiLg5K2FrNKncsThaFoW +1WX9QX99Nena0M7phmGkgl/EiVolxdUQxjrcw+PWrzzg0acXJU7gMBbtP4C9x6A0pGH n6Dc9zfV+5XMwM5e3UJpaWJTHdWWWVe1nIK01L5WGLkyFhyiHFCihUA4k+msokkqHkuT Wh9PXcspAd8lI2waRO0gf/SXCvlB4bodqRqef5HLWkQm69hhbED1rSvf1o9+0eINAeCu qfig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7hmgJGWzVkKtIDfK7DCr04tH78rbXV1H1joYwA10/tU=; b=N/E2vEK4MbV3FU0tMU3V1DNKDgLZQGBSZDl0TOKM9uJm/zxgHp7hTrwNbYG0PHcsxx Pf3NmDGuUAPehPbgp9/uFq0W94xr/U/BkMkRfDPLakKIftukTXXfN9+DwpPirdqSWmUo sgiDeQb2YLKAl6ZaqLkCUdL9EtLjttQwgJf7ukFwYIEg5YdJN5cdG8O8CvV+FDEZ/XRU cEE32J5nm6vXGXv24dtCH43BZdFNZsUcbW36UP7akn1YuQSJGAUVXYjt3bLl4lt63wKA hwJzNRK8TOVADZHJG27/RpV5Z/DzPX1HUzWfcuP0s61GETuoSz2lA80+7y643JfngqAI J+5g== X-Gm-Message-State: ANhLgQ0+B1LC7/MgogOiEwkbNfZ5ipNluIk8WD1ZRVg0Y7wsHwNMi19E D4hcS2hR8/y/alK4HwvUaS4EmiCLbnc= X-Google-Smtp-Source: ADFU+vsuHgHA1RyuqhAoQFgN8y5rXzAikx4GnsZJ/SIZ+B6w2q/qkOPftFI2WKN7xoNK1S7P9eDI5g== X-Received: by 2002:a62:820e:: with SMTP id w14mr17043681pfd.59.1584824571541; Sat, 21 Mar 2020 14:02:51 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id m9sm5550818pff.93.2020.03.21.14.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:51 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/13] iio: imu: inv_mpu6050_i2c: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:58 +0530 Message-Id: <20200321210204.18106-8-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/imu/inv_mpu6050/inv_mpu_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index 6993d3b87bb0..5588946dd60d 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c @@ -122,8 +122,8 @@ static int inv_mpu_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &inv_mpu_regmap_config); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:01:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451417 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1B5B1392 for ; Sat, 21 Mar 2020 21:02:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 800A52077D for ; Sat, 21 Mar 2020 21:02:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y6K1mkGA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728016AbgCUVC6 (ORCPT ); Sat, 21 Mar 2020 17:02:58 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40946 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727883AbgCUVC6 (ORCPT ); Sat, 21 Mar 2020 17:02:58 -0400 Received: by mail-pl1-f194.google.com with SMTP id h11so4069822plk.7; Sat, 21 Mar 2020 14:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d7GKDF50XnkZ+DrwxrjAqJqC7VsUaW4M1DlGKJ84ra8=; b=Y6K1mkGAMsOub4j68QY3+sa/ZN/+N0aZrTS9gO4K2e1DETgGhuLRkao9DjNs63raLI TXVwrSdOqkOCim8QAi8Q9YZ4PZug3orRYmqIf1XAsQ6L3dWFCgv2aBKHbzgnobJbSKw8 T+5taZ4dbuU8Qb7Jl67j1sF0WmWNAu74o7cwzYzo9lGXiaFI6LlBfd1JATx2al18bIR/ Kdzor+OR8LWw+VFs7iisbrmcBRPzhsVUp/jb4+sX3Rj7uF6gIWy/X5yVzJ8ydBWjKSxH +wu6bTbeBbo0n9M+f/po3uZHkcp7ditvd3+cmpoxntgxuFH+CEVgz+bRWhoEuVdmma0d IyXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d7GKDF50XnkZ+DrwxrjAqJqC7VsUaW4M1DlGKJ84ra8=; b=YkfLr7Hp86dT19v9+/FzMb1SpwJHO6GJfgb9KOk896QaOA8QC0oX17ag9FBxGZPA+D qUMJBJcBhrHX9x8aAqjfat82V7zQXxYtdR5UNBbVHqxJ8Bl+A/4YK/iiKf7LwxqA+A+G avFmGL8Veyk2HWaKc/0tZMLurMPyRz3IlsxyUI4MvXbqM8rjIKd4bzNk9cWRodLftw7D 1xX5ko+CgA2zH1RdILzlbJ/kFGU9iFKSHEaIJ7s2p8b8r7WkdC5FLuxHqrsr4v6rCdj0 8v91+1dvEBgSGflGY8RbkOtbqc/kYnrKwCFGbm9DswhaI+e9x6Yzjwgu9vUU4SUAP/3d afaw== X-Gm-Message-State: ANhLgQ1gY8yDauzixaRnbn5CVi7/wYLr5QCmrIZaWrA/DU3WOKIVoNlV qg2Cc5RnAgkJEWy5pYlZmBzgwqkK/5M= X-Google-Smtp-Source: ADFU+vszA/WWf8CSo2FHjddz7c5XEg/XRI/tXEJoAgHWGiYcgMwLlVsLUGzbOvPdu/d1DXqevEzS4A== X-Received: by 2002:a17:902:b088:: with SMTP id p8mr15170011plr.106.1584824577792; Sat, 21 Mar 2020 14:02:57 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id f15sm7078472pfq.100.2020.03.21.14.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:02:57 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/13] iio: imu: inv_mpu6050_spi: Use suitable format specifier Date: Sun, 22 Mar 2020 02:31:59 +0530 Message-Id: <20200321210204.18106-9-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/imu/inv_mpu6050/inv_mpu_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index 673b198e6368..fa1d571cb4b8 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c @@ -53,8 +53,8 @@ static int inv_mpu_probe(struct spi_device *spi) regmap = devm_regmap_init_spi(spi, &inv_mpu_regmap_config); if (IS_ERR(regmap)) { - dev_err(&spi->dev, "Failed to register spi regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&spi->dev, "Failed to register spi regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:02:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451419 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE9311392 for ; Sat, 21 Mar 2020 21:03:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADB3E2080C for ; Sat, 21 Mar 2020 21:03:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="udXM7Ixf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727883AbgCUVDF (ORCPT ); Sat, 21 Mar 2020 17:03:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43356 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728178AbgCUVDE (ORCPT ); Sat, 21 Mar 2020 17:03:04 -0400 Received: by mail-pf1-f195.google.com with SMTP id f206so5287519pfa.10; Sat, 21 Mar 2020 14:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VkJnIV/tJhzhuy7HiqUZ2Wob18zmxSRsMZRCDR3lluU=; b=udXM7IxfQiG7Wm4yoTLoQD9d1mXQgjNa27CCVkN+eY+60+dNcmc+GIKvvFF4IO7dF7 Mf7bSKeIOFOFkA21heRrdmnDqi/Gevhp9iiLhCaIoTEv2iQH2RdSnakzJIkMflqHEC36 RRgfKqHce6K+HfuU/ApiV84t+oApmwKPkC3a19EoC/P1kG8sZVVgqzOVuh9zt5ALtbjT NZfsSwMLwJAP1D5iy2NWmBNiY+rhgfIrWcQU+mK2B9V0SWnjr0COr6/v9SvZa6Njiucg HaQ197OFg91qAaDdLnr1qBGefMoMGPrKTkd15wmnqSn6Fuw6pbmOW2g0Rbg7vvcTR3Bp mTxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VkJnIV/tJhzhuy7HiqUZ2Wob18zmxSRsMZRCDR3lluU=; b=pYQ3apBBpfqfPwXYgLAuLF1rVDPP/lE1QLsK1avyY3XEAVVgWm6uD426uECxJYdKUB zqkzyzcyxk9PZUnIyuxRA8Wx1bV7GCEkrIYv+8KnW0YxLBZr66aQOAi7BjUpvk8pCBZn WGgmDQ0syZbaasdF2EEaeJDHep7jKrCJqdTtRIG5aekw+tZpL0hUgWV4bXZKMjS/CIii KKykxDQfywBLwRZR9dSZgOZJGx56dYUwnWXPDS8f/fYEV8g+wRss/LyA/JkkJhyZUIZl Pzh3BJjWofN+Q4+zUB8a6yspE9TV5B5xEJYQI0+Iw2p9ePg5FjKjGNxEF5L7u0TN+ToH q36A== X-Gm-Message-State: ANhLgQ00rQbZs8ZzA7DsbGSccU0itxfG13VkuNYlDm8Xoa5kqVc9l7CV sFJzEqWSrZZZ+7cai6kHaHyxvP9yN7E= X-Google-Smtp-Source: ADFU+vv4j9N7hCCa0/x3M03ATtcQhXBAv79bBifuc8/RisPqP5tzIIT6Y0By81cmyjN1XkDXI7jNeA== X-Received: by 2002:a63:b648:: with SMTP id v8mr14125474pgt.397.1584824582235; Sat, 21 Mar 2020 14:03:02 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id x188sm9160466pfx.198.2020.03.21.14.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:03:01 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/13] iio: magn: bmc150: Use suitable format specifier Date: Sun, 22 Mar 2020 02:32:00 +0530 Message-Id: <20200321210204.18106-10-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/magnetometer/bmc150_magn_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/magnetometer/bmc150_magn_spi.c b/drivers/iio/magnetometer/bmc150_magn_spi.c index ed9be0490d77..7f42ee04a6b7 100644 --- a/drivers/iio/magnetometer/bmc150_magn_spi.c +++ b/drivers/iio/magnetometer/bmc150_magn_spi.c @@ -22,8 +22,8 @@ static int bmc150_magn_spi_probe(struct spi_device *spi) regmap = devm_regmap_init_spi(spi, &bmc150_magn_regmap_config); if (IS_ERR(regmap)) { - dev_err(&spi->dev, "Failed to register spi regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&spi->dev, "Failed to register spi regmap %pe\n", + regmap); return PTR_ERR(regmap); } return bmc150_magn_probe(&spi->dev, regmap, spi->irq, id->name); From patchwork Sat Mar 21 21:02:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451421 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E242292A for ; Sat, 21 Mar 2020 21:03:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C16A7207FC for ; Sat, 21 Mar 2020 21:03:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Acd88lIX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728214AbgCUVDJ (ORCPT ); Sat, 21 Mar 2020 17:03:09 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37763 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgCUVDI (ORCPT ); Sat, 21 Mar 2020 17:03:08 -0400 Received: by mail-pl1-f194.google.com with SMTP id x1so51940plm.4; Sat, 21 Mar 2020 14:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ou1806hZf5a6/SMiX5rJwc8I8qad8Hu9TTDtljd6kFk=; b=Acd88lIXt4JBBB3qWa9Gttt9jpjepRhlj4xeChI7qgwVnpwg4DC1ZzwH8dgxlRQMSq cLZBLFDLf1LQ7bE/B9XFZ6oFQPLQzwVOp1ZPNmTiouVtbdc9BN3QL5AV/a/1kKJ433Z0 Sgyxst6XS3ygjGCBbckWjebLKM1wtxsTseCYgprIbhyORQd5Lwj8o+cAzLFd95zAV8Zq 8oM2PxiTy/zWL9uSQs72b2RNecue374D2oty0CQCZwJTVqSv1kNhBsR2R74Gl3lfCiO1 YiEsZxZGaP/5tXMAZscnJ1uduISMzSaC2t1Zp7brugcRtieKk0ufUWiAkEjS+MKul4YA jNoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ou1806hZf5a6/SMiX5rJwc8I8qad8Hu9TTDtljd6kFk=; b=GfN2Alv1lweQd8YvLmCjlU4DDbTQMkYa7HNnlIPUT3tc107bDedr++F6WJJgDzBjfk OXyhrPelRmpW+g76qGRaIYPYJsD0frkMNXaif8b1IBNBU8jJv0Q7SJ+fal1s3UJADSDc HP5h1cMSYdXk8RNKUjdHiirbUkUsjBnFZaRTG+FLNsckTNRtX7+cCXO91nxoq3YMmM9X nvU7I4zkuUBoq3fHgLUbQlh37wZGXEGyhnW0HQSip5FZNmhO5NKBzIDbMXguoWj+5eN0 U2xGqbscfZEIXiY8XH9ZA4oFF76Tom5n5NG8D99fX51jTTJ/84co2yzHVwytnC0ZTxPl 09ug== X-Gm-Message-State: ANhLgQ07RozaVz55ApeHW1xnRjp4Pbz4a2h5R12x1milse+ll3hMWTak UX9QPVJv6s5QbjcTIbADI3OP2+Ltf5Y= X-Google-Smtp-Source: ADFU+vtmQR3dybuZFcLjBToEkfSMA6oyJrDnsyNdNEclibBjfvJftnnifZAf+u+8oKLKAS1ygRRcmA== X-Received: by 2002:a17:90a:9a90:: with SMTP id e16mr16580895pjp.164.1584824587664; Sat, 21 Mar 2020 14:03:07 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id z26sm7424131pgc.5.2020.03.21.14.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:03:07 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/13] iio: light: st_uvis25_i2c: Use suitable format specifier Date: Sun, 22 Mar 2020 02:32:01 +0530 Message-Id: <20200321210204.18106-11-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/light/st_uvis25_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/st_uvis25_i2c.c b/drivers/iio/light/st_uvis25_i2c.c index 4889bbeb0c73..7a1185a874e0 100644 --- a/drivers/iio/light/st_uvis25_i2c.c +++ b/drivers/iio/light/st_uvis25_i2c.c @@ -31,8 +31,8 @@ static int st_uvis25_i2c_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &st_uvis25_i2c_regmap_config); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:02:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451423 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF59992A for ; Sat, 21 Mar 2020 21:03:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEF712080C for ; Sat, 21 Mar 2020 21:03:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MKafsdAe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728231AbgCUVDP (ORCPT ); Sat, 21 Mar 2020 17:03:15 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:52355 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgCUVDO (ORCPT ); Sat, 21 Mar 2020 17:03:14 -0400 Received: by mail-pj1-f66.google.com with SMTP id ng8so4146266pjb.2; Sat, 21 Mar 2020 14:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YhmrCCr2VKlc28KIOh4AfuOVE801CwlQGUjtjOvqgPY=; b=MKafsdAegpBG18CRekmO4/CUq3+JkrIiOkTlDZoEqu+dyhtRnzjgGGpMQ92kEMBVC8 9/D0l/Qd1mmn5wN3HHPPFLWED+IMu96p3BmiRSVPhJTiykzK6eVEH+0Mp5v3xEM/l2oH I8XnePrC+YpgBR856gB90iCgBs0/jZtLxUFY3heMZnCEKqNzUvNMDH4iZynrHD5/82rd qTaoNF2WIbqn1iPTMAz/sfGNS/omCNAnikuArDaeyhYIdWNfNAJuIgoHqHBaTOcCtmPK BIix2TbePXm/DWVtV+5ieyewiD+F+NQdOnvsrPiqYUYi2Lc8vZ8jOT3n7III70oYoyIx hNYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YhmrCCr2VKlc28KIOh4AfuOVE801CwlQGUjtjOvqgPY=; b=YUct8QuHP0AAj+gEKnMwEl6AoBO34fCCZNkV/ae2KZ4a5QRTMRnvRCQ+IquHuduU7p b1243LlRCIbD28SqYQ8JcVosVFaw2Tzig4VxcCLBCj5T630uLaxra/FPZMhTCwlpDixH 5Rl3Fnzz4AMbiSgI73bc+9UdYmqRGXWE4eqao6joMD5fYNdw75UAoJOGFF1X4EFA3AIV VaUC6k1NPj1yrrbzTzsnt+Xm8ZuuU32fEeT77pMmzG7ndgO2NxfTSMdVL2Y75JRWNGs3 U+/PpxG0q0W4A084orAB22+n21t+9JqYnALimi9yJaryPa4YbTBveQp0mo0u02B6LoLa oZxQ== X-Gm-Message-State: ANhLgQ3yfVdHOsvFGRbgJoVDRURPHlmpflnACLA9NlcANHrySyMWfWVI 7srS5RP4LAZ2wlDJlNIIM8CM2tF3Mus= X-Google-Smtp-Source: ADFU+vvhn+4ADEow0QnQIoawR0VhrDW7Zs2E5wALd6cthCQuEYsuXAGAL9OeB8YkK1NExj6GC2K6Rg== X-Received: by 2002:a17:902:b187:: with SMTP id s7mr15328253plr.84.1584824592527; Sat, 21 Mar 2020 14:03:12 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id b17sm9170167pff.81.2020.03.21.14.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:03:12 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/13] iio: light: st_uvis25_spi: Use suitable format specifier Date: Sun, 22 Mar 2020 02:32:02 +0530 Message-Id: <20200321210204.18106-12-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/light/st_uvis25_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/st_uvis25_spi.c b/drivers/iio/light/st_uvis25_spi.c index a9ceae4f58b3..2afc3fea7357 100644 --- a/drivers/iio/light/st_uvis25_spi.c +++ b/drivers/iio/light/st_uvis25_spi.c @@ -31,8 +31,8 @@ static int st_uvis25_spi_probe(struct spi_device *spi) regmap = devm_regmap_init_spi(spi, &st_uvis25_spi_regmap_config); if (IS_ERR(regmap)) { - dev_err(&spi->dev, "Failed to register spi regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&spi->dev, "Failed to register spi regmap %pe\n", + regmap); return PTR_ERR(regmap); } From patchwork Sat Mar 21 21:02:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC0201392 for ; Sat, 21 Mar 2020 21:03:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBF6320842 for ; Sat, 21 Mar 2020 21:03:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gu51XIla" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726539AbgCUVDT (ORCPT ); Sat, 21 Mar 2020 17:03:19 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36333 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728257AbgCUVDT (ORCPT ); Sat, 21 Mar 2020 17:03:19 -0400 Received: by mail-pj1-f67.google.com with SMTP id nu11so4117427pjb.1; Sat, 21 Mar 2020 14:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K3U7fmyEYyX+IvwOON45NT/bPxq4zbojKTs/T1zDlgg=; b=gu51XIlaeq0ktKV5u7yzkquaxiXzZ1nQbRVsc+akrH1yhj1m0DU/m6cFbFmqkYz3hC XbrWIGTYM6q55GcsYea7Nn3c8hFH3UAG7xx5f75+//ygXm6iPJwMkGyGOeiyhAEG7zZ+ lyMEaUdY7e2K/XXnlUP3yxwH9NJKNHK4IqOPoXa4dyFRgQaFd9rxdYWNvtjb6bfMS+UT whQe7dL5NxDq881giaAc80mIvJam6Q9Llro9QqnsnkhrL/0UEhXYNtM+enSLyDlNHdLL ZY1J+nH8PKAfaQykCtaWPTgWGzWVL56H7LrwlOOAg1n2hOIn10gB7f2UriAzvUxftgm/ aFHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K3U7fmyEYyX+IvwOON45NT/bPxq4zbojKTs/T1zDlgg=; b=i02QiyFUguFwfVVvzyxe64wimQzleqd4V+fTts/jCUPF/N7HczoS/q3D8ArHnHhM2W 25Wd20GH+oaeN4E/V0eiORpo630CjJSO4G45nOOYf/6rvjCUOF6dvLDHthgU/iuV2Taf yWk2NmT9xhJfgIzooNW9WE5vRmqXGPCgWyLp+3K617+T2xNLDNZYC7lHESulN53fP80T +y7IjA+Fq8ZCVzYVbDIOsT6o5Zc9h+RgJ46aXyfArlGMtv0Y8GV9pPQ04Uwkk/psrwcI cnFHwhSGzuoPUPB8YcOyZiB/Nl1qraRm9pU1x+dwdsD8Bs6iv5i4UiOOl3/CiH5ymhkW g6lg== X-Gm-Message-State: ANhLgQ1bIla4lEW3xXn/ByD2VhDDzgJz8fjeEWsWSM7m9ufsaBa83Suw GbAIFRrBk5EOm5j9FIckD0ntT5iKw/0= X-Google-Smtp-Source: ADFU+vuS4wys7i7R2wiGzBkzJy4En0numHwANHdN+Gh7xxWoTQQZwAN91VMb6luKPZVEgJCJntAG9Q== X-Received: by 2002:a17:90a:7105:: with SMTP id h5mr16772757pjk.54.1584824598265; Sat, 21 Mar 2020 14:03:18 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id l7sm8798436pff.204.2020.03.21.14.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:03:17 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/13] iio: st_sensors_i2c: Use suitable format specifier Date: Sun, 22 Mar 2020 02:32:03 +0530 Message-Id: <20200321210204.18106-13-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/common/st_sensors/st_sensors_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c index 286830fb5d35..6f2f6915107d 100644 --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c @@ -49,8 +49,8 @@ int st_sensors_i2c_configure(struct iio_dev *indio_dev, sdata->regmap = devm_regmap_init_i2c(client, config); if (IS_ERR(sdata->regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap (%d)\n", - (int)PTR_ERR(sdata->regmap)); + dev_err(&client->dev, "Failed to register i2c regmap (%pe)\n", + sdata->regmap); return PTR_ERR(sdata->regmap); } From patchwork Sat Mar 21 21:02:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishant Malpani X-Patchwork-Id: 11451427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7D5A1392 for ; Sat, 21 Mar 2020 21:03:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97C042078A for ; Sat, 21 Mar 2020 21:03:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RA7I2FyC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728196AbgCUVDZ (ORCPT ); Sat, 21 Mar 2020 17:03:25 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:55301 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728212AbgCUVDZ (ORCPT ); Sat, 21 Mar 2020 17:03:25 -0400 Received: by mail-pj1-f65.google.com with SMTP id mj6so4140850pjb.5; Sat, 21 Mar 2020 14:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ISJDxYcNYwrHzHLY1hairRUTWGOjeAfmeJMLZDyJzbM=; b=RA7I2FyCwTXqAIFLyAcHsYuaPekEEPhXzhOyMHBed7fO5es13LbkG+NQel8BIK6wGj ZGkfBtMOtj0gaY2hg/zh+kLNHHqHiT6aPTqjyODcoGF497kddcLgz6jEDpa2teBrZ8t1 12DN3xOu6cgrsKJzK5wBhPOpH0LccPdN9ysKsaAbgS3PZAG7ViCpJGlWIAtKooAYL2YW 5sQ5dAjDQeEb6lWAit/zPwtl5jRcHEA4FuPMkjdXpoYAU3uCymLDn7o7XgtsrZpM4NZp qd0G6CmZNoqfklflZvo6Wbv+BACM7y473NTLi47KnTlC4JZWSon5J2OXxPexpRU++aqr B/Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ISJDxYcNYwrHzHLY1hairRUTWGOjeAfmeJMLZDyJzbM=; b=i+J2tPOT4cd6htPJrHRv3tt8L5nCAei7bR3B5bsjYmCWA3YjVG/FNliNO/+e/g+2Mh E6xObYPJB9nm3EK3kCH7PwvdE5HNua6ZAosafyjaNjnHVCbg6aBDbhvAVpzvaLgY+U3E l2VbE/yy+VHx9d1Ejfonq3XQ5NwJVIxnhcRlx4GX+MqlBt0ItTkgsuVkCgPPiu1bK4lD QevHvEJ7VjsUDDJqF+Vm5qFroS8tOBcmJVjp2TSsTJjrUXVMrJZt+rNZVFg/ieTPmJ83 5I+V3+Sb8ZIH/MTGRvIFYIeq8h52stzidEnvMilASQSeH9Lx0sv35SHsVWFfCB1j9wSI pRuA== X-Gm-Message-State: ANhLgQ2piLCLlguQyTP227+JOkXo8Te0BfskPbNDNr3RtepS7/lqvdll pFnRD5t/USQ6QGJaejFAynNC0yrfSak= X-Google-Smtp-Source: ADFU+vvajlpR5QRnV3pGnxcrHEBhRSUrvVqR6LmKzk8FmuW7RRq8AbM6m7Pjc8w2az+lOimebYxdeQ== X-Received: by 2002:a17:902:54f:: with SMTP id 73mr14561917plf.255.1584824602950; Sat, 21 Mar 2020 14:03:22 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:488:8b8b:892d:8d8:1a6c:acda]) by smtp.gmail.com with ESMTPSA id f45sm7839396pjg.29.2020.03.21.14.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 14:03:22 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: andriy.shevchenko@linux.intel.com, joe@perches.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, nish.malpani25@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/13] iio: st_sensors_spi: Use suitable format specifier Date: Sun, 22 Mar 2020 02:32:04 +0530 Message-Id: <20200321210204.18106-14-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321210204.18106-1-nish.malpani25@gmail.com> References: <20200321210204.18106-1-nish.malpani25@gmail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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/common/st_sensors/st_sensors_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c index 1275fb0eda31..052fb21f2769 100644 --- a/drivers/iio/common/st_sensors/st_sensors_spi.c +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c @@ -101,8 +101,8 @@ int st_sensors_spi_configure(struct iio_dev *indio_dev, sdata->regmap = devm_regmap_init_spi(spi, config); if (IS_ERR(sdata->regmap)) { - dev_err(&spi->dev, "Failed to register spi regmap (%d)\n", - (int)PTR_ERR(sdata->regmap)); + dev_err(&spi->dev, "Failed to register spi regmap (%pe)\n", + sdata->regmap); return PTR_ERR(sdata->regmap); }