lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F94DB0.1000305@huawei.com>
Date:	Fri, 6 Mar 2015 14:48:16 +0800
From:	Hanjun Guo <guohanjun@...wei.com>
To:	"Rafael J. Wysocki" <rafael@...nel.org>
CC:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Hanjun Guo <hanjun.guo@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	"Will Deacon" <will.deacon@....com>,
	Olof Johansson <olof@...om.net>,
	Grant Likely <grant.likely@...aro.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Arnd Bergmann <arnd@...db.de>,
	Mark Rutland <mark.rutland@....com>,
	"Graeme Gregory" <graeme.gregory@...aro.org>,
	Sudeep Holla <Sudeep.Holla@....com>,
	"Jon Masters" <jcm@...hat.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Mark Brown <broonie@...nel.org>,
	Robert Richter <rric@...nel.org>,
	Timur Tabi <timur@...eaurora.org>,
	Ashwin Chaugule <ashwinc@...eaurora.org>,
	<suravee.suthikulpanit@....com>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linaro-acpi@...ts.linaro.org" <linaro-acpi@...ts.linaro.org>
Subject: Re: [PATCH v9 02/21] ACPI / processor: Introduce phys_cpuid_t for
 CPU hardware ID

On 2015/3/5 21:23, Rafael J. Wysocki wrote:
> On Thu, Mar 5, 2015 at 8:44 AM, Hanjun Guo <guohanjun@...wei.com> wrote:
>> On 2015/3/5 6:29, Rafael J. Wysocki wrote:
>>> On Wednesday, February 25, 2015 04:39:42 PM Hanjun Guo wrote:
> [cut]
>
>>>> @@ -190,7 +190,7 @@ int acpi_map_cpuid(int phys_id, u32 acpi_id)
>>>>              if (nr_cpu_ids <= 1 && acpi_id == 0)
>>>>                      return acpi_id;
>>>>              else
>>>> -                    return phys_id;
>>>> +                    return -1;
>>> Can we use a proper error code here?
>> I'm afraid not. In ACPI processor drivers, -1 will be deemed to
>> invalid cpu logical number, if we return error code here, we need
>> to modify multi places of "if (cpu_logical_num == -1)" to
> Oh, silly stuff.
>
>> "if (! (cpu_logical_num < 0))" too, so for me, I prefer to keep it as
>> -1, but I'm open for suggestions.
> OK
>
> I think we need something like invalid_logical_cpuid() and use it
> in all of those checks instead of the direct comparisons, but we
> can make those changes later.

OK, I recorded this as one of my TODO list, thanks for the suggestions.

Thanks
Hanjun

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ