[{"id":1772715,"web_url":"http://patchwork.ozlabs.org/comment/1772715/","msgid":"<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>","list_archive_url":null,"date":"2017-09-21T11:21:24","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":66273,"url":"http://patchwork.ozlabs.org/api/people/66273/","name":"Jon Hunter","email":"jonathanh@nvidia.com"},"content":"On 07/09/17 10:31, Timo Alho wrote:\n> Check return code in BPMP response message(s). The typical error case\n> is when clock operation is attempted with invalid clock identifier.\n> \n> Also remove error print from call to clk_get_info() as the\n> implementation loops through range of all possible identifier, but the\n> operation is expected error out when the clock id is unused.\n> \n> Signed-off-by: Timo Alho <talho@nvidia.com>\n> ---\n>  drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n>  1 file changed, 10 insertions(+), 5 deletions(-)\n> \n> diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c\n> index 638ace6..a896692 100644\n> --- a/drivers/clk/tegra/clk-bpmp.c\n> +++ b/drivers/clk/tegra/clk-bpmp.c\n> @@ -55,6 +55,7 @@ struct tegra_bpmp_clk_message {\n>  \tstruct {\n>  \t\tvoid *data;\n>  \t\tsize_t size;\n> +\t\tint ret;\n>  \t} rx;\n>  };\n>  \n> @@ -64,6 +65,7 @@ static int tegra_bpmp_clk_transfer(struct tegra_bpmp *bpmp,\n>  \tstruct mrq_clk_request request;\n>  \tstruct tegra_bpmp_message msg;\n>  \tvoid *req = &request;\n> +\tint err;\n>  \n>  \tmemset(&request, 0, sizeof(request));\n>  \trequest.cmd_and_id = (clk->cmd << 24) | clk->id;\n> @@ -84,7 +86,13 @@ static int tegra_bpmp_clk_transfer(struct tegra_bpmp *bpmp,\n>  \tmsg.rx.data = clk->rx.data;\n>  \tmsg.rx.size = clk->rx.size;\n>  \n> -\treturn tegra_bpmp_transfer(bpmp, &msg);\n> +\terr = tegra_bpmp_transfer(bpmp, &msg);\n> +\tif (err < 0)\n> +\t\treturn err;\n> +\telse if (msg.rx.ret < 0)\n> +\t\treturn -EINVAL;\n\nI assume that the error codes returned do not correlated to the Linux\nerror codes here. Is that correct? If not we could just return the\nactual error code. Otherwise would it be useful to print a message with\nthe bpmp error code for debug?\n\n> +\n> +\treturn 0;\n>  }\n>  \n>  static int tegra_bpmp_clk_prepare(struct clk_hw *hw)\n> @@ -414,11 +422,8 @@ static int tegra_bpmp_probe_clocks(struct tegra_bpmp *bpmp,\n>  \t\tstruct tegra_bpmp_clk_info *info = &clocks[count];\n>  \n>  \t\terr = tegra_bpmp_clk_get_info(bpmp, id, info);\n> -\t\tif (err < 0) {\n> -\t\t\tdev_err(bpmp->dev, \"failed to query clock %u: %d\\n\",\n> -\t\t\t\tid, err);\n> +\t\tif (err < 0)\n>  \t\t\tcontinue;\n> -\t\t}\n>  \n>  \t\tif (info->num_parents >= U8_MAX) {\n>  \t\t\tdev_err(bpmp->dev,\n> \n\nCheers\nJon","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyZ4m30qkz9t3v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 21:24:08 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751678AbdIULXf (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 21 Sep 2017 07:23:35 -0400","from hqemgate14.nvidia.com ([216.228.121.143]:13310 \"EHLO\n\thqemgate14.nvidia.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751653AbdIULXd (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tThu, 21 Sep 2017 07:23:33 -0400","from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by\n\thqemgate14.nvidia.com\n\tid <B59c3a1130000>; Thu, 21 Sep 2017 04:23:04 -0700","from HQMAIL101.nvidia.com ([172.20.161.6])\n\tby hqpgpgate102.nvidia.com (PGP Universal service);\n\tThu, 21 Sep 2017 04:23:06 -0700","from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL101.nvidia.com\n\t(172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tThu, 21 Sep 2017 11:21:29 +0000","from [10.21.132.144] (10.21.132.144) by UKMAIL101.nvidia.com\n\t(10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tThu, 21 Sep 2017 11:21:26 +0000"],"X-PGP-Universal":"processed;\n\tby hqpgpgate102.nvidia.com on Thu, 21 Sep 2017 04:23:06 -0700","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","To":"Timo Alho <talho@nvidia.com>, <thierry.reding@gmail.com>","CC":"<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>","From":"Jon Hunter <jonathanh@nvidia.com>","Message-ID":"<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>","Date":"Thu, 21 Sep 2017 12:21:24 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>","X-Originating-IP":"[10.21.132.144]","X-ClientProxiedBy":"UKMAIL102.nvidia.com (10.26.138.15) To\n\tUKMAIL101.nvidia.com (10.26.138.13)","Content-Type":"text/plain; charset=\"utf-8\"","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}},{"id":1777551,"web_url":"http://patchwork.ozlabs.org/comment/1777551/","msgid":"<fc9729a7-53fb-f609-be6a-6454cc69548f@nvidia.com>","list_archive_url":null,"date":"2017-09-29T13:46:53","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":72177,"url":"http://patchwork.ozlabs.org/api/people/72177/","name":"Timo Alho","email":"talho@nvidia.com"},"content":"Hi Jon,\n\nOn 21.09.2017 14:21, Jonathan Hunter wrote:\n> \n> \n> On 07/09/17 10:31, Timo Alho wrote:\n>> Check return code in BPMP response message(s). The typical error case\n>> is when clock operation is attempted with invalid clock identifier.\n>>\n>> Also remove error print from call to clk_get_info() as the\n>> implementation loops through range of all possible identifier, but the\n>> operation is expected error out when the clock id is unused.\n>>\n>> Signed-off-by: Timo Alho <talho@nvidia.com>\n>> ---\n>>   drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n>>   1 file changed, 10 insertions(+), 5 deletions(-)\n>>\n>> diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c\n>> index 638ace6..a896692 100644\n>> --- a/drivers/clk/tegra/clk-bpmp.c\n>> +++ b/drivers/clk/tegra/clk-bpmp.c\n>> @@ -55,6 +55,7 @@ struct tegra_bpmp_clk_message {\n>>   \tstruct {\n>>   \t\tvoid *data;\n>>   \t\tsize_t size;\n>> +\t\tint ret;\n>>   \t} rx;\n>>   };\n>>   \n>> @@ -64,6 +65,7 @@ static int tegra_bpmp_clk_transfer(struct tegra_bpmp *bpmp,\n>>   \tstruct mrq_clk_request request;\n>>   \tstruct tegra_bpmp_message msg;\n>>   \tvoid *req = &request;\n>> +\tint err;\n>>   \n>>   \tmemset(&request, 0, sizeof(request));\n>>   \trequest.cmd_and_id = (clk->cmd << 24) | clk->id;\n>> @@ -84,7 +86,13 @@ static int tegra_bpmp_clk_transfer(struct tegra_bpmp *bpmp,\n>>   \tmsg.rx.data = clk->rx.data;\n>>   \tmsg.rx.size = clk->rx.size;\n>>   \n>> -\treturn tegra_bpmp_transfer(bpmp, &msg);\n>> +\terr = tegra_bpmp_transfer(bpmp, &msg);\n>> +\tif (err < 0)\n>> +\t\treturn err;\n>> +\telse if (msg.rx.ret < 0)\n>> +\t\treturn -EINVAL;\n> \n> I assume that the error codes returned do not correlated to the Linux\n> error codes here. Is that correct? If not we could just return the\n> actual error code. Otherwise would it be useful to print a message with\n> the bpmp error code for debug?\n\nThe error codes are not 1:1 match with Linux. Unfortunately, printing \nmessage for debug is not either viable as during clock probing we are \nexpecting many of the calls to return -BPMP_EINVAL to indicate that \nparticular clock ID is unused.\n\n-Timo\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-tegra\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y3XtD34jCz9t4g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 29 Sep 2017 23:47:16 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751813AbdI2NrP (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 29 Sep 2017 09:47:15 -0400","from hqemgate14.nvidia.com ([216.228.121.143]:16404 \"EHLO\n\thqemgate14.nvidia.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751456AbdI2NrO (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tFri, 29 Sep 2017 09:47:14 -0400","from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by\n\thqemgate14.nvidia.com\n\tid <B59ce4ecc0000>; Fri, 29 Sep 2017 06:46:52 -0700","from HQMAIL108.nvidia.com ([172.20.161.6])\n\tby hqpgpgate101.nvidia.com (PGP Universal service);\n\tFri, 29 Sep 2017 06:46:59 -0700","from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL108.nvidia.com\n\t(172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tFri, 29 Sep 2017 13:46:59 +0000","from [10.21.24.139] (10.21.24.139) by UKMAIL101.nvidia.com\n\t(10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tFri, 29 Sep 2017 13:46:55 +0000"],"X-PGP-Universal":"processed;\n\tby hqpgpgate101.nvidia.com on Fri, 29 Sep 2017 06:46:59 -0700","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","To":"Jonathan Hunter <jonathanh@nvidia.com>,\n\t\"thierry.reding@gmail.com\" <thierry.reding@gmail.com>","CC":"\"linux-tegra@vger.kernel.org\" <linux-tegra@vger.kernel.org>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>\n\t<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>","From":"Timo Alho <talho@nvidia.com>","X-Nvconfidentiality":"public","Message-ID":"<fc9729a7-53fb-f609-be6a-6454cc69548f@nvidia.com>","Date":"Fri, 29 Sep 2017 16:46:53 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>","X-Originating-IP":"[10.21.24.139]","X-ClientProxiedBy":"UKMAIL101.nvidia.com (10.26.138.13) To\n\tUKMAIL101.nvidia.com (10.26.138.13)","Content-Type":"text/plain; charset=\"utf-8\"; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}},{"id":1777587,"web_url":"http://patchwork.ozlabs.org/comment/1777587/","msgid":"<5dfbbc6d-0dc0-7d92-0bff-8b05ddd272b3@nvidia.com>","list_archive_url":null,"date":"2017-09-29T14:53:31","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":66273,"url":"http://patchwork.ozlabs.org/api/people/66273/","name":"Jon Hunter","email":"jonathanh@nvidia.com"},"content":"On 29/09/17 14:46, Timo Alho wrote:\n> Hi Jon,\n> \n> On 21.09.2017 14:21, Jonathan Hunter wrote:\n>>\n>>\n>> On 07/09/17 10:31, Timo Alho wrote:\n>>> Check return code in BPMP response message(s). The typical error case\n>>> is when clock operation is attempted with invalid clock identifier.\n>>>\n>>> Also remove error print from call to clk_get_info() as the\n>>> implementation loops through range of all possible identifier, but the\n>>> operation is expected error out when the clock id is unused.\n>>>\n>>> Signed-off-by: Timo Alho <talho@nvidia.com>\n>>> ---\n>>>   drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n>>>   1 file changed, 10 insertions(+), 5 deletions(-)\n>>>\n>>> diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c\n>>> index 638ace6..a896692 100644\n>>> --- a/drivers/clk/tegra/clk-bpmp.c\n>>> +++ b/drivers/clk/tegra/clk-bpmp.c\n>>> @@ -55,6 +55,7 @@ struct tegra_bpmp_clk_message {\n>>>       struct {\n>>>           void *data;\n>>>           size_t size;\n>>> +        int ret;\n>>>       } rx;\n>>>   };\n>>>   @@ -64,6 +65,7 @@ static int tegra_bpmp_clk_transfer(struct\n>>> tegra_bpmp *bpmp,\n>>>       struct mrq_clk_request request;\n>>>       struct tegra_bpmp_message msg;\n>>>       void *req = &request;\n>>> +    int err;\n>>>         memset(&request, 0, sizeof(request));\n>>>       request.cmd_and_id = (clk->cmd << 24) | clk->id;\n>>> @@ -84,7 +86,13 @@ static int tegra_bpmp_clk_transfer(struct\n>>> tegra_bpmp *bpmp,\n>>>       msg.rx.data = clk->rx.data;\n>>>       msg.rx.size = clk->rx.size;\n>>>   -    return tegra_bpmp_transfer(bpmp, &msg);\n>>> +    err = tegra_bpmp_transfer(bpmp, &msg);\n>>> +    if (err < 0)\n>>> +        return err;\n>>> +    else if (msg.rx.ret < 0)\n>>> +        return -EINVAL;\n>>\n>> I assume that the error codes returned do not correlated to the Linux\n>> error codes here. Is that correct? If not we could just return the\n>> actual error code. Otherwise would it be useful to print a message with\n>> the bpmp error code for debug?\n> \n> The error codes are not 1:1 match with Linux. Unfortunately, printing\n> message for debug is not either viable as during clock probing we are\n> expecting many of the calls to return -BPMP_EINVAL to indicate that\n> particular clock ID is unused.\n\nOK. Could it return other errors other than BPMP_EINVAL? I am just\nwondering if we need to differentiate between unused and an actual\nerror? Maybe that is not possible here?\n\nCheers\nJon","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y3ZPR0Vv7z9t4R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 30 Sep 2017 00:55:55 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752493AbdI2Ozq convert rfc822-to-8bit (ORCPT\n\t<rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 29 Sep 2017 10:55:46 -0400","from hqemgate15.nvidia.com ([216.228.121.64]:19215 \"EHLO\n\thqemgate15.nvidia.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752159AbdI2Ozi (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tFri, 29 Sep 2017 10:55:38 -0400","from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by\n\thqemgate15.nvidia.com\n\tid <B59ce5edc0001>; Fri, 29 Sep 2017 07:55:24 -0700","from HQMAIL108.nvidia.com ([172.20.161.6])\n\tby hqpgpgate102.nvidia.com (PGP Universal service);\n\tFri, 29 Sep 2017 07:55:27 -0700","from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL108.nvidia.com\n\t(172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tFri, 29 Sep 2017 14:53:36 +0000","from [10.21.132.144] (10.21.132.144) by UKMAIL101.nvidia.com\n\t(10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tFri, 29 Sep 2017 14:53:32 +0000"],"X-PGP-Universal":"processed;\n\tby hqpgpgate102.nvidia.com on Fri, 29 Sep 2017 07:55:27 -0700","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","To":"Timo Alho <talho@nvidia.com>,\n\t\"thierry.reding@gmail.com\" <thierry.reding@gmail.com>","CC":"\"linux-tegra@vger.kernel.org\" <linux-tegra@vger.kernel.org>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>\n\t<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>\n\t<fc9729a7-53fb-f609-be6a-6454cc69548f@nvidia.com>","From":"Jon Hunter <jonathanh@nvidia.com>","Message-ID":"<5dfbbc6d-0dc0-7d92-0bff-8b05ddd272b3@nvidia.com>","Date":"Fri, 29 Sep 2017 15:53:31 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<fc9729a7-53fb-f609-be6a-6454cc69548f@nvidia.com>","X-Originating-IP":"[10.21.132.144]","X-ClientProxiedBy":"UKMAIL101.nvidia.com (10.26.138.13) To\n\tUKMAIL101.nvidia.com (10.26.138.13)","Content-Type":"text/plain; charset=\"utf-8\"","Content-Language":"en-US","Content-Transfer-Encoding":"8BIT","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}},{"id":1778204,"web_url":"http://patchwork.ozlabs.org/comment/1778204/","msgid":"<8f0a0069-bbaf-51b2-b632-2d907c5f83d2@nvidia.com>","list_archive_url":null,"date":"2017-10-02T08:43:28","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":72177,"url":"http://patchwork.ozlabs.org/api/people/72177/","name":"Timo Alho","email":"talho@nvidia.com"},"content":"On 29.09.2017 17:53, Jonathan Hunter wrote:\n> \n> On 29/09/17 14:46, Timo Alho wrote:\n>> Hi Jon,\n>>\n>> On 21.09.2017 14:21, Jonathan Hunter wrote:\n>>>\n>>>\n>>> On 07/09/17 10:31, Timo Alho wrote:\n>>>> Check return code in BPMP response message(s). The typical error case\n>>>> is when clock operation is attempted with invalid clock identifier.\n>>>>\n>>>> Also remove error print from call to clk_get_info() as the\n>>>> implementation loops through range of all possible identifier, but the\n>>>> operation is expected error out when the clock id is unused.\n>>>>\n>>>> Signed-off-by: Timo Alho <talho@nvidia.com>\n>>>> ---\n>>>>    drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n>>>>    1 file changed, 10 insertions(+), 5 deletions(-)\n>>>>\n>>>> diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c\n>>>> index 638ace6..a896692 100644\n>>>> --- a/drivers/clk/tegra/clk-bpmp.c\n>>>> +++ b/drivers/clk/tegra/clk-bpmp.c\n>>>> @@ -55,6 +55,7 @@ struct tegra_bpmp_clk_message {\n>>>>        struct {\n>>>>            void *data;\n>>>>            size_t size;\n>>>> +        int ret;\n>>>>        } rx;\n>>>>    };\n>>>>    @@ -64,6 +65,7 @@ static int tegra_bpmp_clk_transfer(struct\n>>>> tegra_bpmp *bpmp,\n>>>>        struct mrq_clk_request request;\n>>>>        struct tegra_bpmp_message msg;\n>>>>        void *req = &request;\n>>>> +    int err;\n>>>>          memset(&request, 0, sizeof(request));\n>>>>        request.cmd_and_id = (clk->cmd << 24) | clk->id;\n>>>> @@ -84,7 +86,13 @@ static int tegra_bpmp_clk_transfer(struct\n>>>> tegra_bpmp *bpmp,\n>>>>        msg.rx.data = clk->rx.data;\n>>>>        msg.rx.size = clk->rx.size;\n>>>>    -    return tegra_bpmp_transfer(bpmp, &msg);\n>>>> +    err = tegra_bpmp_transfer(bpmp, &msg);\n>>>> +    if (err < 0)\n>>>> +        return err;\n>>>> +    else if (msg.rx.ret < 0)\n>>>> +        return -EINVAL;\n>>>\n>>> I assume that the error codes returned do not correlated to the Linux\n>>> error codes here. Is that correct? If not we could just return the\n>>> actual error code. Otherwise would it be useful to print a message with\n>>> the bpmp error code for debug?\n>>\n>> The error codes are not 1:1 match with Linux. Unfortunately, printing\n>> message for debug is not either viable as during clock probing we are\n>> expecting many of the calls to return -BPMP_EINVAL to indicate that\n>> particular clock ID is unused.\n> \n> OK. Could it return other errors other than BPMP_EINVAL? I am just\n> wondering if we need to differentiate between unused and an actual\n> error? Maybe that is not possible here?\n\nOther error codes are possible (though they are not explicitly \ndocumented in abi header). It's not easy to differentiate the error code \nat this level: -BPMP_EINVAL is \"expected\" condition with \nCMD_CLK_GET_ALL_INFO, whereas -BPMP_EINVAL is true error on other commands.\n\n\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-tegra\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y5G1F4VC9z9t3F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  2 Oct 2017 19:44:17 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750869AbdJBIoQ convert rfc822-to-8bit (ORCPT\n\t<rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 2 Oct 2017 04:44:16 -0400","from hqemgate15.nvidia.com ([216.228.121.64]:16401 \"EHLO\n\thqemgate15.nvidia.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750715AbdJBIoP (ORCPT\n\t<rfc822; linux-tegra@vger.kernel.org>); Mon, 2 Oct 2017 04:44:15 -0400","from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by\n\thqemgate15.nvidia.com\n\tid <B59d1fc3b0000>; Mon, 02 Oct 2017 01:43:43 -0700","from HQMAIL108.nvidia.com ([172.20.161.6])\n\tby hqpgpgate101.nvidia.com (PGP Universal service);\n\tMon, 02 Oct 2017 01:43:49 -0700","from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL108.nvidia.com\n\t(172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tMon, 2 Oct 2017 08:43:33 +0000","from [10.21.24.139] (10.21.24.139) by UKMAIL101.nvidia.com\n\t(10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tMon, 2 Oct 2017 08:43:30 +0000"],"X-PGP-Universal":"processed;\n\tby hqpgpgate101.nvidia.com on Mon, 02 Oct 2017 01:43:49 -0700","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","To":"Jonathan Hunter <jonathanh@nvidia.com>,\n\t\"thierry.reding@gmail.com\" <thierry.reding@gmail.com>","CC":"\"linux-tegra@vger.kernel.org\" <linux-tegra@vger.kernel.org>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>\n\t<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>\n\t<fc9729a7-53fb-f609-be6a-6454cc69548f@nvidia.com>\n\t<5dfbbc6d-0dc0-7d92-0bff-8b05ddd272b3@nvidia.com>","From":"Timo Alho <talho@nvidia.com>","X-Nvconfidentiality":"public","Message-ID":"<8f0a0069-bbaf-51b2-b632-2d907c5f83d2@nvidia.com>","Date":"Mon, 2 Oct 2017 11:43:28 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<5dfbbc6d-0dc0-7d92-0bff-8b05ddd272b3@nvidia.com>","X-Originating-IP":"[10.21.24.139]","X-ClientProxiedBy":"UKMAIL101.nvidia.com (10.26.138.13) To\n\tUKMAIL101.nvidia.com (10.26.138.13)","Content-Type":"text/plain; charset=\"utf-8\"; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8BIT","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}},{"id":1778580,"web_url":"http://patchwork.ozlabs.org/comment/1778580/","msgid":"<b11ae607-0734-592b-35ae-41a874a12af7@nvidia.com>","list_archive_url":null,"date":"2017-10-02T20:23:35","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":66273,"url":"http://patchwork.ozlabs.org/api/people/66273/","name":"Jon Hunter","email":"jonathanh@nvidia.com"},"content":"On 02/10/17 09:43, Timo Alho wrote:\n> \n> \n> On 29.09.2017 17:53, Jonathan Hunter wrote:\n>>\n>> On 29/09/17 14:46, Timo Alho wrote:\n>>> Hi Jon,\n>>>\n>>> On 21.09.2017 14:21, Jonathan Hunter wrote:\n>>>>\n>>>>\n>>>> On 07/09/17 10:31, Timo Alho wrote:\n>>>>> Check return code in BPMP response message(s). The typical error case\n>>>>> is when clock operation is attempted with invalid clock identifier.\n>>>>>\n>>>>> Also remove error print from call to clk_get_info() as the\n>>>>> implementation loops through range of all possible identifier, but the\n>>>>> operation is expected error out when the clock id is unused.\n>>>>>\n>>>>> Signed-off-by: Timo Alho <talho@nvidia.com>\n>>>>> ---\n>>>>>    drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n>>>>>    1 file changed, 10 insertions(+), 5 deletions(-)\n>>>>>\n>>>>> diff --git a/drivers/clk/tegra/clk-bpmp.c\n>>>>> b/drivers/clk/tegra/clk-bpmp.c\n>>>>> index 638ace6..a896692 100644\n>>>>> --- a/drivers/clk/tegra/clk-bpmp.c\n>>>>> +++ b/drivers/clk/tegra/clk-bpmp.c\n>>>>> @@ -55,6 +55,7 @@ struct tegra_bpmp_clk_message {\n>>>>>        struct {\n>>>>>            void *data;\n>>>>>            size_t size;\n>>>>> +        int ret;\n>>>>>        } rx;\n>>>>>    };\n>>>>>    @@ -64,6 +65,7 @@ static int tegra_bpmp_clk_transfer(struct\n>>>>> tegra_bpmp *bpmp,\n>>>>>        struct mrq_clk_request request;\n>>>>>        struct tegra_bpmp_message msg;\n>>>>>        void *req = &request;\n>>>>> +    int err;\n>>>>>          memset(&request, 0, sizeof(request));\n>>>>>        request.cmd_and_id = (clk->cmd << 24) | clk->id;\n>>>>> @@ -84,7 +86,13 @@ static int tegra_bpmp_clk_transfer(struct\n>>>>> tegra_bpmp *bpmp,\n>>>>>        msg.rx.data = clk->rx.data;\n>>>>>        msg.rx.size = clk->rx.size;\n>>>>>    -    return tegra_bpmp_transfer(bpmp, &msg);\n>>>>> +    err = tegra_bpmp_transfer(bpmp, &msg);\n>>>>> +    if (err < 0)\n>>>>> +        return err;\n>>>>> +    else if (msg.rx.ret < 0)\n>>>>> +        return -EINVAL;\n>>>>\n>>>> I assume that the error codes returned do not correlated to the Linux\n>>>> error codes here. Is that correct? If not we could just return the\n>>>> actual error code. Otherwise would it be useful to print a message with\n>>>> the bpmp error code for debug?\n>>>\n>>> The error codes are not 1:1 match with Linux. Unfortunately, printing\n>>> message for debug is not either viable as during clock probing we are\n>>> expecting many of the calls to return -BPMP_EINVAL to indicate that\n>>> particular clock ID is unused.\n>>\n>> OK. Could it return other errors other than BPMP_EINVAL? I am just\n>> wondering if we need to differentiate between unused and an actual\n>> error? Maybe that is not possible here?\n> \n> Other error codes are possible (though they are not explicitly\n> documented in abi header). It's not easy to differentiate the error code\n> at this level: -BPMP_EINVAL is \"expected\" condition with\n> CMD_CLK_GET_ALL_INFO, whereas -BPMP_EINVAL is true error on other commands.\n\nOK, thanks for clarifying.\n\nAcked-by: Jon Hunter <jonathanh@nvidia.com>\n\nCheers\nJon","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y5YZP51d2z9rxm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  3 Oct 2017 07:25:33 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751933AbdJBUZU convert rfc822-to-8bit (ORCPT\n\t<rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 2 Oct 2017 16:25:20 -0400","from hqemgate15.nvidia.com ([216.228.121.64]:16370 \"EHLO\n\thqemgate15.nvidia.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751891AbdJBUZR (ORCPT\n\t<rfc822; linux-tegra@vger.kernel.org>); Mon, 2 Oct 2017 16:25:17 -0400","from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by\n\thqemgate15.nvidia.com\n\tid <B59d2a09d0001>; Mon, 02 Oct 2017 13:25:04 -0700","from HQMAIL106.nvidia.com ([172.20.161.6])\n\tby hqpgpgate102.nvidia.com (PGP Universal service);\n\tMon, 02 Oct 2017 13:25:09 -0700","from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL106.nvidia.com\n\t(172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tMon, 2 Oct 2017 20:23:41 +0000","from [10.26.11.81] (10.26.11.81) by UKMAIL101.nvidia.com\n\t(10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1293.2;\n\tMon, 2 Oct 2017 20:23:37 +0000"],"X-PGP-Universal":"processed;\n\tby hqpgpgate102.nvidia.com on Mon, 02 Oct 2017 13:25:09 -0700","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","To":"Timo Alho <talho@nvidia.com>,\n\t\"thierry.reding@gmail.com\" <thierry.reding@gmail.com>","CC":"\"linux-tegra@vger.kernel.org\" <linux-tegra@vger.kernel.org>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>\n\t<388e07bc-b7b4-cc17-026a-bd08d77942ca@nvidia.com>\n\t<fc9729a7-53fb-f609-be6a-6454cc69548f@nvidia.com>\n\t<5dfbbc6d-0dc0-7d92-0bff-8b05ddd272b3@nvidia.com>\n\t<8f0a0069-bbaf-51b2-b632-2d907c5f83d2@nvidia.com>","From":"Jon Hunter <jonathanh@nvidia.com>","Message-ID":"<b11ae607-0734-592b-35ae-41a874a12af7@nvidia.com>","Date":"Mon, 2 Oct 2017 21:23:35 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<8f0a0069-bbaf-51b2-b632-2d907c5f83d2@nvidia.com>","X-Originating-IP":"[10.26.11.81]","X-ClientProxiedBy":"UKMAIL102.nvidia.com (10.26.138.15) To\n\tUKMAIL101.nvidia.com (10.26.138.13)","Content-Type":"text/plain; charset=\"utf-8\"","Content-Language":"en-US","Content-Transfer-Encoding":"8BIT","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}},{"id":1788222,"web_url":"http://patchwork.ozlabs.org/comment/1788222/","msgid":"<20171017103736.GA30589@ulmo>","list_archive_url":null,"date":"2017-10-17T10:37:36","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Thu, Sep 07, 2017 at 12:31:02PM +0300, Timo Alho wrote:\n> Check return code in BPMP response message(s). The typical error case\n> is when clock operation is attempted with invalid clock identifier.\n> \n> Also remove error print from call to clk_get_info() as the\n> implementation loops through range of all possible identifier, but the\n> operation is expected error out when the clock id is unused.\n> \n> Signed-off-by: Timo Alho <talho@nvidia.com>\n> ---\n>  drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n>  1 file changed, 10 insertions(+), 5 deletions(-)\n\nHi Mike, Stephen,\n\ndo you mind if I pick this up into the Tegra tree? It has a build\ndependency on patch 1/4.\n\nI only now realized that you guys weren't on Cc, hence quoting in\nfull.\n\nThierry\n\n> diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c\n> index 638ace6..a896692 100644\n> --- a/drivers/clk/tegra/clk-bpmp.c\n> +++ b/drivers/clk/tegra/clk-bpmp.c\n> @@ -55,6 +55,7 @@ struct tegra_bpmp_clk_message {\n>  \tstruct {\n>  \t\tvoid *data;\n>  \t\tsize_t size;\n> +\t\tint ret;\n>  \t} rx;\n>  };\n>  \n> @@ -64,6 +65,7 @@ static int tegra_bpmp_clk_transfer(struct tegra_bpmp *bpmp,\n>  \tstruct mrq_clk_request request;\n>  \tstruct tegra_bpmp_message msg;\n>  \tvoid *req = &request;\n> +\tint err;\n>  \n>  \tmemset(&request, 0, sizeof(request));\n>  \trequest.cmd_and_id = (clk->cmd << 24) | clk->id;\n> @@ -84,7 +86,13 @@ static int tegra_bpmp_clk_transfer(struct tegra_bpmp *bpmp,\n>  \tmsg.rx.data = clk->rx.data;\n>  \tmsg.rx.size = clk->rx.size;\n>  \n> -\treturn tegra_bpmp_transfer(bpmp, &msg);\n> +\terr = tegra_bpmp_transfer(bpmp, &msg);\n> +\tif (err < 0)\n> +\t\treturn err;\n> +\telse if (msg.rx.ret < 0)\n> +\t\treturn -EINVAL;\n> +\n> +\treturn 0;\n>  }\n>  \n>  static int tegra_bpmp_clk_prepare(struct clk_hw *hw)\n> @@ -414,11 +422,8 @@ static int tegra_bpmp_probe_clocks(struct tegra_bpmp *bpmp,\n>  \t\tstruct tegra_bpmp_clk_info *info = &clocks[count];\n>  \n>  \t\terr = tegra_bpmp_clk_get_info(bpmp, id, info);\n> -\t\tif (err < 0) {\n> -\t\t\tdev_err(bpmp->dev, \"failed to query clock %u: %d\\n\",\n> -\t\t\t\tid, err);\n> +\t\tif (err < 0)\n>  \t\t\tcontinue;\n> -\t\t}\n>  \n>  \t\tif (info->num_parents >= U8_MAX) {\n>  \t\t\tdev_err(bpmp->dev,\n> -- \n> 2.7.4\n>","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"u7gCeq9B\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yGWqT1PfRz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 17 Oct 2017 21:37:57 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1761088AbdJQKho (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 17 Oct 2017 06:37:44 -0400","from mail-qt0-f193.google.com ([209.85.216.193]:49954 \"EHLO\n\tmail-qt0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1761047AbdJQKhl (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tTue, 17 Oct 2017 06:37:41 -0400","by mail-qt0-f193.google.com with SMTP id k31so2408658qta.6;\n\tTue, 17 Oct 2017 03:37:40 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\tf30sm94387qta.73.2017.10.17.03.37.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 17 Oct 2017 03:37:39 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=cSIi8LwSHPW6LuE/otHhrPzyz4i44ML4zl4vZe2o5nw=;\n\tb=u7gCeq9BFrVcE0eRTWuNaBDlqW9WGNvVh7/kUCPHJNVa9lz99n48NZ4I5CVwBOho5I\n\ts8pxACH97AarK2PxiEPHutEft+D3td8wi05wKC5b4YT3/Acqk+WKrKZRcoZfFIZrM7W5\n\tUYwN/hg/dXBBXM22bC2hp/gP5o+KuFZ9UTj0WQ+YDNxTXIso7sJDivLCqZ40Fr0FETc8\n\tSLXvlgkIU0RmTUOsmlEILpcLBx5yg+PgmARyJALDusuchDRUcMQ3kO2LF+Qon0+Il7A6\n\tI/qyHfakC9R7v9C6hVVk1YQDlc94Y7iw+nadN68S++THPSzdxn0bMqlg17MTybfXje7S\n\tewWw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=cSIi8LwSHPW6LuE/otHhrPzyz4i44ML4zl4vZe2o5nw=;\n\tb=WB/0NhEXaDcdVsG5CfT8FKhQX5FcYu/XVl2x3NEK6EGeHDAY38L8waIHExjg5irnED\n\tFS1GK2Hljv2LiW4gluVZyb44gJx/u/ILMqWX74B1b9smcFspiBTXAFcwWkT45/DpIL33\n\tt1fPb4fTkhNQRPOeBkkAvZf51ab0XytnnL2JfnRdgh1/tW/HGA3guHmNj5rsz3Q9eSUt\n\tweox1U8c9w6cLn/5Rwm+I9a1zLJgDgb2RVil2sQQGa2x8u0eEyzAwBZRyUxe8UuQUAbU\n\t7DPLvKMBxG6CVSiAa67ikF7mDJdIHzzI3AyW3Y+nwp8X93gDpa0ryRK7vgx8+ygg9NTI\n\te4YQ==","X-Gm-Message-State":"AMCzsaX03V8X1XkCSvDt2z/s9MKmfeLT4RbR2+M0xiqbBmC2REaqBcLC\n\tQgJiUqaVt8YEIIvzsbz5OFQ=","X-Google-Smtp-Source":"ABhQp+Q8LRlWPSEvReISGLtRUYMZRyd2mIOX5b7s4CDXmvM9RdqyyQO+u8rEygZ0jvcHCnON5C5DCw==","X-Received":"by 10.200.3.205 with SMTP id z13mr928238qtg.25.1508236660169;\n\tTue, 17 Oct 2017 03:37:40 -0700 (PDT)","Date":"Tue, 17 Oct 2017 12:37:36 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Michael Turquette <mturquette@baylibre.com>,\n\tStephen Boyd <sboyd@codeaurora.org>","Cc":"Timo Alho <talho@nvidia.com>, linux-clk@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","Message-ID":"<20171017103736.GA30589@ulmo>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"HlL+5n6rz5pIUxbD\"","Content-Disposition":"inline","In-Reply-To":"<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}},{"id":1791932,"web_url":"http://patchwork.ozlabs.org/comment/1791932/","msgid":"<20171021141038.GB15990@codeaurora.org>","list_archive_url":null,"date":"2017-10-21T14:10:38","subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","submitter":{"id":6071,"url":"http://patchwork.ozlabs.org/api/people/6071/","name":"Stephen Boyd","email":"sboyd@codeaurora.org"},"content":"On 10/17, Thierry Reding wrote:\n> On Thu, Sep 07, 2017 at 12:31:02PM +0300, Timo Alho wrote:\n> > Check return code in BPMP response message(s). The typical error case\n> > is when clock operation is attempted with invalid clock identifier.\n> > \n> > Also remove error print from call to clk_get_info() as the\n> > implementation loops through range of all possible identifier, but the\n> > operation is expected error out when the clock id is unused.\n> > \n> > Signed-off-by: Timo Alho <talho@nvidia.com>\n> > ---\n> >  drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++-----\n> >  1 file changed, 10 insertions(+), 5 deletions(-)\n> \n> Hi Mike, Stephen,\n> \n> do you mind if I pick this up into the Tegra tree? It has a build\n> dependency on patch 1/4.\n> \n> I only now realized that you guys weren't on Cc, hence quoting in\n> full.\n> \n\nNo worries\n\nAcked-by: Stephen Boyd <sboyd@codeaurora.org>","headers":{"Return-Path":"<linux-tegra-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=codeaurora.org header.i=@codeaurora.org\n\theader.b=\"NaVho55Z\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n\theader.d=codeaurora.org header.i=@codeaurora.org\n\theader.b=\"D+UGxoiZ\"; dkim-atps=neutral","pdx-caf-mail.web.codeaurora.org;\n\tdmarc=none (p=none dis=none)\n\theader.from=codeaurora.org","pdx-caf-mail.web.codeaurora.org;\n\tspf=none smtp.mailfrom=sboyd@codeaurora.org"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yK4M74FRXz9t39\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 22 Oct 2017 01:10:43 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932089AbdJUOKm (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tSat, 21 Oct 2017 10:10:42 -0400","from smtp.codeaurora.org ([198.145.29.96]:56322 \"EHLO\n\tsmtp.codeaurora.org\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753362AbdJUOKl (ORCPT\n\t<rfc822;linux-tegra@vger.kernel.org>);\n\tSat, 21 Oct 2017 10:10:41 -0400","by smtp.codeaurora.org (Postfix, from userid 1000)\n\tid 9123A60262; Sat, 21 Oct 2017 14:10:40 +0000 (UTC)","from localhost (i-global254.qualcomm.com [199.106.103.254])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\t(Authenticated sender: sboyd@smtp.codeaurora.org)\n\tby smtp.codeaurora.org (Postfix) with ESMTPSA id AAA2860262;\n\tSat, 21 Oct 2017 14:10:39 +0000 (UTC)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org;\n\ts=default; t=1508595040;\n\tbh=7JjbVYLRMnKI0PvgQARQYXsho75RPS8y4vL82mhTosY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NaVho55ZF3+ZfhF9GitOLRkjKp16IijfBYp0NTEeNCGNY+xJyQYjW3V8ycaFz0/gF\n\tgnsc/vJdZ9eyt8XzvPVD48p5ZRLTRkfhybDtAGVsI7dOnImK9ynmd9dVqty7dfuCNO\n\twqwDsQyYu/ZDuCkP2iiaSEaVLIt4IIGOrqdANQmY=","v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org;\n\ts=default; t=1508595039;\n\tbh=7JjbVYLRMnKI0PvgQARQYXsho75RPS8y4vL82mhTosY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=D+UGxoiZjPQ8D0oFLWTn3bFuYI03i8u5mlAmGih+yxVhENYImG3Sslf6REU93ELRG\n\tfbLvIMwR2eu7hz0+vwr+qZrIUcqixXCZSa1xeRJv5oi4Euh+xfzaloCdEzlzQIxjsX\n\tVG40G4KfFHylfej0ba8MZKl8w3VckQwlFyJBCnUo="],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tpdx-caf-mail.web.codeaurora.org","X-Spam-Level":"","X-Spam-Status":"No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00,\n\tDKIM_SIGNED,\n\tT_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0","DMARC-Filter":"OpenDMARC Filter v1.3.2 smtp.codeaurora.org AAA2860262","Date":"Sat, 21 Oct 2017 07:10:38 -0700","From":"Stephen Boyd <sboyd@codeaurora.org>","To":"Thierry Reding <thierry.reding@gmail.com>","Cc":"Michael Turquette <mturquette@baylibre.com>,\n\tTimo Alho <talho@nvidia.com>, linux-clk@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"Re: [PATCH 2/4] clk: tegra: check BPMP response return code","Message-ID":"<20171021141038.GB15990@codeaurora.org>","References":"<cover.1504776489.git.talho@nvidia.com>\n\t<6a69e270519fd1c7a12a335053bf59671abc3c4b.1504776489.git.talho@nvidia.com>\n\t<20171017103736.GA30589@ulmo>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20171017103736.GA30589@ulmo>","User-Agent":"Mutt/1.5.21 (2010-09-15)","Sender":"linux-tegra-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-tegra.vger.kernel.org>","X-Mailing-List":"linux-tegra@vger.kernel.org"}}]