From patchwork Fri Dec 13 10:49:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 11290431 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD9ED6C1 for ; Fri, 13 Dec 2019 10:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC98424656 for ; Fri, 13 Dec 2019 10:52:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="YapY4qEr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726623AbfLMKwU (ORCPT ); Fri, 13 Dec 2019 05:52:20 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:46744 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbfLMKwT (ORCPT ); Fri, 13 Dec 2019 05:52:19 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBDAfth0185257; Fri, 13 Dec 2019 10:51:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=iwPt1RqCBgAXsSjvs3vWx+TgsOQ3Q6SerEOhz6a8myk=; b=YapY4qErkMRKaRV2bvN53F2naze/iWIyJCUmE3k4fBoWw+heLgrSlngbGapC4ydMaNw8 UFZLuTO4bXn9GHuUbm/bE3DMxmccxExG1aBt0j0oTAv8Romv9WG/UqEFeN6T+MUOhRX1 BaRU7XTHS7zg4m72OGmlbnotaqzwwzT4vDlUId6biMCfGO4Tu8o67GyqUi15RsODpxCt K6y3aFlgxXzXexekFO5K/bPdlL/tlK/zFyR9qa5hxLtjANPMCkWgjYs4MKn3X4LjKb7h zHpXIrNWYYHTjnJpCgCG99ZGMXHI3hyzjGR4dz4ht0/dRTVHN/IpUlbS1hKcijkX0c8+ mA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2wr4qs0b2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Dec 2019 10:51:48 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBDAk7pu135014; Fri, 13 Dec 2019 10:49:47 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2wumw5wftd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Dec 2019 10:49:47 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id xBDAnjmD001932; Fri, 13 Dec 2019 10:49:45 GMT Received: from kili.mountain (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 Dec 2019 02:49:45 -0800 Date: Fri, 13 Dec 2019 13:49:35 +0300 From: Dan Carpenter To: Alim Akhtar , Subhash Jadavani Cc: Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Bean Huo , Stanley Chu , Can Guo , Bart Van Assche , Venkat Gopalakrishnan , Tomas Winkler , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] scsi: ufs: Simplify a condition Message-ID: <20191213104935.wgpq2epaz6zh5zus@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191213104828.7i64cpoof26rc4fw@kili.mountain> X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9469 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912130086 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9469 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912130086 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org We know that "check_for_bkops" is non-zero on this side of the || because it was checked on the other side. Signed-off-by: Dan Carpenter Reviewed-by: Bart Van Assche Reviewed-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index bf981f0ea74c..c299c5feaf1a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7684,8 +7684,7 @@ static int ufshcd_link_state_transition(struct ufs_hba *hba, * turning off the link would also turn off the device. */ else if ((req_link_state == UIC_LINK_OFF_STATE) && - (!check_for_bkops || (check_for_bkops && - !hba->auto_bkops_enabled))) { + (!check_for_bkops || !hba->auto_bkops_enabled)) { /* * Let's make sure that link is in low power mode, we are doing * this currently by putting the link in Hibern8. Otherway to