Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2078494rda; Tue, 24 Oct 2023 11:34:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSrH/aOtKPC4BcwkqIvivdmaf7bHBMEFy6j9OCycI52YbD8eqDDE4dU1SVfeNHpTSkC5ut X-Received: by 2002:a05:6a00:1d11:b0:6b3:80f8:7e91 with SMTP id a17-20020a056a001d1100b006b380f87e91mr21449161pfx.9.1698172462303; Tue, 24 Oct 2023 11:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698172462; cv=none; d=google.com; s=arc-20160816; b=Fe5VqToKDjUjd8pfppkIN/zVYg5NLDotGC3BahXKlq2gjMPvw5OmDoAkxq7TsJW1TW NKY4Q9JV9CJbCruEHREXzg07s22PtYN9Nvh4ysLshSYk9JFoEA3zdLFb0cewnn3sY0Fi MGDZvjhIeXG5TuP0b7YS/rk6QgYhmj8w7702CKMhW+6r4QXDkIkPL2nqvk0qz70xIsYE utorGE7so99O9X/Tsbf6sqNBYhdWod3wJnkWbYzJurTAW4YVGuREgkIEHcgFWn2GNFJr /eAm/BR0ElZYDe7eIk/9wMXtg0KdYVmnJZKnfUWXqJbpDw0uQcF4q1U14hAs7FkkqJhV ohrA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=eInzOmV9CI5bvKZsQcE1o+qh/nZEiz4SXYl0oOFUVx8=; fh=o4GbAtnvKW5TqRnchXqJisdvg9/n0fD+9D4FQ3Xzs4s=; b=Gf2OW8rvXkdIVk7fHKpCKtG50f3NqjNgV335p9y3C6ruuuxk6rCBloAfMaupOBPLVP ft4b8uUHIZqnCPaVYKAZ97n355i0K7fFBLg7QnksW8T7cN6g9uBLtcIyTlR5gT/iERf7 Fnq7dBbgtje16IXAphEviJSfm9d8te4ljScE+2WSC4XqFsga0bFJXoFFEpkk8zfKGW1v D3MzukQEx+3nrM4TfB7d6d6F2uYDHRl6Yuckbp8FQgbvYHMdO+vdcF/ASC52bgF8vFkJ +7GXeyGqHZ2zaWbmFcrrToLJf9SyHNrsdvjWdk/i2tq0r8bb9209u24299mgvqMctsrq 7Yaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KoHLe3mE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i30-20020a63585e000000b005b8857bb156si7630652pgm.463.2023.10.24.11.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 11:34:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KoHLe3mE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4E32D80278CF; Tue, 24 Oct 2023 11:34:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343922AbjJXSeQ (ORCPT + 99 others); Tue, 24 Oct 2023 14:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231553AbjJXSeO (ORCPT ); Tue, 24 Oct 2023 14:34:14 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA49B9F; Tue, 24 Oct 2023 11:34:12 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-27d17f5457fso54636a91.0; Tue, 24 Oct 2023 11:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698172452; x=1698777252; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eInzOmV9CI5bvKZsQcE1o+qh/nZEiz4SXYl0oOFUVx8=; b=KoHLe3mEcIszexE7BQOHOietAwA7IgBuZR5a088f+TEqfqLyAjbmoGaSsYOb3SxOfX 8WxO/07819+H1bcCnXbBaoSi9TdJzlX7CTqaf3fklgvLmzlcqIEi9ZsuejACKZlkILvo WmyiqJ2P7HRIYMVppfuzxkg/eOsiCBP26EFQac7YRjpMc3loKeD7b42QzpGgF73Wp0hm Mnh5TGlgbawXdCPU5yG8U6A4O8D21AJA3IHtbmGCduYM7rx0HNHKBEO/MPfIaYGNnHqN JLjHDt5IeLGwXDEzsCqGGhc9pA6i2h581iKwZ785JPLqy9QexmsRZR9I40PsZoRdPKyl 6N4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698172452; x=1698777252; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eInzOmV9CI5bvKZsQcE1o+qh/nZEiz4SXYl0oOFUVx8=; b=pN/dBjpV3LOVOBmW1t++WMEHG3fUij3zNMmdXlXDdvEjlSqrI9Y/W8vLoM/jhJ0z6H /4NzhN0ZbfEYCyx4Pfs8bTCjfDnKja2i7UnqLveq8mdNE3OfQV/q/nxqi+nsNmwPCgmJ 6jCYWMkk+zxROjH1TMOuJMLQkkLkQijZR7rEIDLy/Ug1ISA0nLjD8aNxkyJ1OMMy80Yb Z3rz6R5UdxHKVhxtDoyjIQASbrmcTx4U1Nh1UAyj40ihVvFYl1CRkoUWo/4O3TlfoV9/ XdoxAAoho/r99AWuHg5mV9VhyQZ0yKnDtUiLHpcWD0M2zC+ba5ccFF6j+ZRHQk7LIL8Z HSPQ== X-Gm-Message-State: AOJu0YxbpSVSOwweGJqvrQ5uL2Ea9KH3GggvkhqIALrR1DxRSPwq3W6/ sT0xiJ2FazrgyZeKY+qg7kg= X-Received: by 2002:a17:90a:9a6:b0:27c:fa8f:4e91 with SMTP id 35-20020a17090a09a600b0027cfa8f4e91mr22597340pjo.23.1698172452246; Tue, 24 Oct 2023 11:34:12 -0700 (PDT) Received: from brag-vm.. ([117.243.121.127]) by smtp.gmail.com with ESMTPSA id rm10-20020a17090b3eca00b0027476c68cc3sm7202125pjb.22.2023.10.24.11.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 11:34:12 -0700 (PDT) From: Bragatheswaran Manickavel To: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, mani@kernel.org, quic_cang@quicinc.com, quic_asutoshd@quicinc.com, peter.wang@mediatek.com, beanhuo@micron.com, quic_nguyenb@quicinc.com, Arthur.Simchaev@wdc.com Cc: Bragatheswaran Manickavel , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ufs/core: ufshcd: Conversion to bool not necessary Date: Wed, 25 Oct 2023 00:04:01 +0530 Message-Id: <20231024183401.48888-1-bragathemanick0908@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 11:34:20 -0700 (PDT) A logical evaluation already results in bool. There is no need for using a ternary operator based evaluation and bool conversion of the outcome. Issue identified using boolconv.cocci Coccinelle semantic patch. Signed-off-by: Bragatheswaran Manickavel --- 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 406885671665..bbd8e83be6c6 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -2406,7 +2406,7 @@ static inline bool ufshcd_ready_for_uic_cmd(struct ufs_hba *hba) int ret = read_poll_timeout(ufshcd_readl, val, val & UIC_COMMAND_READY, 500, UIC_CMD_TIMEOUT * 1000, false, hba, REG_CONTROLLER_STATUS); - return ret == 0 ? true : false; + return ret == 0; } /** -- 2.34.1