Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp458180ybh; Wed, 18 Mar 2020 03:09:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsM8LLb/W4Yk7JcZBgZQb6Xyj4tpIr1kOSXG082dvcU4roaZy40wspIKtmf7vPNmYRFna0T X-Received: by 2002:aca:450a:: with SMTP id s10mr2467968oia.25.1584526199178; Wed, 18 Mar 2020 03:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584526199; cv=none; d=google.com; s=arc-20160816; b=mwUA4cg7HI24B57CNbvh8SyWved+yR32FEDtcN6Qerqhm2CVBz8JIbm/CcKm0RfX0o YXjk8wS6LEUHpYqL7uILmYHQ3aQFmV6Vh1cFYmLS74Fg9W3KnE3dWOB4gbnZNrjdslOb fp3fpRGL9hDN/4aWMo0X3O/Z59vmpqIug2Gmngx5pxYG6/z32+R8LsWMCP/PJfDou6az 2EsvebpzOY4CM2B4L17bFQEfGHTw6Kpsc6su+eioOptwvpl/Icw942J+UYXkBTHwWBoG In2avmlgUaCb1COB1BhiTtKd7JmYJ5fbIdtYU1lnmi0uOAfSd7lgRLd10dtqr9/Yc3ij l1Rw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=pIvA0oesXfA4T0Iz+rrGcY1FoQcleU40920J5Q/l79M=; b=D47qs/7BWdknXosOn/7akBiIpMHgbb+NNYo+RLXt3brw2XyKJollYLTOfJxjOCzjDk p6B+iQMzK70dSrqrNVJzE1QrhuiJurmrChTDApqhhoOdyWzKzgLxFOyQvUvYVhKKxFWq iuHGmGbB7fHYgl8hmQH4f5HphYJaT9XAEXnwRMLcWML+tV5ZnpIu2hXl0rbeEXzySKez oKBhjAkCJg5X1VJc96JN1DEHb8pkCcDKAQXmclRhhWGss4NYqvxZp6x59GJnCzjB6A6F fvMmZLKci3xnrCBQLvGbVg/dmFY9QFVD9YwCEQDeAaxEJtLX/qt2oNp2m2qz7JyY4wZq W0IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YFE5B2T7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si3222655oth.222.2020.03.18.03.09.45; Wed, 18 Mar 2020 03:09:59 -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=@gmail.com header.s=20161025 header.b=YFE5B2T7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727354AbgCRKIJ (ORCPT + 99 others); Wed, 18 Mar 2020 06:08:09 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37706 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgCRKIJ (ORCPT ); Wed, 18 Mar 2020 06:08:09 -0400 Received: by mail-pl1-f195.google.com with SMTP id f16so10976566plj.4; Wed, 18 Mar 2020 03:08: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:mime-version :content-transfer-encoding; bh=pIvA0oesXfA4T0Iz+rrGcY1FoQcleU40920J5Q/l79M=; b=YFE5B2T7Co1QYAx4+PGIDS8NR7Pup3Kq7+dp0xyYRKfmaRw2ymHwnrK9zGYA4G/eXL +UH4Hk3m/CrJn1OsgrrdqbDbEleek8uiuTcvYMUuzGILtxcoCrqvuF4uRhHgL1rq4elx Q46ZO8JD/Mw/GltinCGR1VZSUFHZdUKGBJB7OSZyaZZ55NkugJoi9OUg2bQQMvlrhkuG Bj33Wpm+Ne5PIGFrrcUq/t5TGZxh+kyXU7xma25sVeU/br8ftOffIR8BP9JhZHq1UCDs Up+jQwwNIAa5nLUnIG40i3ciNfX9vuFBWbUzJbs+apscdOTnsa2s+tEKhBLIB2xvnPl6 QavA== 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:mime-version :content-transfer-encoding; bh=pIvA0oesXfA4T0Iz+rrGcY1FoQcleU40920J5Q/l79M=; b=n9hR6Qrsn2OOZxxoUdt2ZAvYNyNyIWQb1wstGqPWrytsCMUzUEcF9EoXfFXalj341E yYa0yOM7v7uTU5KjccBSu6Wx/5EGiaa5sUxZXs71nu8lusgjwDgHKKA27cdqF1q6Duf8 jnFwfh7F4YaITJ/nvoMmw2NNJfqQxI1X6RWtnEsTrw2lqOXpmB+Rg15rifRlgyUFNDma 5swXH7LXfpNHUGU1e6/N9Tj8Nir5eYefp91X0hg50gDzhB2YRk4M9CBcoEk3ue96G/39 JK1tMYtN99ZWtwXyb8qPQv7mD5Rkk/0WYQrTJcg00TRhP0XhI9R58SEddWzmjZu5Ihjt 2nSw== X-Gm-Message-State: ANhLgQ1FQx1pqS9h6yUZh0+25C+9aVkXf00S2u4OCPPWoJvFpLVSM5RF TwvYTDMu+A9Tir2SGL5uEhHpr1qH X-Received: by 2002:a17:902:ac85:: with SMTP id h5mr3005096plr.76.1584526087081; Wed, 18 Mar 2020 03:08:07 -0700 (PDT) Received: from nish-HP-Pavilion ([2409:4072:6086:470e:bc8d:c185:c429:a95b]) by smtp.gmail.com with ESMTPSA id g75sm1919565pje.37.2020.03.18.03.08.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 03:08:06 -0700 (PDT) From: Nishant Malpani To: jic23@kernel.org Cc: 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] drivers: iio: Drop unnecessary explicit casting Date: Wed, 18 Mar 2020 15:37:54 +0530 Message-Id: <20200318100754.25667-1-nish.malpani25@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Provide correct specifiers while printing error logs to discard the use of unnecessary explicit casting. Signed-off-by: Nishant Malpani --- Based on previous conversations which can be found here [1]. [1] https://marc.info/?l=linux-iio&m=158427554607223&w=2 --- drivers/iio/accel/kxsd9-i2c.c | 4 ++-- drivers/iio/gyro/bmg160_i2c.c | 4 ++-- drivers/iio/gyro/bmg160_spi.c | 4 ++-- drivers/iio/gyro/mpu3050-i2c.c | 4 ++-- drivers/iio/imu/bmi160/bmi160_i2c.c | 4 ++-- drivers/iio/imu/bmi160/bmi160_spi.c | 4 ++-- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 4 ++-- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 4 ++-- drivers/iio/magnetometer/bmc150_magn_spi.c | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c index 38411e1c155b..6a2fb2e84170 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c index 4fc9c6a3321f..abb11855e1b2 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/gyro/bmg160_spi.c b/drivers/iio/gyro/bmg160_spi.c index 182a59c42507..104f1bac7805 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c index afa8018b9238..9de9ca295742 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c index e36f5e82d400..6179d60d3968 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/imu/bmi160/bmi160_spi.c b/drivers/iio/imu/bmi160/bmi160_spi.c index c19e3df35559..38fc4d124cc0 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } return bmi160_core_probe(&spi->dev, regmap, id->name, true); diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index 6993d3b87bb0..90f1f4c79605 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index 673b198e6368..7ee275547531 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } diff --git a/drivers/iio/magnetometer/bmc150_magn_spi.c b/drivers/iio/magnetometer/bmc150_magn_spi.c index ed9be0490d77..f4afad0c44cc 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 %ld\n", + PTR_ERR(regmap)); return PTR_ERR(regmap); } return bmc150_magn_probe(&spi->dev, regmap, spi->irq, id->name); -- 2.20.1