Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1677201imm; Thu, 18 Oct 2018 02:14:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV612qVrx5hpr4C814css+YuQU43VcEIl1AWPDxyTRcBoyI+ZZgMZpVDkDZba5z4jC7a4NOrA X-Received: by 2002:a17:902:8205:: with SMTP id x5-v6mr29581256pln.55.1539854059857; Thu, 18 Oct 2018 02:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539854059; cv=none; d=google.com; s=arc-20160816; b=Qm7J0rOpvtGILNG2hxb5Q5twI0mJ/DoKEywHFhQz77G9Hnxg3eYRSZiq8CX0GrYzps oYDr1p/DtJOPTkCQfMqJ5M9CsEG3qkQMFQPqxphwh8AvsGgsiiyvnPFzIeymT5btSXcy KcrGPQE10t4r5fOSigZfhuo5Uqc4NTVAon3k7mq2aopnUTzLQhqQJlNBCzFX6RqkAtYO FVGl/r4ftujlrTyVZQoiY8Gw9vYZTdK67wwFVxd0ybn8Xw0f6yyw7zqxEDcQb1yKJbB7 furlw0KxvJzGHytXRHv/yOYojxQ+livgutZdrkjddO3VYzr6jDWeEoawTQXdJgMPZWox RmAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from; bh=VTM24+YOYQkXNSIxC8vU9rSbW7QLh5gVDQDK+5C5SSY=; b=dI3Q0L4G8TUQ1KlHrTynYvlULIDquUbHmF7skt8Y6jdKsgZz4Cb4bMH7tsPA4radmT HTHYkJ7SRNIX4AsfO2iZO2WNxJRVoTGFQ6MMAKLu5VAil9kqnc7+hJXKZKyn1Mi5Bj2K hx9VOk5Lc8NrNbpU5JSsUp9e3RpF+vCbNPXxjRpy6CdBongfYRj8Fbge8QCtm6C4SmSI P3TCn452528SoNdNXpb7A42PwHWuQfCKo/Lp8JM3dU3mxEvcfIwLl/gady86hwiqSeFZ 8/r9DCOIzUV2WXyDymWxFUvnorevNARBUluk+uNYwDBsnReTAz4+oh82sVm46re94eqY Z2nQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 187-v6si22051286pfe.182.2018.10.18.02.14.04; Thu, 18 Oct 2018 02:14:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727820AbeJRRML convert rfc822-to-8bit (ORCPT + 99 others); Thu, 18 Oct 2018 13:12:11 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:55260 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727363AbeJRRML (ORCPT ); Thu, 18 Oct 2018 13:12:11 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w9I948CV013925; Thu, 18 Oct 2018 11:12:02 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2n36ftqmmn-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 18 Oct 2018 11:12:02 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AC21631; Thu, 18 Oct 2018 09:12:01 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 96B2327A8; Thu, 18 Oct 2018 09:12:01 +0000 (GMT) Received: from SFHDAG6NODE2.st.com (10.75.127.17) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 18 Oct 2018 11:12:01 +0200 Received: from SFHDAG6NODE2.st.com ([fe80::a56f:c186:bab7:13d6]) by SFHDAG6NODE2.st.com ([fe80::a56f:c186:bab7:13d6%20]) with mapi id 15.00.1347.000; Thu, 18 Oct 2018 11:12:01 +0200 From: Pascal PAILLET-LME To: Axel Lin , Mark Brown CC: Liam Girdwood , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode Thread-Topic: [PATCH] regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode Thread-Index: AQHUZsKglb6iNfmbm0OveLleAMTNsQ== Date: Thu, 18 Oct 2018 09:12:01 +0000 Message-ID: <5BC84E60.60501@st.com> References: <20181009085221.31137-1-axel.lin@ingics.com> In-Reply-To: <20181009085221.31137-1-axel.lin@ingics.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.50] Content-Type: text/plain; charset="Windows-1252" Content-ID: <0C62042A1A4854479F3D64C9621DD794@st.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-17_15:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Axel, Thank you for your comment. As the driver is merged, I will make the change in a future patch-set. Best regards, Pascal. Le 10/09/2018 10:52 AM, Axel Lin a ?crit : > -EINVAL is not a valid return value for .of_map_mode, return > REGULATOR_MODE_INVALID instead. > > Signed-off-by: Axel Lin > --- > drivers/regulator/stpmic1_regulator.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c > index 96f18083a3b6..e15634edb8ce 100644 > --- a/drivers/regulator/stpmic1_regulator.c > +++ b/drivers/regulator/stpmic1_regulator.c > @@ -441,7 +441,7 @@ static unsigned int stpmic1_map_mode(unsigned int mode) > case STPMIC1_BUCK_MODE_LP: > return REGULATOR_MODE_STANDBY; > default: > - return -EINVAL; > + return REGULATOR_MODE_INVALID; > } > } >