Received: by 10.192.165.148 with SMTP id m20csp859395imm; Thu, 10 May 2018 01:38:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo0YbDPLJdjg25M1Jgm63/a41KKKoHj52GpeZ5jBmS0KRmyKO7p6JXAHbKbLVA9jrNK1tdP X-Received: by 2002:a62:32c6:: with SMTP id y189-v6mr477552pfy.241.1525941489134; Thu, 10 May 2018 01:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525941489; cv=none; d=google.com; s=arc-20160816; b=awdWAuajdy3F8cjidYc6QjUCTG4UGJlKrGTGXVJ26kcxqXHoY6P5sw+gLyUaPuroH1 t3M2xYSOvZviKbNg3Hyr9TDiKD06VQci/AvAYkAGOVQCfMTHBBMV2KbEIk5tSOaCH6VK QzaBmL+FAxnJW+gDwzYjDmk2lRJLvoFv73Q4RGIIEGg/r1QosWbqq4YU6Pmq67gZ4aJL NqMzXsoXUlNRlAHqIC0KY31CDusImXOBWhscUIxBQumKyjIfDstLZ0+SLq/JKFoPWM6S 448x+9/Ak8DMumyl9eTt+5KQVFvxHvjXYqOxx0Kyp6PsQbvIgaTUcNM6ytpSDFR7HlQF Xw6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter :arc-authentication-results; bh=2wi9fUNQnmFWkf8Gv3tuCRb+lhYSOQouDi8XqR5qOvY=; b=HnaZBWlYnMALYORyJd7Aw5sFNFK7aiaPiH5vfwwP0kdHOBvmwUbHm7Ey/11+oVTR3w 09pYIV+jYK8mu56H27LsxorWzcOZx9mZaX8WrOPHyDV9piOIdfv0hBzGEFxq5bxGzqHZ D7uGxhHH9QSfsAsi/1tntotSdi/xT7l17ktuQKHoEZyC5aHZkxuPZYNEvuCqVlTvAyHy qezAbXFLdIHJLQxNYgohwGlxunZdMGZ4JFzj/K+J7nmqMh0n7Vl02uyZgQNLcClMRPRX vwjp3Apw27GhI4TIPs/ySyzlc+YqCplOO1kAI43bjtSLC7jI6EEvvaD8pF90Ti9K+T07 2qlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=fvSkHD12; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5-v6si209663pgs.317.2018.05.10.01.37.54; Thu, 10 May 2018 01:38:09 -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=@samsung.com header.s=mail20170921 header.b=fvSkHD12; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934947AbeEJIhN (ORCPT + 99 others); Thu, 10 May 2018 04:37:13 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:58752 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934266AbeEJIhJ (ORCPT ); Thu, 10 May 2018 04:37:09 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180510083707euoutp02f34aa82414fce2bdfbb584dbb43c617f~tO6TRZGOy1597915979euoutp02Y for ; Thu, 10 May 2018 08:37:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180510083707euoutp02f34aa82414fce2bdfbb584dbb43c617f~tO6TRZGOy1597915979euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1525941427; bh=2wi9fUNQnmFWkf8Gv3tuCRb+lhYSOQouDi8XqR5qOvY=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=fvSkHD12B+x6A8Vb16gEYeowjr9ng82x4PbRYhUl4d+jASwRIEzIwX3z4mh91upK+ a5hb57awoS+C0HwA6rjBfzbkUC4JKgnjXZA4rVFlxMSfKhkklcw8Ibwa3whrKABDKl hcIbzDYBxdQbmH4pBdJkbAp0gUdbEep5lT6wI5Jc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180510083705eucas1p1a31b4faeb3dba17cf64bea453d6634db~tO6RhHLjG1878818788eucas1p1-; Thu, 10 May 2018 08:37:05 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id D6.F9.10409.0B404FA5; Thu, 10 May 2018 09:37:04 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20180510083702eucas1p2c6a0c9b25b46ef2c579450759ff2a896~tO6OoNGkz2764227642eucas1p29; Thu, 10 May 2018 08:37:02 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180510083701eusmtrp245551fbabfc24e42d129c000a9864729~tO6NrGrV92684726847eusmtrp2E; Thu, 10 May 2018 08:37:01 +0000 (GMT) X-AuditID: cbfec7f5-f95739c0000028a9-df-5af404b04e0b Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 8C.98.04178.DA404FA5; Thu, 10 May 2018 09:37:01 +0100 (BST) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20180510083701eusmtip2e05129adb4ea7b08c92493caa766e3a1~tO6NRIc1M0948709487eusmtip2h; Thu, 10 May 2018 08:37:01 +0000 (GMT) Subject: Re: [PATCH 1/2] i2c: exynos5: remove some dead code To: Peter Rosin , linux-kernel@vger.kernel.org Cc: Kukjin Kim , Krzysztof Kozlowski , Wolfram Sang , Masahiro Yamada , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org From: Andrzej Hajda Message-ID: Date: Thu, 10 May 2018 10:36:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180509194532.28929-1-peda@axentia.se> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0hTcRjG+++cbWejyXFavqgkTaIbaZbCAW99KFoQoaIQY5anPKjk1HbU ssLmKp2r0AovzUoRwxRJm07UnJiFlyJvgTdEKZXM0g85yWu1s5Pkt4fn+b3v/33gT2Byq9Cd SEhKZbRJdKJCJMUbO1d6D9XhNtXhKhtB3dcXCai8qe8Y1ddXJ6bMU0NCyrBhQ9Snliciqriv TUBZO0oRVdVtwijrxCI6JlUWtpeIlebqXJHyWU+4sr7iprK76Beu7Hk/jSsXzbvCxCppUCyT mJDOaH1DYqTxd4YzUwolVysqw3UoT2xEEgJIf8jqXkZGJCXk5AsERcUNiAvkpA1BaU4MHywi mFmdQZsT9QXDYh6qRNDU6cdD8wjeDbc5IBcyCHIfFDggVzIUCoa+CTgII1sFUPuoU8gFInI/ bNSPijgtI0NgzfjFPkwQOLkHmsc0nL2DPAv6rytiHnGGnsfTOKclZADoLesOjZFecMtSgvHa DcamSx1vATkohknrioDbCeRx6Nd58wVcYK6r4V99T/jTzPGcvg6js3qcnzUgmFzLEfFBILzt GhByezD7zbUtvrwdDAN3u0X8eic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c2s1AS5z1vUBklJJCeWJKanZpakFoE08fEwSnVwDjhodLjfCWe nR4+0ySvx565bNLl4SAk9PbnSr8bFkGTbt5uCppzn1vwknXD/ef595Yn2oe4Ciz8OvPcAQf3 Ey/Ob496eZKvzLnR9+2kK2sZrGe6pa3Yftj4ydm4FOW0Q9dl9e1zD3g1ypTOUja3KGkKb06e WFHx57tWqVDQ28q4VcdTIxh6PyqxFGckGmoxFxUnAgAsysyi5AIAAA== X-CMS-MailID: 20180510083702eucas1p2c6a0c9b25b46ef2c579450759ff2a896 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-MTR: 20180510083702eucas1p2c6a0c9b25b46ef2c579450759ff2a896 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180509194548epcas2p25579e969e21707afe2435b1f568ff005 X-RootMTR: 20180509194548epcas2p25579e969e21707afe2435b1f568ff005 References: <20180509194532.28929-1-peda@axentia.se> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.05.2018 21:45, Peter Rosin wrote: > The else branch cannot be taken as i will always equal num. > Get rid of the whole construct. > > Signed-off-by: Peter Rosin > --- > drivers/i2c/busses/i2c-exynos5.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c > index 12ec8484e653..a2cbc779c33a 100644 > --- a/drivers/i2c/busses/i2c-exynos5.c > +++ b/drivers/i2c/busses/i2c-exynos5.c > @@ -727,17 +727,7 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap, > goto out; > } > > - if (i == num) { > - ret = num; > - } else { > - /* Only one message, cannot access the device */ > - if (i == 1) > - ret = -EREMOTEIO; > - else > - ret = i; > - > - dev_warn(i2c->dev, "xfer message failed\n"); > - } > + ret = num; > > out: > clk_disable(i2c->clk); You can go further and remove "out:" label, use break instead, and at the end use "return (i == num) ? num : ret;" or sth similar. With this change you can add: Reviewed-by: Andrzej Hajda  -- Regards Andrzej