Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp302917imn; Wed, 27 Jul 2022 06:45:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uVzyY8axQFqcMt5c9nBCgwWmsHDk9zL5jQJU5bdVREI1sPj2MSswjMJw/9p1zhfXpMh37Q X-Received: by 2002:a17:90a:4a04:b0:1f2:583c:3de5 with SMTP id e4-20020a17090a4a0400b001f2583c3de5mr4803124pjh.67.1658929557096; Wed, 27 Jul 2022 06:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658929557; cv=none; d=google.com; s=arc-20160816; b=C5YO58pp/Yr5yPeHJP1lDkyKzqBGLMXckEqdtKtuWwt/6fNQaID1ezci3hlLEBToRf Jlb7OU88a4mExNPezldUgtl4ogwZZl6zPbBf1zzB7jUjNzwIGH1C1tWsKUaHgQK4yFX6 9s3JVOzdY6y1ZVHF8Jqk49jF0d/GhGIV/mdRWAdoMh2LeeKK0/+VR+3qynNVs8k9A1aY cU8arj4x6DU/Skn7wPM5t2zHjcEbWN+RM5mDbEolgoIJ0B7HrMY0YLBC4iL8vJXJKOhc 230XmsLi0fWsbY2xjesok8hdC0tEbVt5O+YO5Ih1Cu4UrXe0e66Dhyw+WEjLkg22GeAp z/7Q== 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:to:from :subject:message-id:dkim-signature; bh=Eulazy/cIqbEQxNLHQla1/EWCHbecZL1aHMX/om153g=; b=aMT1QvCIBNKMFSsTPiarHodR2JfTChN7pellQZCbIAvmgh3yv3OeGVSl+uCV/0u3L+ Kq8TGiXwX8Xh+eo5wTG+N6Kl2VFWDyM+HS6beRN1lUNp5NAYt6OuBWy/tBu8r6sKGtOA dyxoWy6EVpIdgvk1N6ecMDKFN82lL37EMaf5sSy16yVpf40IGQi1GcTV/1dD8S12gPCA j1nAwjwbLZno42Gk5NjAiDv3R2BcTONotufDpMmGSCFA45f0uYx7JpZ/u+GLnscj2gEv FwV3HnY1PRljAxH95FQDHIE7pwc5e2VChNWWr2sfMrMORaJAk3aLsXxuugc+UXEDEsja eLHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=paXhMUpg; 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 b19-20020a056a000a9300b0052b0e52e1e4si22616008pfl.2.2022.07.27.06.45.41; Wed, 27 Jul 2022 06:45:57 -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=paXhMUpg; 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 S232542AbiG0NQ2 (ORCPT + 99 others); Wed, 27 Jul 2022 09:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232254AbiG0NQZ (ORCPT ); Wed, 27 Jul 2022 09:16:25 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D00319029; Wed, 27 Jul 2022 06:16:21 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id m8so21328606edd.9; Wed, 27 Jul 2022 06:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references :content-transfer-encoding:user-agent:mime-version; bh=Eulazy/cIqbEQxNLHQla1/EWCHbecZL1aHMX/om153g=; b=paXhMUpgg56VAxh+FdkVlBufIqTLxf3o2PP75i5CHx47cB2/taRA4sxOJeOEpdb7D2 eoMVk8PwmBzPLNCco3G5L6QjPBRJu9n2eYp3lqnhVgyWNNG4shAsjZ+r9f15a61uHkhQ YoqJ+FmydWS2Q+JgoZxMZOW+9qfl/WJGfFWKuxvE4cWgnfnxEKgCnu0E+ahN6fz7F/JR ogEdDLYTyY6ZzrhCSFc62c8HKtqASw/Yjo/ou4qPhllw/AedNWMYCZxgIW/MXcrBEuKY LL3/d6YwFlDUjSORh29Z2LejwV9yxps4fl/DVccIPlp2AVT9UPYQli8y+Cz6+i9v2pHs CA8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=Eulazy/cIqbEQxNLHQla1/EWCHbecZL1aHMX/om153g=; b=IuiwAVeZkfMp7HZwLI6YhDo1F4z+Pj2meTzlSTY0RdLAcIx9FeqHbN/nR4nhkOL0jN rHOneLRuMRM56QypW37zcEX/rQ0b8AiBn2qURdgaC84d9slwj8v8y3lgmqqhYEGYCtGr AHhssvTWSl6fV+5Ge2s/BbhK5PL+tJR64zQZW1MHj/2bu3ZMBaeBH3Ephojqu/TVDo3m /1sauGEEAXGIdxs+pDJk4OzZ35SpuqqVUvpSGKfJKVreIku/A8IK7XePVc8/UF0JBM5/ oObiIcLCZUDbqFci1/n/i3Wg7agZMH+MHwiEks7oIEZenio2XPHnHpiAjBFfvZFgy0GT txpQ== X-Gm-Message-State: AJIora81lXJb2w50K3ll/B202pFHjITYEg+6g3daxYsJW9nSnOlTvtpk +bnGm/u6nLROGmvyDmmcbgo= X-Received: by 2002:a05:6402:1914:b0:43a:d548:8adc with SMTP id e20-20020a056402191400b0043ad5488adcmr23112758edz.214.1658927779926; Wed, 27 Jul 2022 06:16:19 -0700 (PDT) Received: from [10.176.234.249] ([137.201.254.41]) by smtp.googlemail.com with ESMTPSA id kv11-20020a17090778cb00b0072eddc468absm7623776ejc.134.2022.07.27.06.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 06:16:19 -0700 (PDT) Message-ID: Subject: Re: [PATCH v4 1/7] scsi: ufs: wb: Move ufshcd_is_wb_allowed() to callee From: Bean Huo To: j-young.choi@samsung.com, ALIM AKHTAR , "avri.altman@wdc.com" , "bvanassche@acm.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "beanhuo@micron.com" , "adrian.hunter@intel.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Wed, 27 Jul 2022 15:16:18 +0200 In-Reply-To: <20220727070410epcms2p5206785e4d960b32dcbb6729710dab535@epcms2p5> References: <20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p6> <20220727070410epcms2p5206785e4d960b32dcbb6729710dab535@epcms2p5> 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-07-27 at 16:04 +0900, Jinyoung CHOI wrote: > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 8f11f118c30e..a3bdf9986511 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -5722,6 +5722,9 @@ static int __ufshcd_wb_toggle(struct ufs_hba > *hba, bool set, enum flag_idn idn) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0enum query_opcode opcode = =3D set ? UPIU_QUERY_OPCODE_SET_FLAG : > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UPIU_QUERY_OPCODE= _CLEAR_FLAG; > =C2=A0 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (!ufshcd_is_wb_allowed(hba)= ) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0return -EPERM; > + Hi J-young, here you should change its return, Otherwise, there will be an fake error printing: dev_err(hba->dev, "%s Write Booster %s failed %d\n", =20 __func__, enable ? "enable" : "disable", ret); Kind regards, Bean