From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
Leo Yan <leo.yan@linaro.org>, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Rajendra Nayak <rnayak@codeaurora.org>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
Sibi Sankar <sibis@codeaurora.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCHv3 1/1] coresight: Do not default to CPU0 for missing CPU phandle
Date: Thu, 27 Jun 2019 00:32:14 +0530 [thread overview]
Message-ID: <68fea180-c3a4-b7d9-09b6-1d3ddbc89f9d@codeaurora.org> (raw)
In-Reply-To: <CANLsYky6D5EsCL2vOa4hHaqTQRXbN+TT0pSzFrykDL_fHEkiBQ@mail.gmail.com>
Hi Mathieu,
On 6/26/2019 11:11 PM, Mathieu Poirier wrote:
> Hi Sai,
>
> On Sun, 23 Jun 2019 at 21:36, Sai Prakash Ranjan
> <saiprakash.ranjan@codeaurora.org> wrote:
>> diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c
>> index 3c5ceda8db24..4990da2c13e9 100644
>> --- a/drivers/hwtracing/coresight/coresight-platform.c
>> +++ b/drivers/hwtracing/coresight/coresight-platform.c
>> @@ -159,16 +159,16 @@ static int of_coresight_get_cpu(struct device *dev)
>> struct device_node *dn;
>>
>> if (!dev->of_node)
>> - return 0;
>> + return -ENODEV;
>> +
>> dn = of_parse_phandle(dev->of_node, "cpu", 0);
>> - /* Affinity defaults to CPU0 */
>> if (!dn)
>> - return 0;
>> + return -ENODEV;
>> +
>> cpu = of_cpu_node_to_id(dn);
>> of_node_put(dn);
>>
>> - /* Affinity to CPU0 if no cpu nodes are found */
>> - return (cpu < 0) ? 0 : cpu;
>> + return cpu;
>> }
>
> Function of_coresight_get_cpu() needs to return -ENODEV rather than 0
> when !CONFIG_OF
>
>>
>> /*
>> @@ -734,14 +734,14 @@ static int acpi_coresight_get_cpu(struct device *dev)
>> struct acpi_device *adev = ACPI_COMPANION(dev);
>>
>> if (!adev)
>> - return 0;
>> + return -ENODEV;
>> status = acpi_get_parent(adev->handle, &cpu_handle);
>> if (ACPI_FAILURE(status))
>> - return 0;
>> + return -ENODEV;
>>
>> cpu = acpi_handle_to_logical_cpuid(cpu_handle);
>> if (cpu >= nr_cpu_ids)
>> - return 0;
>> + return -ENODEV;
>> return cpu;
>> }
>>
>
> Same as above, but for !CONFIG_ACPI
>
Have fixed and resent, thanks Mathieu.
-Sai
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
prev parent reply other threads:[~2019-06-26 19:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 3:36 [PATCHv3 0/1] coresight: Do not default to CPU0 for missing CPU phandle Sai Prakash Ranjan
2019-06-24 3:36 ` [PATCHv3 1/1] " Sai Prakash Ranjan
2019-06-24 8:26 ` Suzuki K Poulose
2019-06-24 9:27 ` Sai Prakash Ranjan
2019-06-26 17:41 ` Mathieu Poirier
2019-06-26 19:02 ` Sai Prakash Ranjan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68fea180-c3a4-b7d9-09b6-1d3ddbc89f9d@codeaurora.org \
--to=saiprakash.ranjan@codeaurora.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andy.gross@linaro.org \
--cc=david.brown@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=sibis@codeaurora.org \
--cc=suzuki.poulose@arm.com \
--cc=vivek.gautam@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).