Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp380961rwb; Wed, 28 Sep 2022 04:08:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vh561xpOpZQXCJTVhJLpcUx0Ndila4sSITEOOnEwOeIPjA4mWhfgIi9Egg2sJur+K3rdr X-Received: by 2002:a63:e452:0:b0:42c:60ce:8b78 with SMTP id i18-20020a63e452000000b0042c60ce8b78mr28818453pgk.453.1664363324722; Wed, 28 Sep 2022 04:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664363324; cv=none; d=google.com; s=arc-20160816; b=hDgkAtXlAN6y+z7MCtgmKN0rQYLgbJWDchykhI6OYcp3WxfP1GDh+TKLxvWXkaJv4W UPYIx2fl9KZDR+QMBqwF87y56jbCJZdY18MjF+HcXVhM+Ohs7mVg3LUglAU/Qqr+Ul/R rC1maWIJ16Gbukx5GEDK2UvobLFTDSoVq6z4wr77tsxFxJU0IKJIvOo9pwZBCznOql1U knNn20fsgAnk/XJnpwZWE1+DoLz6XI7yUrI22DgcWCxUHyZJiHHockejIYaLI0C2HCxo dPqiPuZyyplxxaO+UnIxcmG8zEoUycxkdYzo2EEDodnoHvImho8cV2/9VurUR+OB2I+d RjqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=+IUuTOpUG9E3kEMkZMvCbwk8jBPBV1cYbzQF2o9+mRE=; b=y0ihQEcNpZ3kQUGRFcJOCrJbcUckIQLuCfMPDNyzeTSNORkj1OXSkfzwPjoIHL+qHn farKyzvGRx2DLslM/t7Vk2QuITEJNPeI+rqMoeukY239mRCwLVxDMQuVekGYKyCk9LBr PFBUvfosc00oDcyYvMawRyRGDyIB9rtVJ4XPK+SFjgwVBSAVzkSJNEc4OtN413XiHBga /t2Il6fPtwNYpj8et/hEvLxcPKVEPwKPMKzpr81UkLSjUVmx6or2VeBEvr7Ay/7mrZ7R ZM+NkrO3r2/rvP8vcCKJ7ZZeF2LTeMYjc1rJxFWaPxUooKrfEy2wOeWKE42pJXCM1oJ7 Cx/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=er1zGT1P; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a6555c4000000b00439c9310023si5211480pgs.740.2022.09.28.04.08.32; Wed, 28 Sep 2022 04:08:44 -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=@gmail.com header.s=20210112 header.b=er1zGT1P; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233299AbiI1Kgj (ORCPT + 99 others); Wed, 28 Sep 2022 06:36:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233604AbiI1Kg1 (ORCPT ); Wed, 28 Sep 2022 06:36:27 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE7566130; Wed, 28 Sep 2022 03:36:26 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id bk15so11344861wrb.13; Wed, 28 Sep 2022 03:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date; bh=+IUuTOpUG9E3kEMkZMvCbwk8jBPBV1cYbzQF2o9+mRE=; b=er1zGT1Py/2ZjBWJXMv2qtP14BtOd1BunBPwDKuPdyTlaEX0oOh57EfSfCVSp5qLFt 8cwXYMk6MkLCKauUfSOan4ARlPfdvFg2+a7N3biRj6HRs/tl+bjYSfMRRSwPkDIKqCl6 60W1oWUvYPDSaVAY3r0Ijhsryo97AxS8e7ooNS03/4PplRYSFBBCKj7+nSVfQtmKTiKN JGIHLafOAEK47Fl+M0imCpCQW87JxVA/YdrivL9IJIGYGsORw+2DH0EpvsyvWeq8KJg/ 5hB3rAHuj/tYpGQHGITEpBbVeB9pvLzTcd/Ahc156W57zD8XnvsbRtpSf5PGj5vaS1la dH9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date; bh=+IUuTOpUG9E3kEMkZMvCbwk8jBPBV1cYbzQF2o9+mRE=; b=I82cbHFfsaEEbgnMJLZL+Es6WuJHClcLrqkKRaQwho5Zi71jqAlcIM+o0c9E1tnFRa aKE3gO5OfEo6TFxG+eOlVkh4spgNbzejdYGVDHA5uksciTCQXDe037jytzFf+Vt35gDh VLQ2vA1RHAJD4P4JZ3X7R36/KXm1gZIqBxcC2sfRijTWsfHMLVgTXK6gwqtgg8lpRegm IZWi+3dH7WukMWqKuKiwQXjkNgsfelSsSUD0/KeLiVe4YcHtREBOnvbYtFOnFeQRwtpG KfzZEJcSKpgKJoD9Up1mb34r0H6tN810XX/MmUy1sla7uB1oOyuOupc6zKOP7L7k0rZt WkHQ== X-Gm-Message-State: ACrzQf27U+jAsCrl4dgCenac8RVdQwJncS99RZynqGNjP3Cr/FUORO+y 4oAuMVkw3c4ZOH4UdVCISEc= X-Received: by 2002:a5d:6447:0:b0:22c:c621:ef73 with SMTP id d7-20020a5d6447000000b0022cc621ef73mr2639073wrw.636.1664361384286; Wed, 28 Sep 2022 03:36:24 -0700 (PDT) Received: from [10.176.234.249] ([137.201.254.41]) by smtp.googlemail.com with ESMTPSA id l18-20020a05600c2cd200b003a63a3b55c3sm1439466wmc.14.2022.09.28.03.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 03:36:23 -0700 (PDT) Message-ID: <0e2334ebc4ba0ba137e83c60a090fde536be7f26.camel@gmail.com> Subject: Re: [PATCH] scsi: ufs-bsg: Remove ufs_bsg_get_query_desc_size function From: Bean Huo To: Arthur Simchaev , "martin.petersen@oracle.com" , "beanhuo@micron.com" Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Daniil Lunev , Avri Altman , Avi Shchislowski Date: Wed, 28 Sep 2022 12:36:22 +0200 In-Reply-To: References: <1655727966-31584-1-git-send-email-Arthur.Simchaev@wdc.com> <87e6fdb49d9d76c468712e1b42cbc130273b5635.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Wed, 2022-09-28 at 08:33 +0000, Arthur Simchaev wrote: > Hi Bean >=20 > In case you don't have any comments I will appreciate if you will add > "reviewed by" to the patch. >=20 > Regards > Arthur Hi Arthur, I'm thinking we should remove the desc size check in ufshcd.c entirely. Just read any descriptor with a maximum size of QUERY_DESC_MAX_SIZE . For user space queries, ufs_bsg reads data of the maximum length and returns the requested length data. Thus can improve code readability and save CPU cycles, also can fix your concern. I don't know how about others' opinion? Kind regards, Bean