From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH v2 3/7] ACPI / processor: Introduce invalid_logical_cpuid() Date: Tue, 05 May 2015 21:15:54 +0800 Message-ID: <5548C28A.5040509@linaro.org> References: <1430793998-21631-1-git-send-email-hanjun.guo@linaro.org> <1430793998-21631-4-git-send-email-hanjun.guo@linaro.org> <5548A641.6050407@arm.com> <3818196.qc8c4isrQe@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-pa0-f50.google.com ([209.85.220.50]:36737 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422947AbbEENQD (ORCPT ); Tue, 5 May 2015 09:16:03 -0400 Received: by pabsx10 with SMTP id sx10so192839608pab.3 for ; Tue, 05 May 2015 06:16:02 -0700 (PDT) In-Reply-To: <3818196.qc8c4isrQe@vostro.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" , Sudeep Holla Cc: Will Deacon , Catalin Marinas , Boris Ostrovsky , Stefano Stabellini , Lorenzo Pieralisi , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" On 2015=E5=B9=B405=E6=9C=8805=E6=97=A5 20:04, Rafael J. Wysocki wrote: > On Tuesday, May 05, 2015 12:15:13 PM Sudeep Holla wrote: >> >> On 05/05/15 03:46, Hanjun Guo wrote: >>> In ACPI processor drivers, we use direct comparisons of cpu logical >>> id with -1 which are error prone in case logical cpuid is accidenta= lly >>> assinged an error code and prevents us from returning an error-enco= ding >>> cpuid directly in some cases. >>> >>> So introduce invalid_logical_cpuid() to identify cpu with invalid >>> logical cpu num, then it will be used to replace the direct compari= sons >>> with -1. >>> >> >> Ah, OK I see that this fixes the issue I raised in PATCH 1/7, so I t= hink >> you need to reorder this and 1/7 patch IMO. > > Well, comparing an unsigned int with -1 is not technically invalid (a= lthough it > involves an implicit type conversion), but yes, Hanjun, please reorde= r the > patches. Sure, I will. Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423236AbbEENQI (ORCPT ); Tue, 5 May 2015 09:16:08 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33758 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422917AbbEENQD (ORCPT ); Tue, 5 May 2015 09:16:03 -0400 Message-ID: <5548C28A.5040509@linaro.org> Date: Tue, 05 May 2015 21:15:54 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Rafael J. Wysocki" , Sudeep Holla CC: Will Deacon , Catalin Marinas , Boris Ostrovsky , Stefano Stabellini , Lorenzo Pieralisi , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" Subject: Re: [PATCH v2 3/7] ACPI / processor: Introduce invalid_logical_cpuid() References: <1430793998-21631-1-git-send-email-hanjun.guo@linaro.org> <1430793998-21631-4-git-send-email-hanjun.guo@linaro.org> <5548A641.6050407@arm.com> <3818196.qc8c4isrQe@vostro.rjw.lan> In-Reply-To: <3818196.qc8c4isrQe@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015年05月05日 20:04, Rafael J. Wysocki wrote: > On Tuesday, May 05, 2015 12:15:13 PM Sudeep Holla wrote: >> >> On 05/05/15 03:46, Hanjun Guo wrote: >>> In ACPI processor drivers, we use direct comparisons of cpu logical >>> id with -1 which are error prone in case logical cpuid is accidentally >>> assinged an error code and prevents us from returning an error-encoding >>> cpuid directly in some cases. >>> >>> So introduce invalid_logical_cpuid() to identify cpu with invalid >>> logical cpu num, then it will be used to replace the direct comparisons >>> with -1. >>> >> >> Ah, OK I see that this fixes the issue I raised in PATCH 1/7, so I think >> you need to reorder this and 1/7 patch IMO. > > Well, comparing an unsigned int with -1 is not technically invalid (although it > involves an implicit type conversion), but yes, Hanjun, please reorder the > patches. Sure, I will. Thanks Hanjun