Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1049620ybb; Wed, 25 Mar 2020 14:45:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvdWUg46JAvhCrwGo30bpEdTIoUHP/Rnn6xDGsHCciSoHbA8T1gJz6/xXb0fiJWLtmfavsn X-Received: by 2002:a9d:27a7:: with SMTP id c36mr4095204otb.68.1585172703978; Wed, 25 Mar 2020 14:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585172703; cv=none; d=google.com; s=arc-20160816; b=Y71OFml/qpLBGUPFPfPQS4rmMymziAWHDbXb/CBdCCjzCNn3cCSTz+p/yDxVIITwZt qzhK82LEchO0zJTWPkTweS0wZmHxZUJE4kMQTmsw1pWgVvAgW/uLwUzE5IEQNQIxhc4t dPI8T26t2AWcXv76wDU5ILdOC/+ve0bWnMjPkMWJZjtZsiE4Kc8uYyMiqRgDOAcSUWMD /83JRcwypC89+8qD0iqQ+riGDb2LEAgTFRQ2Ea1JQV9AICFRtkO2zTw61ViQGtvkcUNP B9qb/Lqiq490fMTbEmVpYdhX+rZD8DlE22N7myS/zumiHFN8HMWcB5QF4SACLLMaE3kV Q1hg== 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=h0hI1ctK7evRWi0Tx3F+lFEp/ylOEoUVzXunsODTLdY=; b=gncVqoK3f2SKJBHBy3lce5uEgTOWctMPAZbpWSRe54OeL3fcksQWfd7nBBP2PCbjjh Ysl41R/zdMM89W/d7yul6sqrFFt0LxAson9cFCnaK/p21Fpp6Apm64l3LglnMl0F894a YSb7tESlbwr3xCFhjxvQqjOk7T3Y8rtXvw1r94B/Y1kV/tDlOITXDUGOpMnooxJSv+3B eHexTKZoPTevAUAz2PoFNoauHlXaBaqDqI0JWemoh2B4QVSPAm0mpK2VJsAi6Bzo333M oCNHp0kjVJlb3HWyplAHp+jKdVPh9wE4CTf4WHdUDWwlnQDobWBdj6HJOhAhjxUtX834 nEgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K6CccuvD; 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 l78si130914oib.192.2020.03.25.14.44.50; Wed, 25 Mar 2020 14:45:03 -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=K6CccuvD; 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 S1727417AbgCYVnT (ORCPT + 99 others); Wed, 25 Mar 2020 17:43:19 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40400 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgCYVnT (ORCPT ); Wed, 25 Mar 2020 17:43:19 -0400 Received: by mail-pf1-f193.google.com with SMTP id l184so1710493pfl.7 for ; Wed, 25 Mar 2020 14:43:18 -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=h0hI1ctK7evRWi0Tx3F+lFEp/ylOEoUVzXunsODTLdY=; b=K6CccuvDhDFg4uDguK3OiesQSTy4fN0R7L2ZKiBbN6KUB5W5JGjUjBeE8sAHEWaPX2 w/HSgNcZUtbTEQ28K1Q8MlNo5DaOd8AscgJK5B3m5OeehiuaHg1US+Hapq413+gXZgxD pC/tsiWBNJEFkVFyevTpcfH7QZijl90PLmgGflSa8Fy7sXpNJtnKbfG++5ArAO6Rdaj+ gDFnjrinuJIrGqgR5G4NygPWvjK7+oq7x6gE9H1UhL0UfjtPwT5biCQ+bEhxPvjmMzzS ZgkB+HD5/RSOurcjFBSUuP1KD5/ocn9MzxOEE4CNq1jVf5ZbdVHr3IrFWx1V8RBeCj3p fpMA== 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=h0hI1ctK7evRWi0Tx3F+lFEp/ylOEoUVzXunsODTLdY=; b=d0j811x1uAEi6MdMjDvAIZpNpqajsNfgn09+jGXPX6HyLC5/5blc1GnGzttjvhk3xB gbiBCOrZTWJcZWF/jOsLNPDnWLU6uD6tSx/ebUhuS1eGsu1WOVP+W6sNfptdVsg7yfQM C6yP7pXTfYXtaOE37ZOL3QCMORYPTpfFd0oHyx93vsfa/0XXK5JkOhFw1aWlGpvLbx4Y ft0fzPERxbRlZxgkJVIKrCQ4J69JdqV+/nln8TDUqHfQ91E7pu46yW2oYo31Dilzc5PM JsoeqC9EiGNG1aZTLpw88qQr7PTHJKPQL5Q4+Y/CF3rXbQbuEKX/rIK5aeVb6j8+3xDh VjzA== X-Gm-Message-State: ANhLgQ1ws/ERxUqDd4odxYXGNQzNx0PiNySAlHxA5daOlzlL2OcnQSPV m+7EQRlo/xGBk5hDciilMUw= X-Received: by 2002:aa7:828e:: with SMTP id s14mr5336751pfm.15.1585172598186; Wed, 25 Mar 2020 14:43:18 -0700 (PDT) Received: from simran-Inspiron-5558 ([2409:4052:78f:bb47:8124:5e4b:ea06:7595]) by smtp.gmail.com with ESMTPSA id a19sm87724pfk.110.2020.03.25.14.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 14:43:17 -0700 (PDT) Date: Thu, 26 Mar 2020 03:13:12 +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: hal: Compress return logic Message-ID: <20200325214312.GA1936@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 Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index eb7de3617d83..767e2a784f78 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1498,9 +1498,7 @@ s8 PHY_GetTxPowerByRate( return value; } - value = pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex]; - - return value; + return pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex]; } -- 2.17.1