Received: by 10.192.165.148 with SMTP id m20csp290974imm; Wed, 9 May 2018 12:46:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKN8PHEEpbE3ITTpg5u3HUeRUgwi9uHpSfIW+zT1wx5cIxVv+si7WBxE2yeT2UxD+YwzmQ X-Received: by 2002:a63:381e:: with SMTP id f30-v6mr24522224pga.142.1525895204376; Wed, 09 May 2018 12:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525895204; cv=none; d=google.com; s=arc-20160816; b=RvY41phywldkO4Ju0plikkcY1WjxU/c3ZtYZM0FirXZRwENkk+UMm2RE2T4uxiHRrK USuLn0l5B8+jEIYWx/zr/2bFbBucczFtiRhue28aaOY4KOC91hDFs/mRkCNS+hgMbgES FHQID5h81MhqfTolFnLRwzrD/mLjztMEo6g0lPHV6HSNARjQcSPLfugP8UoyV0lkQ8mS CmA3S8rreMgeLZ4RluWvNp16He38aKfWbFp/LoOKyZGo6uDX8RMMDxWEq12s8CQ+ZuEd d4yv7I/4jWAebREiAmQ0gzPMZY7lpJXjrvlGuO5jwinHAnpPCrcvmoHIJP36esrdpCbu ZPuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=4isCXsO8Rg3L+WrfvnCGHdcY96U1cdZ3XJmkpWFE3TQ=; b=TFCvkXLG8TDRV/QxbzrdY+IS/dlr2IZogruaOxrzRqGpKOyFdQpsNjWoXHDhouLI5e xeMsHdRdbBOtPBWbnhOSeG3e4fZC5fjdwKe3+3G1lpkOXj6ZyyWK0n0WgPKa+iuDMu0i zxEK7BEvh+NKUkCGkREsciWfosbhCDmnddHT3IbPT8n/gfRfUBbhAIqEhqKGwEr23WrQ kcgw7tGQU8kVvFsMLpiJjGqm7/TDgrHErJTwo7laM29vAWT6L2XzApWQV9ULWZw2gZW8 Vs9FIdYfU6HOgd/O7nbcxRXqPyt2PcBN0MMkB0JXMAEOfhNzjK/g7tBXB7Hm2ttsizIN BrRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axentia.se header.s=selector1 header.b=giDqYCwe; 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 h89-v6si27606039pld.48.2018.05.09.12.46.29; Wed, 09 May 2018 12:46:44 -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=@axentia.se header.s=selector1 header.b=giDqYCwe; 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 S965602AbeEITps (ORCPT + 99 others); Wed, 9 May 2018 15:45:48 -0400 Received: from mail-eopbgr50115.outbound.protection.outlook.com ([40.107.5.115]:56768 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965398AbeEITpp (ORCPT ); Wed, 9 May 2018 15:45:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4isCXsO8Rg3L+WrfvnCGHdcY96U1cdZ3XJmkpWFE3TQ=; b=giDqYCweTgvMVUYCq1NMeVkR+PtUd+SQuYIIKxlu/witAA8WAP/xUXLNkH3sGduIk9f3Qn27l8j2uOk4RH7IXI3mfP7m/FyU/V7jTdqvTckB3Wty47qwIe/ohC5ji7VzCVbzTHic7MPYP6bJ3pwr9YlUvzIU66vVJn6xIwx9hMw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from orc.pedanet (85.226.244.23) by HE1PR0202MB2779.eurprd02.prod.outlook.com (2603:10a6:3:e8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.19; Wed, 9 May 2018 19:45:40 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Cc: Peter Rosin , Kukjin Kim , Krzysztof Kozlowski , Wolfram Sang , Andrzej Hajda , Masahiro Yamada , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/2] i2c: exynos5: remove some dead code Date: Wed, 9 May 2018 21:45:31 +0200 Message-Id: <20180509194532.28929-1-peda@axentia.se> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR05CA0197.eurprd05.prod.outlook.com (2603:10a6:3:f9::21) To HE1PR0202MB2779.eurprd02.prod.outlook.com (2603:10a6:3:e8::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020);SRVR:HE1PR0202MB2779; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0202MB2779;3:b3brqDRRxFpYDE5gp6QfEHjIH9Wc+KKZPK9s/3WFzLnhMuHtri/3QRKhghOZ9KOaJgTMXjeeazLwTJ6rePQrQlZWjhk+wKajs4Hqgsu6vE3R4uKAFUkaEGuyilY9uTkJ210vrqFXy2ukMnFiligWr/1eSgUkMxAxlikOt4yEJuRCMuMXalqFhgE6/kpNTS2D9l/huitF3Z2TZ/Vxci3CT9B+4PTOFww4LmmxJIyTQSJNeD13mnq78eYqi8Q2SqAF;25:BaBdiG/Lvt8HQVPo+ewvmPBa1lfOQkbtWTSNFYhz8R3BLhPxW2rWEFnEJ4eoUgam5/BUdvGBzQsOeG0b0pO9ZbvyhpQx2fyt+EdynkAiclyPsIvgiFZGg2lyZwJlO495vH413boVIuZDzA2svFMOuATRiAqCAb5ncDXFBl6j5bkGN160+D8JOCGqYF9B2YwK10zlLRQ0AgjUGNoo8HoOa4yBf0EJwH+yWnD1jj0mBULjYcGPKQv5JEUqeoa/03yIvP6OsD58Ed9wwpXkGakDfeWwUTUmgQDmUIxsFn+VzO5AIa66xnc8VAnHBLmb60LPkTMsE8pI21Z4R7gFTzMAPQ==;31:rKlcA2fU82ZSrMwoc5iBvCTMYDxwCemv4JfAARAqGIaBeDwZ1f60NasEz7GjgqSKqLSVAjuO+DL0khOuzmo7YH6udLW0vtzXPudCiloOaLyrWe/3UF/qK5/kveOdjMbfJ9Wmjxw+H2KjRrbUmqG9U0vP9s+DHQjiGAzOYCh9acTIZn1Io1Ey8OTgITSUzKYQRz4ZBXnEHq9vc/e+1n0MbE+izoEbMm5ih5vShOtFcX0= X-MS-TrafficTypeDiagnostic: HE1PR0202MB2779: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(2016111802025)(6043046)(6072148)(201708071742011);SRVR:HE1PR0202MB2779;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0202MB2779; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0202MB2779;4:0vGbRB23x8Zx+TO4qJwXSzK8m2DdvCaO6+aU3R5gnR3c5fke+2I9RsMdatJcctFNqJKykB+bLd94geh/bxI6udMBi7yWX8E6jJWUb79/hDKksO5OtbXRPxPZBbJLmAN2NRIaZGuqpmdHyKPD8S1xBrysoNAr3Z6qv94C4+gLJqkd/Y3SqHLNF1dfJ/UxgV3ZlrQMJk3HYGZTKcFTH0fYUJ8K+zAeqWiRk/BMlKgfE1Uej6Ujoy4MEEdZQdh0c1n9LfkoU3Tn1eJT8MUC0gVq7Q== X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(979002)(396003)(376002)(39830400003)(366004)(39380400002)(346002)(189003)(199004)(6116002)(66066001)(1076002)(97736004)(6666003)(6486002)(6916009)(50466002)(48376002)(2906002)(478600001)(3846002)(16526019)(186003)(26005)(25786009)(47776003)(2361001)(86362001)(36756003)(74482002)(6506007)(7736002)(52116002)(7416002)(59450400001)(105586002)(106356001)(305945005)(386003)(476003)(316002)(81166006)(486006)(53936002)(81156014)(8936002)(956004)(50226002)(54906003)(2616005)(2351001)(4326008)(5660300001)(6512007)(51416003)(16586007)(68736007)(8676002)(42262002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0202MB2779;H:orc.pedanet;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HE1PR0202MB2779;23:hPrbtRNrP8vzbr2mbXd4+oFG1D/k/AfFVBvI3WQ?= =?us-ascii?Q?G82UcIWRsxQEzLprKP2tFww/n9SHKCyEXhf+oTgx29PH8f/JCDtNy7SOoOrS?= =?us-ascii?Q?IkavKaILQrydF6JJ1zptlTXNG8wCRW6rH2SlFTVuPuTN4sPiOpn2pmCLkVhe?= =?us-ascii?Q?WE7tygI66mJ9Dbbte2jKBmexT6qbBMTA4lld92WzBS2XUOfP6h07dTmJwYYh?= =?us-ascii?Q?SBOQYBzhXKgPuvF7DHx4UV0c6Add/wQzjqlkB2yQlSpqp4dbJBCiz4N4qP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pWN9RrOuMpXvb0odEE7L5tv4a/5lnfKVwoBdzFmheqy+priA?= =?us-ascii?Q?EgDgDfvIjKuS1AZeaslqDxDM3ZjfUmlMKneQvsj0PbMPxtKMkEtguV6RutS1?= =?us-ascii?Q?Wc5E6Or0XtUywh6wXXAj99gefY4NUu64gViEWXiSCC2Z4ugZ9cD3yL2wD4d8?= =?us-ascii?Q?Ny9dUtwzpSp0atid09sJQQ8XAFndAr1tBb/zRzLlzq4V+f465nzi5kBDhYOv?= =?us-ascii?Q?77R5DChJ2xNTbESfjGbxMr4NAlvk=3D?= X-Microsoft-Antispam-Message-Info: oKNSFoux/K0iOnx+9VSFkUEdnJHHvDR8xiVZuoHq6iYZvkoSHm0jbnD3eoTCu0KWMHUCicod4UQDraPLPSbhxR/1H74Q7Ln2hsSWR9kxLxHBsQnygVOlhy42u3U0412OHSuRvGv3e7pMIxketTmCtPe2CVhHvSAr02IP5rjQXtUKVQcu9rv4iiFkW+2nckhq X-Microsoft-Exchange-Diagnostics: 1;HE1PR0202MB2779;6:5yRVmV/7yJQ6O1nbIozzFLSgzHMkytgw3c1Dmv8ZfGiyLVQKHXLX3t0CHSjncKg0vprYWyB7bIARFfgDO2rM2oJflkBYKfJF2kJdHeinIcZH1Y+w1YdgBIKa52MZTPVHwFvO8W1m5P4ATjE0RQTL5wbPj1Ljsbu7y8gg00RrzL78drilycwJxjqyVxuffI0eF6JMkTAdvtRElyA1mZqkf+aqb1L081jdZQxnTgQznWkaND5mS9iQOhBOX0lLDcF7IYOPrO0dq1jS9pxCtJU6NO3NA595uLue8/grEHguj0dVdvJ3YLIHlo9L4d2Grivt9iW6x3uvwtl5xoxN4s8fRvowd9LyZsGej6++gr3WW+ddqYJ26kb5/7ZH+uKQroLnKl8XyjKOtRcRqjahxvukpydOmMnJqspFskaT2COa35axkSke0qQVfGAo5xUlmllJbBDWVG6QGDbbR+MlN2vhDg==;5:3Xo+zHfamuIY0QWkna3+s7v8xgFFJWO45ukrND5h7dO3JK9aEVH7Ln2IpcmTD/tMbEadAn4Ky+VwMUSSbnYO5UddVoKueMmOcptus0/TiMAsGntUiYKz86o1cRKLP+SkwXl6QaFFJHR/btxNToVqd5NGCJKp2KLfGw4YtI338U8=;24:cC+sCbLyzKYTRZU4icUzHMWTtKiAjSyXTerFxFAj4wAKFhlzIzhYTiCF4enBTC0fSqRHiiPbvN0AW/hhBxBYfaml7FK4jUtazqbvOhPbp7A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR0202MB2779;7:16ydtzBzLBeaDxy7pk7YrHsIPTz5au15SB0kJDJ6VlIONuXxiOzAQ63WO7+t/oYRQkJSD0fCwJoxiXeuwi/2E9tH4qbOZ9Ds5QShabrtOB/hsA9BVdtS3zpg1WcqpX+FcSEWTzEjmMYzVi5boe7kz4XUbpckLsJ+HHi/WLHgCVcvcG6i5apsPnDTzsSrgYdyKog+r7gvrOlj+EqGKfV2MT6dRmDv0+GlpnizHDV6Rfp2jh11+ric5R9GEtPGizXl X-MS-Office365-Filtering-Correlation-Id: 399b859f-ca4a-45d1-80ae-08d5b5e5720a X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 19:45:40.5253 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 399b859f-ca4a-45d1-80ae-08d5b5e5720a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0202MB2779 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.11.0