From patchwork Fri Feb 14 14:58:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 11386089 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 B81F417E8 for ; Mon, 17 Feb 2020 11:03:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9688B2072C for ; Mon, 17 Feb 2020 11:03:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ktqWI77e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9688B2072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=A/JxQmYW9NDYVM9eP3aLMs6544Rnvfb1xtygonNDfBY=; b=ktqWI77eawN7/X PxLb8yF9N22U9CSbAetCy8uahq53WxEplAVpqbJ4IcYcviTMDXJu6xhuN8TX2VgSLS0VfvtBmtrWZ 0bWihVigft+6z+kUuBndKqnNUtal9zfxpOm43V35g+I3sNYy4lgF+PiSGtzjHtPuN13I+4VO47YuP NsYkItYfnxCIEuDxM7LbGe5SiqAUAA7uwyT62YxJqdhlZwLQaM9lpFoUp47AmvKnQPB68p6cN6Dtc oshC2Rrl4GTVzDqmBfiHDYFzs2TG1Z/u+//kUNHivXQZ0NhQtzlV/wxbbb8I9Y98Hd1CkS5soLd9+ Tz2arAWWOVAHxfjj1oOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3eBu-0001Uc-5r; Mon, 17 Feb 2020 11:03:54 +0000 Received: from sauhun.de ([88.99.104.3] helo=pokefinder.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2cQr-0005Bc-TD for linux-i3c@lists.infradead.org; Fri, 14 Feb 2020 14:59:08 +0000 Received: from localhost (p5486CB48.dip0.t-ipconnect.de [84.134.203.72]) by pokefinder.org (Postfix) with ESMTPSA id 89E792C08AB; Fri, 14 Feb 2020 15:59:00 +0100 (CET) From: Wolfram Sang To: linux-i3c@lists.infradead.org Subject: [PATCH] i3c: master: no need to iterate master device twice Date: Fri, 14 Feb 2020 15:58:53 +0100 Message-Id: <20200214145853.24762-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200214_065906_118408_D69069A6 X-CRM114-Status: UNSURE ( 7.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [88.99.104.3 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 1.0 FORGED_SPF_HELO No description available. X-Mailman-Approved-At: Mon, 17 Feb 2020 03:03:53 -0800 X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org We already have the master device in a variable, reuse it. Signed-off-by: Wolfram Sang Acked-by: Vitor Soares Reviewed-by: Kieran Bingham --- Found while refactoring of_i2c_get_board_info() and checking its users. drivers/i3c/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 7f8f896fa0c3..b56207bbed2b 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1953,7 +1953,7 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master, * DEFSLVS command. */ if (boardinfo->base.flags & I2C_CLIENT_TEN) { - dev_err(&master->dev, "I2C device with 10 bit address not supported."); + dev_err(dev, "I2C device with 10 bit address not supported."); return -ENOTSUPP; }