Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp475731rwi; Mon, 10 Oct 2022 03:12:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7mIO5KFP6N6MZYQ9mOvPSyBEYOIg2EifsPNdI3d0jvDO+ew/5IAnxQuf10EqdcCmVnIc5i X-Received: by 2002:a17:903:2691:b0:181:2875:9d6 with SMTP id jf17-20020a170903269100b00181287509d6mr10876017plb.105.1665396743188; Mon, 10 Oct 2022 03:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665396743; cv=none; d=google.com; s=arc-20160816; b=yik600JtD/4KGYr63vsEDWppLUQ2qYkI3pWX5MVCmEvSrNl6p8oiGfkcJXlmdJlKIj ULzqeeobPlACAQTnOZME8gXLtNv+MGNa226DQ2tzsJFrhQeXAq/18Uwv/ggR/diukEcT pxDx9ELduxS0kT5tvJLK3WxRsryXPvSER8nNqGialfAXV3fxtYQNGxRRnAQoac1gyVyU CrbOCbHp4R1rjY2rImnGKXFXu8BJ7wct0JrK5rS6o8DmmcXY04rFVkmGGDd2Z34izqMa Azr2ASiznsl9Tt9Na+Xv/NyVGFuNE4ntDXcOrsQQgjQtTS62nCAFdpW6WXwIQGHjdX72 JXhA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AQ5tRKniKZUmoOnhRKBBg6EOdWGzLqH8T9IBoyUqMwI=; b=vBmPF/OnfPk1b7UH0BjdrZ+0VjcM0YkfoHME6jvKPSnZPYrXNrx6O985TJCxBS/sCW bQNi2Ok6a6Wt4dEXO/mAZRMarjmnfUi5PQ/qElamFrkXMTWPzot0BlfRXBLLi5XORwzT kS66fWmOKYYCy7zPU2y4aKzK7CEMLCeeFK7PeFYP9qwwegoC10ST9F2Q320VC+YITKVx v1tDYPsRObTRGbTYLu/PfqPZ5sskS+obTDVB88r0B2SAQ6EC67F6zp3HEmrVx2+gEux1 jetKkgUtTKKrVBSmTDm6DbYfekfOk5FG6xc20SdvvNitPddrpFfpe+8P2y5t/WQG23OO nbAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iokpp.de header.s=strato-dkim-0002 header.b=kRigBIBo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a170902c94100b0016dcf421fe9si14179781pla.486.2022.10.10.03.12.05; Mon, 10 Oct 2022 03:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@iokpp.de header.s=strato-dkim-0002 header.b=kRigBIBo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbiJJJaO (ORCPT + 99 others); Mon, 10 Oct 2022 05:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbiJJJaE (ORCPT ); Mon, 10 Oct 2022 05:30:04 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0632C2A; Mon, 10 Oct 2022 02:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1665394189; s=strato-dkim-0002; d=iokpp.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=AQ5tRKniKZUmoOnhRKBBg6EOdWGzLqH8T9IBoyUqMwI=; b=kRigBIBokwu9NBNDu61CcYa5HSdPB+wX9r5SloGwIPeZYeoIXhdSkUduAgZq6+aTR+ zjFDAAU5lz2tCsiEBswmGIDMW//H/kcutSgjosnIlQSGTBiO0jMA9rLGF5hAW1f1tFiL ZeoD+11dA8syA7HRvR5uTbda98yIsDQMyE1btNmiFNvB2CdK/340JjokB495REzxQlyP o/QsoDm+f9TZNPOC/+81VuBwgPHZPI8bF4MWAjOCWV0thQ0mM2KzRzpoqiDoOY1xK0ms PwPZN4dAnyAAU8TPnnCfKp1abbMISKduzHTsNSwZcYgpp2nSRaqaRjwo/pj2clDrykJ4 oZVw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD2QzemV2tdlNlNRZBXiUw=" X-RZG-CLASS-ID: mo01 Received: from linux.micron.com by smtp.strato.de (RZmta 48.2.0 AUTH) with ESMTPSA id zad98cy9A9Tm0DC (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 10 Oct 2022 11:29:48 +0200 (CEST) From: Bean Huo To: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org, daejun7.park@samsung.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] scsi: ufs: core: Remove unnecessary if statement Date: Mon, 10 Oct 2022 11:29:36 +0200 Message-Id: <20221010092937.520013-2-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221010092937.520013-1-beanhuo@iokpp.de> References: <20221010092937.520013-1-beanhuo@iokpp.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo LUs with WB potential support are properly checked in ufshcd_wb_probe() before calling ufshcd_read_unit_desc_param(), so remove this unnecessary if-checkup in ufs_is_valid_unit_desc_lun() to match its function definition. Signed-off-by: Bean Huo --- drivers/ufs/core/ufshcd-priv.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h index f68ca33f6ac7..2457b005101a 100644 --- a/drivers/ufs/core/ufshcd-priv.h +++ b/drivers/ufs/core/ufshcd-priv.h @@ -300,9 +300,6 @@ static inline bool ufs_is_valid_unit_desc_lun(struct ufs_dev_info *dev_info, pr_err("Max General LU supported by UFS isn't initialized\n"); return false; } - /* WB is available only for the logical unit from 0 to 7 */ - if (param_offset == UNIT_DESC_PARAM_WB_BUF_ALLOC_UNITS) - return lun < UFS_UPIU_MAX_WB_LUN_ID; return lun == UFS_UPIU_RPMB_WLUN || (lun < dev_info->max_lu_supported); } -- 2.34.1