Message ID | 9d36938de98dc491425a51a9c07367dd9e448e60.1676457464.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp116898wrn; Wed, 15 Feb 2023 02:43:03 -0800 (PST) X-Google-Smtp-Source: AK7set+wOqYfYWKT9a62NcTFEgn4bXjqxCfL/ZmQ8y1R9asnyvcVCrtnP8e5bal1j00D3SHg1nwk X-Received: by 2002:a50:ec90:0:b0:4aa:b2d6:ae05 with SMTP id e16-20020a50ec90000000b004aab2d6ae05mr1330794edr.27.1676457783833; Wed, 15 Feb 2023 02:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676457783; cv=none; d=google.com; s=arc-20160816; b=YaQ7Pwbb99+onfCp/KO/BNdjfyS9PJ7VzF5gmn6ecP80yuIrkjVLYRL0Pv3/2Xmz1V NvWyN2uj0ThbxjfaEzhDhurNZsDb1PkM8wQLz1BKcUhYwVPSMczDCHpy94LU/lllAQhL W2NzFQ2p2wUgUwi/cnUbpgdMwyQuw73KgMU1PYRL0oAFzD9PdTDhT3ZZsN3pNvAPVOci MVCc2zF0NsmaxdbtixncT52HUAhNDQdi0gMMkJYwAyOtHu1xgmWH9KGvuGfI5ouUjQ00 TC5IK2sCQZnOuMctGWF7zniiQ97I7Ln2UCf5drOsQvh6RlZxVxYQWfAqi9RYE0OJh0Oe +HGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Pz3Xxc78AyDStpZNFQPkkf/U9gYe+vh6thtJ4F7dzLU=; b=PZ9a7epDkB1j0vsLKocV2FmZN8e3xOqkM+JBzUf2AdrnP1bjlk4/fkdJx8DdLeeUvF kCxclfNzLWhlh53gizIEmrojXbLWEKPXpvfFBBjGKNlxPrCtLzeTWyw5fZIyXbRuuIA4 F5u4LLmTIKaUbY+UnBwrgcZiGrGWXIOLpiNHJ5/yIPhEWPT+1TOwwXINQNU6NLtXFb6t +/4a37ikR4yGgDOtkgEspCjxQWHFJxXkIlD/VoTqbsasX+G84LOaHlHmG+WqMnUjdpYO I4kAdxj/dllkDlCJRIqN3t/rLsvaz/XVv3RJgDYWlHkXmrKqFBzlv+5qCIeIScws29oi QjBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a056402070700b004ace655ef51si3684004edx.192.2023.02.15.02.42.39; Wed, 15 Feb 2023 02:43:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbjBOKiQ (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 15 Feb 2023 05:38:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231253AbjBOKiO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Feb 2023 05:38:14 -0500 Received: from smtp.smtpout.orange.fr (smtp-28.smtpout.orange.fr [80.12.242.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC396360B4 for <linux-kernel@vger.kernel.org>; Wed, 15 Feb 2023 02:38:12 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id SFAupWaW35qOuSFAupYXwG; Wed, 15 Feb 2023 11:38:10 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 15 Feb 2023 11:38:10 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Michal Simek <michal.simek@xilinx.com> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org Subject: [PATCH] i2c: xiic: Remove some dead code Date: Wed, 15 Feb 2023 11:38:07 +0100 Message-Id: <9d36938de98dc491425a51a9c07367dd9e448e60.1676457464.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757893397584117234?= X-GMAIL-MSGID: =?utf-8?q?1757893397584117234?= |
Series |
i2c: xiic: Remove some dead code
|
|
Commit Message
Christophe JAILLET
Feb. 15, 2023, 10:38 a.m. UTC
wait_for_completion_timeout() never returns negative value.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/i2c/busses/i2c-xiic.c | 4 ----
1 file changed, 4 deletions(-)
Comments
On 2/15/23 11:38, Christophe JAILLET wrote: > > wait_for_completion_timeout() never returns negative value. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > drivers/i2c/busses/i2c-xiic.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c > index 8503b5016aaf..5543f372ae60 100644 > --- a/drivers/i2c/busses/i2c-xiic.c > +++ b/drivers/i2c/busses/i2c-xiic.c > @@ -1038,10 +1038,6 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) > i2c->rx_msg = NULL; > i2c->nmsgs = 0; > err = -ETIMEDOUT; > - } else if (err < 0) { /* Completion error */ > - i2c->tx_msg = NULL; > - i2c->rx_msg = NULL; > - i2c->nmsgs = 0; > } else { > err = (i2c->state == STATE_DONE) ? num : -EIO; > } > -- > 2.34.1 > Reviewed-by: Michal Simek <michal.simek@amd.com> Thanks, Michal
On Wed, Feb 15, 2023 at 11:38:07AM +0100, Christophe JAILLET wrote: > wait_for_completion_timeout() never returns negative value. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Applied to for-next, thanks!
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 8503b5016aaf..5543f372ae60 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1038,10 +1038,6 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) i2c->rx_msg = NULL; i2c->nmsgs = 0; err = -ETIMEDOUT; - } else if (err < 0) { /* Completion error */ - i2c->tx_msg = NULL; - i2c->rx_msg = NULL; - i2c->nmsgs = 0; } else { err = (i2c->state == STATE_DONE) ? num : -EIO; }