Message ID | 20230725143023.86325-9-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2546628vqg; Tue, 25 Jul 2023 08:24:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlExKFq87/ADr3rMX4laqIwAUKwmTU4T+FJg9c80CqcxvA8mLb3d9vFfYjy07uUSXMRExZbc X-Received: by 2002:a05:6512:3485:b0:4fa:9817:c1da with SMTP id v5-20020a056512348500b004fa9817c1damr7074473lfr.21.1690298651023; Tue, 25 Jul 2023 08:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690298650; cv=none; d=google.com; s=arc-20160816; b=vEcEYyOf0n+t9PT0RnJMAwGb+fY9cKKzIcrkvruQ+MmZo1xiHFITkulHWOvvy3QzPV UVNud0KbZafX+rl6yKou1XjoRLA/UDsYZ/ulAa7jcEJnQSSDoireZtS+F8bLameAf3wZ EnDYHQSfhZQ0PLF3gXsbElb0I9LbRWLSqLC1Zc2VjD9KNxCafz17EoMSTYbSAwFTqoVg 7VANfC7Du1b6a/Cxa5j51+iS+Bsr6OuNiyLM+vfNJx1BzdoqOJ99vuU/hL9aItkTGHVw /DxrSkMYUFztOrBM1a7HizH+GqMJyBzf0DJaliQ15W8oszbP3j7FZBecBdALDJ6wgMPK sANw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tbjVJp8OWVOsKRRyewFnFSmy61ginOgtJSCeKGLG3Bs=; fh=NaDthh2xTRZWW7gK+A73G8SBVbRn5n/sFk5nDI66CNc=; b=DJfwFqI7iBO3iSUV8C+0QDIHTH0W49RnF42S/BmUCSj56mNyfz+UYQr0s/YzGRJtRy +Hg8NDZhxA0OLrl0ArdzgcHriVtaiZAq4au+wWpfU4EEeynkkmcBlDYdWcs5tYGlJXhW F2BUJUelhUYBu/AlaY6b5LIIkLMq1TdVShNA32Fd9xcMvz0sMmG7eoZUL8IQq0IDoCdN HRMiePI0d+LZ8oyDIHHSP3Ljm7o0X9XhWfr9zSHEl4JSuutJP9YPH3B41YHqB8MLXWbt ikwhcdmrBLSSo+Slkyxg6aQac9NsI1lDTUdnyuJ1z/da8sqbcbkPteQS0uZPKY2B6dhO G8Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZlOzDpJk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a17090606c100b00993320628absi8391587ejb.675.2023.07.25.08.23.46; Tue, 25 Jul 2023 08:24:10 -0700 (PDT) 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; dkim=pass header.i=@intel.com header.s=Intel header.b=ZlOzDpJk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233149AbjGYOaq (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Tue, 25 Jul 2023 10:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbjGYOab (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 10:30:31 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0345E2106; Tue, 25 Jul 2023 07:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690295428; x=1721831428; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=csNr0uHnApehbWbLBcR96Up2BGeOr3TZJ/TrYLmOnZc=; b=ZlOzDpJkko2I3XORf9A+H4AO2gJ9J/eoxplQ+vTSy3iL6on9xp1BZFEc vFtF1aWs4pu/Os8zMVoxeJlkcWwlFT9CCDEQiTEv7Vk2H7v/7sDZKu4a7 H+UcVVdIq1PgawaxaKXF/iJuVfQuN7XN1IiQY+dMOCamaF4+eOgCr+33Y OIsII1/bVGTS5TC/COHMG99nwRtSTPn0NYtYvMnxXyr/c+Neuwmk8Z7nS VRHyOJygHuRPFNeyDYZbqE1KoMlt1ie5/PfwwR818sLhWFlYQX6wC+JU7 yCTpXMasr0Nd319kHwWT96CBVaNPKf9yssyP8T8DSW6kQPecyX+2hKR6M g==; X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="357742912" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="357742912" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 07:30:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="869491476" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 25 Jul 2023 07:30:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DB885438; Tue, 25 Jul 2023 17:30:24 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Jarkko Nikula <jarkko.nikula@linux.intel.com>, Mario Limonciello <mario.limonciello@amd.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Wolfram Sang <wsa@kernel.org>, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg <mika.westerberg@linux.intel.com>, Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org> Subject: [PATCH v1 8/9] i2c: designware: Get rid of redundant 'else' Date: Tue, 25 Jul 2023 17:30:22 +0300 Message-Id: <20230725143023.86325-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230725143023.86325-1-andriy.shevchenko@linux.intel.com> References: <20230725143023.86325-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1772406598326067040 X-GMAIL-MSGID: 1772406598326067040 |
Series |
i2c: designware: code consolidation & cleanups
|
|
Commit Message
Andy Shevchenko
July 25, 2023, 2:30 p.m. UTC
In the snippets like the following
if (...)
return / goto / break / continue ...;
else
...
the 'else' is redundant. Get rid of it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-designware-common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Tue, Jul 25, 2023 at 05:30:22PM +0300, Andy Shevchenko wrote: > In the snippets like the following > > if (...) > return / goto / break / continue ...; > else > ... > > the 'else' is redundant. Get rid of it. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Andi
diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index e6df6a484955..de28dd66c5eb 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -615,10 +615,10 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev) if (abort_source & DW_IC_TX_ARB_LOST) return -EAGAIN; - else if (abort_source & DW_IC_TX_ABRT_GCALL_READ) + if (abort_source & DW_IC_TX_ABRT_GCALL_READ) return -EINVAL; /* wrong msgs[] data */ - else - return -EIO; + + return -EIO; } int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev)