Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp893528pxb; Sat, 6 Mar 2021 22:42:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNSxctgWjVlr+7+I+V/+pnSqlyTe9aJSM8hlMgtdrqSanS30LzHYkES+tf+5LeENpXbY1u X-Received: by 2002:a05:6402:12cf:: with SMTP id k15mr16203170edx.192.1615099354843; Sat, 06 Mar 2021 22:42:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1615099354; cv=pass; d=google.com; s=arc-20160816; b=giFgNr1vRuBxUBeKC9Rok0/hM2qpoIH4MGvN6FQ8ptQPhKnQhZTePb4OrS4t9O35oh OSmMlNJQ2mvrMUwiGFj73rw23QeBg7t93sQvsChlp8goJzANkUPoThGQnEdyhsOFwt9c lUh6Kas+aYF5hlMQhgjMfeVnqFMPikBkWlAA9H3qpaxBb/RtINE7bonYzJ4gQj2ylkP6 QocONWgyx8OGKG1hxGblZymvOLEwL81VbAUea0in9WvbCWQxPLEsC3ZjuoVQ7zDfqrhU MOjo9i+RNE5r/xrwsHwqR6GsvjqA/9URqGWpreIX8+B52g0C4zulrjGJtLkWkAS5GzqA 6K8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:ironport-sdr:dkim-signature; bh=wocrEIAUzxjzaxuFn7qfgoxBTcvXImx//fmJYztEG6o=; b=JrHRQ2dk97VpEfgjriBAGv0rOW8ra19aph1ezSnUyVkoe9wMFzFgsWcMOOtb6V+l+C YdAz5mV9b0lx6TKCIlXrtO/2epXlETTpIbeAJkUu+Oy2VYaAk/72yF0lqfiriqLECoZD 3tFjPqamz8Jikv/7WVPbOo37aTq5nqnHKLaOmJutlN+9WKe5R860udsk7gbL7llzN/eB Aq+1B2ty2mA3GqAeKcWOMmWdv1JUa0qwhHWfT+6Ay0wVYW5inl01zYBNmkaAz7c+NQnv EME9Okz5tWCo6rDYO0qWwYMlFQubITr7h+5cIlquz9ST5U9li1klDwYa2mGos4ZNy0iR mgpQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Rg5hSOTo; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=h1ssTYW7; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si4708988ejq.694.2021.03.06.22.42.12; Sat, 06 Mar 2021 22:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Rg5hSOTo; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=h1ssTYW7; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbhCGGlP (ORCPT + 99 others); Sun, 7 Mar 2021 01:41:15 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:60813 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbhCGGlL (ORCPT ); Sun, 7 Mar 2021 01:41:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1615099278; x=1646635278; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=4tcouaGaCpQCaukMW0Fg+80Ujit3Z6zMHk/kxROKcXM=; b=Rg5hSOToeNdB0NNYXx3+vxLbVfi+tapYrVZst8dTNNCGCgQ5WZhZBz8L ZlwKjdJFhdtAeoxqPyjOMjdVknigIovne+z/YquHh4WVu6wLcVkCVFeg0 umfSXWf2QfoIkU8zvDuYluakEp7hQXZMi5AULRw4WqHy/L+pjr2O8sfQ3 wPESq1r7nLLJeR+flVnlO8k8hlzMQv3kA4sNgSZ+nmT2CdGJl9h2znPSH JBBtpdyQOje+cPxovZG3+y8NOA6CAoB2r14Ox02MYDh8bA96ARz2GdTXj iccS6sw8RThI4LVIF8grGvAX+CTFjU1frcSFDYv4VjUrcLEaOtycc+4iU g==; IronPort-SDR: kOBME9F4og8CyEIvLN3uIC+mA17c2freAM9y+oVDHSaPG7YFDlCDGFbin9I79NSIQ0LA6SESph TFjE8YJzXjTygckFiR8Wlgc+3w4xe6hFOeVDPJACSR1O2UNEKPhgYbEIfFXG6zy14PDexfepsi 2oPqNFPCHNFdbpgaA0esGv2Lx/I4t5kxUFVJKjN3wRSCw9WWUwVK4YXbsOXj0ayQXr+kZuUmlr PHP/tCB+VMXsW17vLRag5J0QzOYDnbGnWKJsHcMNZd3oq2bEGa8TzsoE57ZzHeCnd6H4e0NP8N Yto= X-IronPort-AV: E=Sophos;i="5.81,229,1610380800"; d="scan'208";a="265858368" Received: from mail-co1nam11lp2169.outbound.protection.outlook.com (HELO NAM11-CO1-obe.outbound.protection.outlook.com) ([104.47.56.169]) by ob1.hgst.iphmx.com with ESMTP; 07 Mar 2021 14:41:16 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=niSHfL5omeP6AGpYroe5eamDkwpOXYY3c+rbsZY0luAouW8PYC04U5zREnmiYfXxlKTd73O7C4rlQw+g/llJINQcDclNEuczd5+s+UcpTlBUECLRf5zkC5GT2wATevtYgBsAubzt35efP9rdCcaAebdBmQvLqC4O1rM0gLYu3TcPUyevKIHjq/wrQL3fbLPmiRDFqbeTzWoOkhZpEls1OHfN3k6bjaPqebFA3EpXFGYpie+nUerOYwm8FxsIMNhit+jNEaNbavSV4siULE0l6tikjuZJ+UL/AouHBcztpd6Z1f/TR96Rh1UJdosoKQIu+EYh5dxheSsTjaxOX6jKsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wocrEIAUzxjzaxuFn7qfgoxBTcvXImx//fmJYztEG6o=; b=nFQTeDLlXURKiu1CQyG68l8s/UqHj5e+7czlcuhowBHabIlqwgbBQnKPXRJ4GfsmxVVF7q8lk1185uV7rw/SeKv28JSfK8X8iY8mWrq+zigS430GhY2hkq+3ig6DLhurJ2kPn5r+SBCth4oMKVZA+Ww43WN/LJ5JoVqlHcXHOkjCaX7S41nEFj9/qHECpLXHOduBSKg/ZVly0qEsY1FxwhLeGGjitLPIqfTNQSaJiQxnJYf+vUumPG7d1iwzA88IIaMZwDazaxv0TEyiLy+f+cCkRv8S9EUq3atLD4s89NKq5M39eiJhJBpJQT8h2hsW7LAsBMuBzktXMFb5QWYARQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wocrEIAUzxjzaxuFn7qfgoxBTcvXImx//fmJYztEG6o=; b=h1ssTYW7XvYjxIXs9fN9Q8rSS1HV+Dmr/RjMu211+tnTexf6Wn90W1vHm4XN/pDIVn8tbxs8ENxM4gpaS74zKrVvfjharnZpDw0aHjWgVQ1rJqurivQYvYn0cs00tmQqVL8GqmqZITFUqutAfFtFhmXLCoc1gtonv8ZcJAi4vQY= Received: from DM6PR04MB6575.namprd04.prod.outlook.com (2603:10b6:5:1b7::7) by DM6PR04MB6576.namprd04.prod.outlook.com (2603:10b6:5:20d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sun, 7 Mar 2021 06:41:07 +0000 Received: from DM6PR04MB6575.namprd04.prod.outlook.com ([fe80::e824:f31b:38cf:ef66]) by DM6PR04MB6575.namprd04.prod.outlook.com ([fe80::e824:f31b:38cf:ef66%3]) with mapi id 15.20.3890.035; Sun, 7 Mar 2021 06:41:07 +0000 From: Avri Altman To: Jia-Ju Bai , "alim.akhtar@samsung.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "tomas.winkler@intel.com" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] scsi: ufs: fix error return code of ufshcd_populate_vreg() Thread-Topic: [PATCH] scsi: ufs: fix error return code of ufshcd_populate_vreg() Thread-Index: AQHXEZwvRopTDhfxZkyg2no8INMi66p4FQYw Date: Sun, 7 Mar 2021 06:41:07 +0000 Message-ID: References: <20210305084718.12108-1-baijiaju1990@gmail.com> In-Reply-To: <20210305084718.12108-1-baijiaju1990@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=wdc.com; x-originating-ip: [212.25.79.133] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 29bb0073-71a5-4380-1c46-08d8e133fce1 x-ms-traffictypediagnostic: DM6PR04MB6576: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:378; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kvPoUUcUepQDj4Edx/EyaZ92zclu//2Z21eGtjcHhyLCHWmPxLRuzwVM4gugSVD4bXp7jmfXihfNMFjCDdJKJpUY5v5ELJ9cfAZkQ/SbAsIVemUKBJpy2Ja5us3jKemCnfVrT/mNILi0NkomOCzcM0853h3/Jb6GJJcejLx/lRsOHCsUD6RAQOI0CYTe1LKCM7s7yfG61wk2HKxWc8P8vHQFl2xuR+O4K14hcFo2VFm7P83cEEy1jGGeIc8+9bORAu/4FlRRKtvndqNgDnrzN0wYWqG+XjaTAwDOXwC4aA9rzGdoBL5UC0B+Mu3pd357Ao536g/rPZes7ALCE/Ee3zbuaPk97rEX4Eh5AaSC5K3kvUz93CbLj9niOQbHWFiboefXe8Auj6LPjq/r4Rj0IP5Qr/CO4jYuC/qzuo3GpwZFcyK1exr1WGWfNpiw2vwfgS/3awByOgGVijgiDB45wCX77H6CThbhJj6tqWOa611WQQDOaH+Wzn3iu0SBpu77Q3/eqvdNS8B514jet3k86A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR04MB6575.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(346002)(136003)(376002)(39850400004)(478600001)(8936002)(54906003)(66556008)(64756008)(4326008)(52536014)(76116006)(7696005)(66476007)(8676002)(5660300002)(71200400001)(316002)(66946007)(6506007)(66446008)(26005)(7416002)(2906002)(110136005)(55016002)(9686003)(33656002)(186003)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii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H36zsX55H?= =?us-ascii?Q?bEjlvucn1a8uLQaky/MjyLHWcT/V0wtsgndqHasTNwgmRXbEvh9p6I0IxKF0?= =?us-ascii?Q?FGtdWplYJXB8tHg353kbkUmEsidvdkqd0ieiHwdpX0torbH4w1KSBeqJIzOy?= =?us-ascii?Q?oMB/A3VFyp0JGEYa0wgNAUdUH9xJWmsHbve8dQpePEp1959N33T1O6gmFNbw?= =?us-ascii?Q?fe8YEWMWNQ4pQt6dVI7eyJf6aSaXwLGRWP0lRITbLnTnOtM0RSNLHMVlHxZs?= =?us-ascii?Q?gWxSmRPafen4JRB6BaRiy95dczjS51yUIP48RDaIoTreQfBi0pf1B5tS+hsW?= =?us-ascii?Q?Pmo3nx4yG4nmgvypk3/B8V9NvhEjD8SUJVbSkoF3a1THsXPiKU+vHbVi7VuK?= =?us-ascii?Q?nKefdlylUqgwUZIQcyMaBVxja5jspR9pxsk/QgQ5saayEl9+GVYQz2JeZFuK?= =?us-ascii?Q?XDPSmrLiwc81fHDYcmLKecFu?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6575.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29bb0073-71a5-4380-1c46-08d8e133fce1 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2021 06:41:07.3485 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RdlG6+/CSQ36f5jKvkkjE8L8gCnf+Zaj0ybsO8r5Psr+o6v22q4HR0WJdm+AOyTZn5jVv1BY69r50A9RhqILsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6576 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 > When np is NULL or of_parse_phandle() returns NULL, no error return code > of ufshcd_populate_vreg() is assigned. > To fix this bug, ret is assigned with -EINVAL or -ENOENT as error return > code. This changes the flow of ufshcd_parse_regulator_info so you need to: a) get a tested-by tag and indicate which platform & devices you used, and b) explain further why ufshcd_parse_regulator_info doesn't no longer allow some of the regulators not to be set via DT, which is the current stat= e. Thanks, Avri >=20 > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai > --- > drivers/scsi/ufs/ufshcd-pltfrm.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-p= ltfrm.c > index 1a69949a4ea1..9f11c416a919 100644 > --- a/drivers/scsi/ufs/ufshcd-pltfrm.c > +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c > @@ -113,6 +113,7 @@ static int ufshcd_populate_vreg(struct device *dev, > const char *name, >=20 > if (!np) { > dev_err(dev, "%s: non DT initialization\n", __func__); > + ret =3D -EINVAL; > goto out; > } >=20 > @@ -120,6 +121,7 @@ static int ufshcd_populate_vreg(struct device *dev, > const char *name, > if (!of_parse_phandle(np, prop_name, 0)) { > dev_info(dev, "%s: Unable to find %s regulator, assuming = enabled\n", > __func__, prop_name); > + ret =3D -ENOENT; > goto out; > } >=20 > -- > 2.17.1