Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp912027ybv; Thu, 20 Feb 2020 09:26:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwk+6Xe0pk/mIx0+sQkFDsOfVnr3wGQlk8QwBsENiBG4/avLcjfxgH6ZedDBTaEMNcI+sGn X-Received: by 2002:a9d:24c8:: with SMTP id z66mr24987539ota.52.1582219585872; Thu, 20 Feb 2020 09:26:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582219585; cv=none; d=google.com; s=arc-20160816; b=NrzMB8HvqWCl66Cw+L0kZO5KBSkHoR/2ozgGcp/GbTcmLnqPhVbl1I4AuIoeSA+nT8 1kxE3lYf9chgrn/Ue0BhknhrlQrtxiXao0AisjoIgNA19pBUjbaNdvbK3txDK+8DK1xy CkWgOcPwGhEl7wIZVlSSIm9K2sUyGcl6jI3ErOiVfHzJ3kINiSKShx8zxQd8aJF9E5YP PaWMjt1Ln0Zo8ANeGmLEOoI+rwnY8aIGeNzzwAUAEvaqRXRPo/p4UUrSG8vth9NCDRyp UWmXnLoSfiOSpe3ZzWAcm5ZAj+QNv4voN/6HspTCDx9GeLn0oST5ZbEFdZSOVXMRrul5 2O6Q== 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=2r5FQGGz9zmqDZNB/H2TfNHK6jzldl6Aj4akZ9oSNp4=; b=lYcYa2t7wR3C01UYV7gZE+X0H+uuNrs8liHJ6rp5UnpWJa5IeC7O/IupiIkI/KxPXm R/9G7qzKCvLIuC8+bzY4xIEgoyzbt5l/kL/IkSM5HboI/zl4m939gjrTDjzvRhdqor+K IUCZVr/PzTjXcQLxP5elzX2I+WQVEgtGq2BO+HmWs2ZJkPvKN+oPHAQnkoXXqTNzrgFz WEDobcHae4s7qtLYGizL1+DWGtx4+psZ1NYjz3xs9+GoqOLhJMz3QHcigkJIb7Yosk5l SwDwWdLh81SA00UiHtRya0XWLaCZlzQGSClbQyFUFDUUh+ADGs/3//IuZ9ID8aR9OeEI 3f9A== 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 w7si11472251oie.196.2020.02.20.09.26.13; Thu, 20 Feb 2020 09:26:25 -0800 (PST) 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 S1728914AbgBTR0A (ORCPT + 99 others); Thu, 20 Feb 2020 12:26:00 -0500 Received: from sauhun.de ([88.99.104.3]:35130 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbgBTRZz (ORCPT ); Thu, 20 Feb 2020 12:25:55 -0500 Received: from localhost (p5486CC48.dip0.t-ipconnect.de [84.134.204.72]) by pokefinder.org (Postfix) with ESMTPSA id A6F8A2C1EBF; Thu, 20 Feb 2020 18:25:52 +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, devicetree@vger.kernel.org, Wolfram Sang Subject: [RFC PATCH 4/7] i2c: of: remove superfluous parameter from exported function Date: Thu, 20 Feb 2020 18:24:00 +0100 Message-Id: <20200220172403.26062-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200220172403.26062-1-wsa+renesas@sang-engineering.com> References: <20200220172403.26062-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 --- 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