From patchwork Wed Apr 26 05:21:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keoseong Park X-Patchwork-Id: 87603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp16559vqo; Tue, 25 Apr 2023 22:29:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SCOJp+ttBYWZvhiL7Nt4vGbNrsp5aQlA+E+rar9scnv+Z2lW3Xqih1pLkdBLEh0Fkgp8F X-Received: by 2002:a05:6a21:3010:b0:f6:c920:7870 with SMTP id yd16-20020a056a21301000b000f6c9207870mr1664351pzb.59.1682486945871; Tue, 25 Apr 2023 22:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682486945; cv=none; d=google.com; s=arc-20160816; b=K5bmEWFmN00hiqvrv89bCTf5t1slewXbb5TQ7fszN2voUl92x2K08wvkWmoMIX+Ja/ vh+NZiXhUF+oXjXuQMHbfPxe3HlMDgtHggqRpzP0HwAJUhFXexaRnkoNT22hSBCW+nqR ODjkmTaFLFO5NEUiORRN4NVMvXlrqLksu75qDk5FICrQPuDaAGdaD2TI6/XxQj0to2nv p57qh5CSZvnZy389SUS/HaaqDyc6plaXrfDLw36Tm+EW6P3mNEzH00rGS5jU4jl5abVB xGublFxLEPTLF2yw29HxkVThpo0/Q2hAbSn0dKj7LlzR9pfWQlnIh3zO9tL7fFqnOZm1 zP+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:to:from:sender:reply-to :subject:mime-version:dkim-signature:dkim-filter; bh=Mablksv+xusZx3eIKvm1G4NKxdL629bEN5mQIqNAqMI=; b=duMOS/xVIv9CqWkfjU8XB2/x8qtSAt9M+6L/6Ov3LjYsciSQPjEDVcmOh/lkTScEU5 xkKaxob/W/raY/FaEhTGTps9rsAaDUtU3/KFibgC4XvBd5QoU+eG9EhPyPP+WqAqqC51 dbwwJ535XL1nBdIr2r/2E4msE55AKOf1tCm5KrNCTgXvdB6IZnKiAvI2XMUtVHp7eQ98 4UDz5NYjvFGiL8ZDVt3l08NLlbN4cEIrGfFV2BZDq1a1ImY43uOFI+QhyVmh01klOsAw +GodVEKvS0zegYOk6h3ywoP+0ZjgKoxgkzftF2sJPf2Y8IJaNmhvnbcxrACuILP4eXRa a1TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aOkwRT8O; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c123-20020a633581000000b00513576ea7casi15270761pga.795.2023.04.25.22.28.52; Tue, 25 Apr 2023 22:29:05 -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=@samsung.com header.s=mail20170921 header.b=aOkwRT8O; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239354AbjDZFWO (ORCPT + 99 others); Wed, 26 Apr 2023 01:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbjDZFWN (ORCPT ); Wed, 26 Apr 2023 01:22:13 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C4E2727 for ; Tue, 25 Apr 2023 22:22:07 -0700 (PDT) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230426052155epoutp02986fbc4e6bb31a328578085d4d7505a4~ZZJJDm14Z2166921669epoutp02f for ; Wed, 26 Apr 2023 05:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230426052155epoutp02986fbc4e6bb31a328578085d4d7505a4~ZZJJDm14Z2166921669epoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1682486515; bh=Mablksv+xusZx3eIKvm1G4NKxdL629bEN5mQIqNAqMI=; h=Subject:Reply-To:From:To:Date:References:From; b=aOkwRT8O+7N/kDLvepiP0F3NTz9HlX8J32dKmkC5lUdDVXXC2hhrT86xIR2lHO7gV bGHbSjqV3SgnE2PRrxpZjypbvKmP3hSpoXw5ZpLIrYCEzmvC1hM8YkHGYH8p926l2O Hc8ZgD0o0ZhodUogmOVFXWANRe80uJDsGXlVJw9c= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20230426052154epcas2p138bcce16ce6281eb794ce0d924dbef36~ZZJIQ-k480119601196epcas2p1B; Wed, 26 Apr 2023 05:21:54 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.68]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Q5nKs2mT8z4x9Q6; Wed, 26 Apr 2023 05:21:53 +0000 (GMT) X-AuditID: b6c32a48-475ff70000005998-ac-6448b4f1191a Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 17.E5.22936.1F4B8446; Wed, 26 Apr 2023 14:21:53 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH] scsi: ufs: core: Simplify param_set_mcq_mode() Reply-To: keosung.park@samsung.com Sender: Keoseong Park From: Keoseong Park To: ALIM AKHTAR , "avri.altman@wdc.com" , "bvanassche@acm.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" , "quic_asutoshd@quicinc.com" , "beanhuo@micron.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL 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: <20230426052153epcms2p27d64a865f15bfd452d564f77d63605db@epcms2p2> Date: Wed, 26 Apr 2023 14:21:53 +0900 X-CMS-MailID: 20230426052153epcms2p27d64a865f15bfd452d564f77d63605db X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAJsWRmVeSWpSXmKPExsWy7bCmhe7HLR4pBp8nCVs8mLeNzeLlz6ts FgcfdrJYTPvwk9ni5SFNi0e3nzFaLLqxjcni8q45bBbd13ewWSw//o/JYmHHXBaLpVtvMjrw eFy+4u0xYdEBRo+Wk/tZPL6v72Dz+Pj0FovHxD11Hn1bVjF6fN4k59F+oJspgDMq2yYjNTEl tUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH6GAlhbLEnFKgUEBi cbGSvp1NUX5pSapCRn5xia1SakFKToF5gV5xYm5xaV66Xl5qiZWhgYGRKVBhQnbGpumX2Qse sFU87L7E2sB4krWLkZNDQsBE4tyl68xdjFwcQgI7GCVeNqwAcjg4eAUEJf7uEAapERawl3jy bDUjiC0koCTRtXArM0TcQGLd9D1gNpuAnsSU33cYQeaICHSxSLw+O4UZYgGvxIz2pywQtrTE 9uVbGSFsDYkfy3qhakQlbq5+yw5jvz82H6pGRKL13lmoGkGJBz93Q8UlJVrPbGWDsOslWt+f YgdZLCEwgVGi8dgfqEH6Etc6NoIt5hXwldj7awfYIBYBVYnmbW1QB7lInGg6DTaIWUBeYvvb OWDPMwtoSqzfpQ9iSggoSxy5xQJRwSfRcfgvO8xbDRt/Y2XvmPeECcJWk3i0YAs0nGUkLs45 xwwx0kNi2wz+CYyKsxABPQvJCbMQTljAyLyKUSy1oDg3PbXYqMAEHrfJ+bmbGMFJV8tjB+Ps tx/0DjEycTAeYpTgYFYS4eWtdE8R4k1JrKxKLcqPLyrNSS0+xGgK9PxEZinR5Hxg2s8riTc0 sTQwMTMzNDcyNTBXEuf92KGcIiSQnliSmp2aWpBaBNPHxMEp1cBUdcknt3xxtIXxWa1J6y8w vOpZmDRf7/a8NaL/t9ywWPKl6tOr2StnHJ4ufzvpCVO7Y9h5n3uTCtIvmtwpsdB8vM2VW21O kpRk5ppJs3emTLlZz7Fp8V1n0ZCN72fP3N1TqxvOsFTO1rTLfllIp7bqvcB23YMu2x8ZTfj0 X3HKvo2qr5K8OHkuy1SsfXlusskeiWTzzXrO74y/qsXs38qV9XVxS/ZVmxeL/X5XLpducriw SHLhC/m7095teuBxy/Pyrvn6YTd6v2yawvxRNEGuzFdz8xxx7zdyedwhHLlftHNfh6UZS5/W Ylvv3H19hlGAylQHb3f5AwwfTpiFx7S/u1j4bOK+IisLk8yL24y2KrEUZyQaajEXFScCAFH1 7khDBAAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230426052153epcms2p27d64a865f15bfd452d564f77d63605db References: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764215432105626870?= X-GMAIL-MSGID: =?utf-8?q?1764215432105626870?= This function does not require the "ret" variable because it returns only the result of param_set_bool(). Remove unnecessary "ret" variable and simplify the code. Signed-off-by: Keoseong Park Reviewed-by: Stanley Chu Reviewed-by: Avri Altman --- drivers/ufs/core/ufshcd.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 9434328ba323..46c4ed478ad0 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -108,13 +108,7 @@ static bool is_mcq_supported(struct ufs_hba *hba) static int param_set_mcq_mode(const char *val, const struct kernel_param *kp) { - int ret; - - ret = param_set_bool(val, kp); - if (ret) - return ret; - - return 0; + return param_set_bool(val, kp); } static const struct kernel_param_ops mcq_mode_ops = {