From patchwork Wed Jul 27 07:05:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinyoung Choi X-Patchwork-Id: 12930190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62B93C04A68 for ; Wed, 27 Jul 2022 07:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbiG0HF2 (ORCPT ); Wed, 27 Jul 2022 03:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbiG0HF1 (ORCPT ); Wed, 27 Jul 2022 03:05:27 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15CF8DEF9 for ; Wed, 27 Jul 2022 00:05:25 -0700 (PDT) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220727070523epoutp0231e2a114dcc54cba7457954fe3db0c7e~FncjQ6JQM2448024480epoutp02l for ; Wed, 27 Jul 2022 07:05:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220727070523epoutp0231e2a114dcc54cba7457954fe3db0c7e~FncjQ6JQM2448024480epoutp02l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1658905523; bh=R6OHZS8L6v6uGk9MS1iioqNTlA6txP76blUF08vlRRs=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=kU92BbhfG+juNXHex4nfROQrZXD7uA7jcrBitotCEOffGEWbur+vAEHKBXr09oJoM 05vLvufMD+A+J6wNH6rkNy4e70qDnwisPr+ohaqH1gYFMd8S0a7v8hTIHT93GXJpV0 4WmqRnver02ot76TuvpQ0/7vczSQQFFnfX3eDvv0= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20220727070523epcas2p167dff79a64fd544b7fa80694b4c297cb~Fnci3g7m41693016930epcas2p1n; Wed, 27 Jul 2022 07:05:23 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.90]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Lt4YG5VCdz4x9QL; Wed, 27 Jul 2022 07:05:22 +0000 (GMT) X-AuditID: b6c32a45-45bff700000025c2-3f-62e0e3b2b448 Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 03.9B.09666.2B3E0E26; Wed, 27 Jul 2022 16:05:22 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v4 2/7] scsi: ufs: wb: Change wb_enabled condition test Reply-To: j-young.choi@samsung.com Sender: Jinyoung CHOI From: Jinyoung CHOI To: ALIM AKHTAR , "avri.altman@wdc.com" , "bvanassche@acm.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "beanhuo@micron.com" , "adrian.hunter@intel.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20220727070410epcms2p5206785e4d960b32dcbb6729710dab535@epcms2p5> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20220727070522epcms2p5ad2dd21b471acee963dd58b37d35e11f@epcms2p5> Date: Wed, 27 Jul 2022 16:05:22 +0900 X-CMS-MailID: 20220727070522epcms2p5ad2dd21b471acee963dd58b37d35e11f X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y CMS-TYPE: 102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FvYbXF9eps06JJ+9Y55LGk3f9m 4BoyRURsI+f2rlki9U9OsWRruzxWWDL5Z5v7vMVH/8xWY7zkZHlbk4OlZMbbo6pHrhws2GB9 +65/caDhz5PtrbfjQ/8uvBvluFdAMjzms6fd8Y2nsrYfYtHKa98RuSDKXKHefqfL5KpTx3cc 39SzrlN1dgSXS3Nvx5eq6i1qfsGmJ1zyJfvipiuxFGckGmoxFxUnAgBGWGPvMgQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d References: <20220727070410epcms2p5206785e4d960b32dcbb6729710dab535@epcms2p5> <20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p6> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Changed to improve readability. As implemented in ufshcd_wb_togle_flush(), the conditional test is modified in the same way. Reviewed-by: Avri Altman Signed-off-by: Jinyoung Choi Reviewed-by: Bean Huo --- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index a3bdf9986511..48ba109e29f7 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5733,7 +5733,7 @@ int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable) { int ret; - if (!(enable ^ hba->dev_info.wb_enabled)) + if (hba->dev_info.wb_enabled == enable) return 0; ret = __ufshcd_wb_toggle(hba, enable, QUERY_FLAG_IDN_WB_EN);