public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hanjun Guo <hanjun.guo@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Sudeep Holla <sudeep.holla@arm.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/3] ACPI / processor: remove incorrect comparison of phys_id
Date: Fri, 13 Feb 2015 15:56:50 +0800	[thread overview]
Message-ID: <54DDAE42.3080104@linaro.org> (raw)
In-Reply-To: <25335106.4A2H4B9kq8@vostro.rjw.lan>

On 2014年11月29日 07:26, Rafael J. Wysocki wrote:
> On Friday, November 28, 2014 07:05:09 PM Sudeep Holla wrote:
>> Hi Rafael,
>>
>> On 26/11/14 22:26, Rafael J. Wysocki wrote:
>>> On Wednesday, November 26, 2014 10:33:04 AM Sudeep Holla wrote:
>>>> Hi Hanjun,
>>>>
>>>> On 26/11/14 09:53, Hanjun Guo wrote:
>>>>> Hi Sudeep,
>>>>>
>>>>> On 2014-11-25 22:48, Sudeep Holla wrote:
>>
>> [...]
>>
>>>>>>
>>>>>> This patch removes that incorrect comparision in
>>>>>> acpi_processor_hotadd_init as the lone user of this function is
>>>>>> already checking for correctness of phys_id before calling it.
>>>>>
>>>>> if (apic_id < 0) acpi_handle_debug(pr->handle, "failed to get CPU
>>>>> APIC ID.\n");
>>>>>
>>>>> it only check the value and print debug message but no returns, so I
>>>>> think the check in the following patch is still needed.
>>>>>
>>>>
>>>> Agreed, but that's something we need to fix in the logic and not by
>>>> changing these identifiers to signed values in the structures.
>>>
>>> I'd rather not change data structures just because of what one funtion returns.
>>>
>>> Instead, I'd do something like
>>>
>>> 	#define CPU_PHYS_ID_INVALID	(u32)(-1)
>>>
>>> change the function in question to return CPU_PHYS_ID_INVALID instead of -1
>>> and change the check to
>>>
>>> 	if (phys_id == CPU_PHYS_ID_INVALID)
>>> 		...
>>>
>>
>> Do I need to rebase this on top of Hanjun's cleanups to convert apic_id
>> to phys_id ? Since the variable is getting renamed it will conflict.
>
> Yes, it's better to rebase IMO.

Hi Sudeep, any updates for this patch? I'm working on introducing
typedef u32 phys_cpuid_t for x86 and ia64 for phys_id, and need
this CPU_PHYS_ID_INVALID macro, if you are not working on that, I
will restart the work to address the comments from Lorenzo and
Catalin [1].

[1]: https://lkml.org/lkml/2015/2/3/635

Thanks
Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-02-13  7:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 14:48 [PATCH 0/3] ACPI/processor: trivial fixes Sudeep Holla
2014-11-25 14:48 ` [PATCH 1/3] ACPI / processor: remove incorrect comparison of phys_id Sudeep Holla
2014-11-25 23:11   ` Rafael J. Wysocki
2014-11-26 12:23     ` Sudeep Holla
2014-11-26  9:53   ` Hanjun Guo
2014-11-26 10:33     ` Sudeep Holla
2014-11-26 22:26       ` Rafael J. Wysocki
2014-11-27  2:43         ` Hanjun Guo
2014-11-28 19:05         ` Sudeep Holla
2014-11-28 23:26           ` Rafael J. Wysocki
2015-02-13  7:56             ` Hanjun Guo [this message]
2015-02-16 10:08               ` Sudeep Holla
2015-02-17 15:01                 ` Hanjun Guo
2015-02-17 15:20                   ` Sudeep Holla
2014-11-25 14:48 ` [PATCH 2/3] ACPI / processor: remove unused variabled from acpi_processor_power structure Sudeep Holla
2014-11-25 14:48 ` [PATCH 3/3] ACPI / cpuidle: avoid assigning signed errno to acpi_status Sudeep Holla

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=54DDAE42.3080104@linaro.org \
    --to=hanjun.guo@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.com \
    /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