Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1011167ybb; Wed, 25 Mar 2020 13:55:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtYaMF3Zc/HnPxorFB6rYURdSYVCZWRgoKqwycccty8sjPAmhmfF7yb06n2rGJdajvqG7NP X-Received: by 2002:aca:5210:: with SMTP id g16mr4017800oib.174.1585169709417; Wed, 25 Mar 2020 13:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585169709; cv=none; d=google.com; s=arc-20160816; b=RpDcC/UKYDAaaleEu4k7Tw/fU6IWSs0lT78WRjfHTZOSJAvge4uB7WoyEr65ri3Dm5 BQk1md6Qm0LvdRuvfK3dKL8nayiHw+qGJz4N+CNagRAJ+uY1cMMgvqf22ARB+TZ8mZhy r3zctxUNQih5AkgmD8bneCHiW1h05+wZnPiToty1JRg1xm6G9XlNim6Rhd7gP6IO3fIe x/sF7UsJTnTA9GyCnfCX07togBp170/Y6fDYwrcGyyNl+K0ZO7G3CSQUZnLbJKncUPRL XetUZVaE53iEDVoyUakAhNrtW+FBwkXfnHDS/NCvDQ6oOgXc6w5VsgzSkVO+jS4wuF6/ YtGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=almAkzaBjE6PHygh3j1m0Jqz/97wbN8tJnv57jeXwQc=; b=V8W1vgl+0uOdICMGgV0Xu9cwQ8YHp49iUPN3+pzwRG/mWKLclGEvL+7RY4KGy7O1UQ LHVGP6+vHrTsqfbpqjD3LU1AP1VRgB2CMvI7SvU+SC/85VwBGdULT13VATCNNcNAi1Ly /kwHaoaywsQ/aGlhXOPk8mWkeqwT+qvyH/XCeN9nBUpVpxv3DW7iBOtzvIIzFTkEkhrk oIwImkbu4T2ylqxQl9ayQGPDHDhV9MEJ3dpQ/DT4yexiVdtdAEqZONrWYEyPwVys6ve4 AFyjifYB4HXoJOXQtDFboxTmfNVw5vWxukdXpTLDW8ZbuLDg9Tc9Hz5mCg/JQSHIK4+O SsSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KIGFOiRt; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 131si90432oid.75.2020.03.25.13.54.56; Wed, 25 Mar 2020 13:55: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=@gmail.com header.s=20161025 header.b=KIGFOiRt; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727357AbgCYUy1 (ORCPT + 99 others); Wed, 25 Mar 2020 16:54:27 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:38283 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727253AbgCYUy1 (ORCPT ); Wed, 25 Mar 2020 16:54:27 -0400 Received: by mail-pj1-f65.google.com with SMTP id m15so1511673pje.3 for ; Wed, 25 Mar 2020 13:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=almAkzaBjE6PHygh3j1m0Jqz/97wbN8tJnv57jeXwQc=; b=KIGFOiRtaenwOUhFx39py2v7EmX7BUwo3SCdsyEJxUPfzD8eoy/NdfyQA8+uwb7bWa iAoirmcu5wcto705bhC9zap213StzfO4QMCGHTxXUw70sjm7TJHG+WEP6aPK5l3BLmau PoOYOzvUjdNalFo+t6+0gSmvEiIM96S30EE8K9x4G4XqgH+ABVZokGVXXdeSc1+5YhQx UUG3lbbnvwH7LhkSVP604+H3uemrI4dXOCay26wLKkq+2wyS8zW0pawyvh+XqUz8IIZ2 7g7qbG0i1ct3FOxkI4Xu7FyADDd63TxIW+6Ze8U475qNjkBEF1z/xvQUSX4hazxkeQT1 pMYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=almAkzaBjE6PHygh3j1m0Jqz/97wbN8tJnv57jeXwQc=; b=qhSNluKFGErW4m9WliNegc1W7GO9XVI8ext9b7tux8kLon1XGcWvDJb4uUZrJhVGAk SgBA0CdE9uFPS4HYls2KThSL+X0ZGQZI2j996Qwq+QADOfpqL9B0yfMGPdcseXsEota+ pyl5yg7Pm5AUVGLUbTEFuYZzAwJGCIb2G7qtZEJlS0h58o3RIbneO1waydZsToY/H4DR mbsPbc0e53fkGTxz+lCH8f/SZeV+D8D9LBE0Zhr7ZXDogNEHRnYln9WdfEhOwYDZAkPS y4Rdr/oWV1NvNIBvdaeJ7Xksl1ZU1QAOwOjk80XAc3BNVrwFPqSrSPu4Bvsjinrm6b2m COwA== X-Gm-Message-State: ANhLgQ3x9KUUziPQ1zfv1yx5DRyW/U4lNjUo/mXD7eOpGcoKmxORjPDx CWlak1EWNtSRfHDJteVTyAE= X-Received: by 2002:a17:902:ff14:: with SMTP id f20mr4694982plj.51.1585169663924; Wed, 25 Mar 2020 13:54:23 -0700 (PDT) Received: from simran-Inspiron-5558 ([2409:4052:78f:bb47:8124:5e4b:ea06:7595]) by smtp.gmail.com with ESMTPSA id 132sm26209pfc.183.2020.03.25.13.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 13:54:23 -0700 (PDT) Date: Thu, 26 Mar 2020 02:24:18 +0530 From: Simran Singhal To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: rtl8723bs: rtw_efuse: Compress lines for immediate return Message-ID: <20200325205418.GA29149@simran-Inspiron-5558> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Compress two lines into a single line if immediate return statement is found. It is done using script Coccinelle. And coccinelle uses following semantic patch for this compression function: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c index de7d15fdc936..8794638468e6 100644 --- a/drivers/staging/rtl8723bs/core/rtw_efuse.c +++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c @@ -266,8 +266,7 @@ bool bPseudoTest) /* DBG_871X("===> EFUSE_OneByteRead() start, 0x34 = 0x%X\n", rtw_read32(padapter, EFUSE_TEST)); */ if (bPseudoTest) { - bResult = Efuse_Read1ByteFromFakeContent(padapter, addr, data); - return bResult; + return Efuse_Read1ByteFromFakeContent(padapter, addr, data); } /* <20130121, Kordan> For SMIC EFUSE specificatoin. */ @@ -319,8 +318,7 @@ bool bPseudoTest) /* DBG_871X("===> EFUSE_OneByteWrite() start, 0x34 = 0x%X\n", rtw_read32(padapter, EFUSE_TEST)); */ if (bPseudoTest) { - bResult = Efuse_Write1ByteToFakeContent(padapter, addr, data); - return bResult; + return Efuse_Write1ByteToFakeContent(padapter, addr, data); } -- 2.17.1