Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2089750rda; Tue, 24 Oct 2023 11:59:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEso5iTR7kQfIrJMBijr+UBu+Ew0TwzDtT4JHzTUcSLMIYYHokeCecIY0WfYgZVwm58asQ8 X-Received: by 2002:a05:6a21:71c6:b0:16c:1340:c621 with SMTP id ay6-20020a056a2171c600b0016c1340c621mr3872253pzc.31.1698173992737; Tue, 24 Oct 2023 11:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698173992; cv=none; d=google.com; s=arc-20160816; b=BtDiYgsMrHNqC/J7idrOj3BqunJkyELzA2OzjpHsk7CkONF5cSyLM71VDB7xGvkWHE jF5FmBf9vvcuhKkMF6uUKjAdZE38zTLNmi5QMYyixUOWAjKZD2CedRQFMFoQwvtKJifj tQLdiLpLaDEvIdpjZTmHbclQ8QOybPSjMNixfbnxTJi6HoVkM3AeCHTHqecp4U2Zwkhb 0pl/a0BCMQkfV99LkASaeKlP7OxsJ7A9UHUMPqGIC+bpbf9ds0iQeUytnDE8vIMrvOEP zOg5UJgFwxCK+EBPzjfnc4tW5ERaCBhrKZ7YGdkMooYPGDke9BgCTNjB8/MKc7880DXB shiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=MqdTgJU7OJSh2UIoWNVVxddyfkvt/XLDbL6ku1eOseU=; fh=54B28Nqx0f+4avdQdlZWmwWPl8ZOVQEd0eC+9KRDVIE=; b=YWU0GxAFD1ISlmyikqbept82ClC3SsLISd4QZXwEEbdgS/YIYXzlpmSIqn39q4HpJw fDInfvYyRcQoyotst0z3Mjvfr9BTerZBcblwx6wIo32e2rJ3DC6jF3ULlgcLrzZIW7ki gIh60DJ88Crjq7RjQE0IPOrsWgnHRfiLZqJi3Kns/MCmEOxNpy3Dwnbge3LWzozoNSAk 7rUB+b/AiHUAw/MBRh29rIdAK+FXPYZkNJPNg+ofydf+3FP5ZTkbMHHgtw1AwYFoFxUw cVQCzqC4Pnvr/lJTfVP7b9hx900bDEyB+v22wsVw/MIUF8gS2UEEe1Wt6Q/IvyvGqLz2 akXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p17-20020a170902a41100b001c72325d6f4si8428906plq.605.2023.10.24.11.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 11:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 812A780BA6B2; Tue, 24 Oct 2023 11:59:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344175AbjJXS7o (ORCPT + 99 others); Tue, 24 Oct 2023 14:59:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343856AbjJXS7n (ORCPT ); Tue, 24 Oct 2023 14:59:43 -0400 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD8C710C3; Tue, 24 Oct 2023 11:59:39 -0700 (PDT) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5ac88d2cfaaso3777552a12.2; Tue, 24 Oct 2023 11:59:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698173979; x=1698778779; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MqdTgJU7OJSh2UIoWNVVxddyfkvt/XLDbL6ku1eOseU=; b=kwYcU3rEeZD21aWf3yocgmRprNXfsUDfjCplZfkxvWlrJOrpR4pBq8boDtFW+CBtkH IV0OBO+tYDJNhd7+FBIzZ8b8zKQCSYpuwXK/djGCba5sxZaOncxqxTaemVKG4kZjndCu JZ0uXx7Tv0f0QyrXVUBteAIi+2++Rhmb18wGyIIJ1CEvxf9VZlGfQ3nHTpC+kjf1OjME P+NoRZ+Dki85kxAagHUclepYDQQBhpZO95Msjrlun7M2KeGmUaLAFo6GP3rZAgk8pBmq FOsTuLljmHNPZ1l/ije9pOy1DnAZXugQcdvL/UfQi1DgluSioDyB6TZBq59NgnpSszll ECDA== X-Gm-Message-State: AOJu0YxbhoVWDWBeYrLl8pZG4vWi0CnkLYfKEcMz4uAbWv/F8NvpOBRg vH3xZN9QEXvH/Z2Lv8ovA08= X-Received: by 2002:a17:90a:1993:b0:279:354b:50f1 with SMTP id 19-20020a17090a199300b00279354b50f1mr11617386pji.3.1698173979146; Tue, 24 Oct 2023 11:59:39 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:30e1:c9d3:6b41:493d? ([2620:15c:211:201:30e1:c9d3:6b41:493d]) by smtp.gmail.com with ESMTPSA id az7-20020a17090b028700b0027d157e686asm7177565pjb.49.2023.10.24.11.59.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 11:59:38 -0700 (PDT) Message-ID: <64aededf-7879-4246-8c1c-bc38ea47e05c@acm.org> Date: Tue, 24 Oct 2023 11:59:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ufs/core: ufshcd: Conversion to bool not necessary Content-Language: en-US To: Bragatheswaran Manickavel , alim.akhtar@samsung.com, avri.altman@wdc.com, 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: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231024183401.48888-1-bragathemanick0908@gmail.com> From: Bart Van Assche In-Reply-To: <20231024183401.48888-1-bragathemanick0908@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 24 Oct 2023 11:59:50 -0700 (PDT) On 10/24/23 11:34, Bragatheswaran Manickavel wrote: > 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; > } Reviewed-by: Bart Van Assche