Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp724217ybh; Wed, 18 Mar 2020 08:02:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt5xac29DB7+p+L7FGqVDV8hqXAd+TcVglCCLiMofCuE0gGfvbaRug7okpLRnKTNOCtVKlM X-Received: by 2002:a9d:720a:: with SMTP id u10mr3949949otj.177.1584543732416; Wed, 18 Mar 2020 08:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584543732; cv=none; d=google.com; s=arc-20160816; b=WpaP3pG7H0nACAYzpAImgwdQIc7hyZYEKC0VPljr7uMmElmW9GI40AGKsY0ttzZU8O JYNZI67dVIjiL5IDN1xHDptn1FGIQ0BIsoUDFR8WOt5IN7lKcy8UX/4s9/KaWQmcSaIU EIM55TfednmeI1mMGXya3G0FZffTNO/oPosWder4TRcR7nFqHyYbKVNr/s0z3j4DcBme fhx/nbglSaYo4ZdQ+KI0TD5Ey1dUFvmLKlhkGbuuzmjko04oxsiVphHmuztHvQ0fM/fq e113KZmXOYI34p/I3kUx9GEYXO2WUxTT/eWg2k4Vts995NA/k44Jyq6e/8wVNQMuI/aZ 29wQ== 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:date:subject:cc:to:from; bh=7Hrezf/zfP7HJ+Etlp2QvVS+grE9pv4iEVEGZ6zraQc=; b=x6m0fT8symxyIuUM+pH6bh/FpJNh1kl04EFeompLEQsyCCiZCXrDpsIDuEAbTnkBl0 uQWmA2l/hSCfROFQIVlivCCpwQiBzGnDmpFM15U2oBkjHw/mRH4BQMelAB+/1pP/eunk M510ezulbTxuP+5s5nzI3Mts28jSZMotQl1bLSmzOBZhJHtP4ngC1psDRn5vffOVdrqD xiZ8q6JjpudTHigNpqvvtPteB6l72F64X+Q6cUAjfAy13cDesny6o6CzvoowkkMgeSFT pvhTNKzs77GXl/BWwi6vDbBaecobUuq2ofTjgWTbx4I6ReAR/uO67I2WYUaSaNzGRTCY g7Vg== 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 r3si1952235oth.149.2020.03.18.08.01.39; Wed, 18 Mar 2020 08:02:12 -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 S1727177AbgCRPBO (ORCPT + 99 others); Wed, 18 Mar 2020 11:01:14 -0400 Received: from sauhun.de ([88.99.104.3]:48466 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbgCRPBI (ORCPT ); Wed, 18 Mar 2020 11:01:08 -0400 Received: from localhost (p54B333FA.dip0.t-ipconnect.de [84.179.51.250]) by pokefinder.org (Postfix) with ESMTPSA id 2A5E62C2E7D; Wed, 18 Mar 2020 16:01:06 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, linux-i3c@lists.infradead.org, Kieran Bingham , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Luca Ceresoli , Jacopo Mondi , Laurent Pinchart , Vladimir Zapolskiy , linux-kernel@vger.kernel.org, Wolfram Sang , Geert Uytterhoeven Subject: [RFC PATCH v2 3/6] i2c: of: remove superfluous parameter from exported function Date: Wed, 18 Mar 2020 16:00:56 +0100 Message-Id: <20200318150059.21714-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200318150059.21714-1-wsa+renesas@sang-engineering.com> References: <20200318150059.21714-1-wsa+renesas@sang-engineering.com> 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 'dev' is only used for printing an error message. However, that information is not needed because '%pOF' fully describes the location of the error. Drop the 'dev' and remove the superfluous parameter. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Luca Ceresoli --- drivers/i2c/i2c-core-of.c | 7 +++---- drivers/i3c/master.c | 2 +- include/linux/i2c.h | 6 ++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c index d8d111ad6c85..710704cd583e 100644 --- a/drivers/i2c/i2c-core-of.c +++ b/drivers/i2c/i2c-core-of.c @@ -19,8 +19,7 @@ #include "i2c-core.h" -int of_i2c_get_board_info(struct device *dev, struct device_node *node, - struct i2c_board_info *info) +int of_i2c_get_board_info(struct device_node *node, struct i2c_board_info *info) { u32 addr; int ret; @@ -29,7 +28,7 @@ int of_i2c_get_board_info(struct device *dev, struct device_node *node, ret = of_property_read_u32(node, "reg", &addr); if (ret) { - dev_err(dev, "of_i2c: invalid reg on %pOF\n", node); + pr_err("of_i2c: invalid reg on %pOF\n", node); return ret; } @@ -69,7 +68,7 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap, dev_dbg(&adap->dev, "of_i2c: register %pOF\n", node); - ret = of_i2c_get_board_info(&adap->dev, node, &info); + ret = of_i2c_get_board_info(node, &info); if (ret) return ERR_PTR(ret); diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 7f8f896fa0c3..cc0549a9fc64 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1943,7 +1943,7 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master, if (!boardinfo) return -ENOMEM; - ret = of_i2c_get_board_info(dev, node, &boardinfo->base); + ret = of_i2c_get_board_info(node, &boardinfo->base); if (ret) return ret; diff --git a/include/linux/i2c.h b/include/linux/i2c.h index f834687989f7..d84aaf0d83d5 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -942,8 +942,7 @@ const struct of_device_id *i2c_of_match_device(const struct of_device_id *matches, struct i2c_client *client); -int of_i2c_get_board_info(struct device *dev, struct device_node *node, - struct i2c_board_info *info); +int of_i2c_get_board_info(struct device_node *node, struct i2c_board_info *info); #else @@ -969,8 +968,7 @@ static inline const struct of_device_id return NULL; } -static inline int of_i2c_get_board_info(struct device *dev, - struct device_node *node, +static inline int of_i2c_get_board_info(struct device_node *node, struct i2c_board_info *info) { return -ENOTSUPP; -- 2.20.1