Re: [PATCH 2/2] MIPS: Remove a warning when PHYS_OFFSET is 0x0

2018-02-14 Thread James Hogan
On Wed, Feb 14, 2018 at 11:35:44AM +0100, Mathieu Malaterre wrote:
> On Tue, Jan 2, 2018 at 7:55 PM, Mathieu Malaterre  wrote:
> > Hi James,
> >
> > On Tue, Jan 2, 2018 at 10:31 AM, James Hogan  wrote:
> >> On Tue, Dec 26, 2017 at 12:37:14PM +0100, Mathieu Malaterre wrote:
> >>> Rewrite the comparison in `else if` statement, case where `min_low_pfn >
> >>> ARCH_PFN_OFFSET` has already been checked in the first `if` statement:
> >>>
> >>>   if (min_low_pfn > ARCH_PFN_OFFSET) {
> >>>
> >>> Fix non-fatal warning:
> >>>
> >>> arch/mips/kernel/setup.c: In function ‘bootmem_init’:
> >>> arch/mips/kernel/setup.c:461:25: warning: comparison of unsigned 
> >>> expression < 0 is always false [-Wtype-limits]
> >>>   } else if (min_low_pfn < ARCH_PFN_OFFSET) {
> >>>  ^
> >>
> >> What compiler version is that with out of interest? It isn't exactly new
> >> code.
> >
> > I've clarified in v2, that this happen during compilation using W=1
> >
> > For reference:
> >
> > $ mipsel-linux-gnu-gcc -dumpversion
> > 6.3.0
> >
> >
> >>>
> >>> Signed-off-by: Mathieu Malaterre 
> >>
> >> Reviewed-by: James Hogan 
> >
> > Thanks !
> 
> ping ?
> 
> https://patchwork.linux-mips.org/project/linux-mips/list/?series=623

Yep, both applied for 4.17.

Thanks
James


signature.asc
Description: Digital signature


Re: [PATCH 2/2] MIPS: Remove a warning when PHYS_OFFSET is 0x0

2018-02-14 Thread Mathieu Malaterre
On Tue, Jan 2, 2018 at 7:55 PM, Mathieu Malaterre  wrote:
> Hi James,
>
> On Tue, Jan 2, 2018 at 10:31 AM, James Hogan  wrote:
>> On Tue, Dec 26, 2017 at 12:37:14PM +0100, Mathieu Malaterre wrote:
>>> Rewrite the comparison in `else if` statement, case where `min_low_pfn >
>>> ARCH_PFN_OFFSET` has already been checked in the first `if` statement:
>>>
>>>   if (min_low_pfn > ARCH_PFN_OFFSET) {
>>>
>>> Fix non-fatal warning:
>>>
>>> arch/mips/kernel/setup.c: In function ‘bootmem_init’:
>>> arch/mips/kernel/setup.c:461:25: warning: comparison of unsigned expression 
>>> < 0 is always false [-Wtype-limits]
>>>   } else if (min_low_pfn < ARCH_PFN_OFFSET) {
>>>  ^
>>
>> What compiler version is that with out of interest? It isn't exactly new
>> code.
>
> I've clarified in v2, that this happen during compilation using W=1
>
> For reference:
>
> $ mipsel-linux-gnu-gcc -dumpversion
> 6.3.0
>
>
>>>
>>> Signed-off-by: Mathieu Malaterre 
>>
>> Reviewed-by: James Hogan 
>
> Thanks !

ping ?

https://patchwork.linux-mips.org/project/linux-mips/list/?series=623


Re: [PATCH 2/2] MIPS: Remove a warning when PHYS_OFFSET is 0x0

2018-01-02 Thread Mathieu Malaterre
Hi James,

On Tue, Jan 2, 2018 at 10:31 AM, James Hogan  wrote:
> On Tue, Dec 26, 2017 at 12:37:14PM +0100, Mathieu Malaterre wrote:
>> Rewrite the comparison in `else if` statement, case where `min_low_pfn >
>> ARCH_PFN_OFFSET` has already been checked in the first `if` statement:
>>
>>   if (min_low_pfn > ARCH_PFN_OFFSET) {
>>
>> Fix non-fatal warning:
>>
>> arch/mips/kernel/setup.c: In function ‘bootmem_init’:
>> arch/mips/kernel/setup.c:461:25: warning: comparison of unsigned expression 
>> < 0 is always false [-Wtype-limits]
>>   } else if (min_low_pfn < ARCH_PFN_OFFSET) {
>>  ^
>
> What compiler version is that with out of interest? It isn't exactly new
> code.

I've clarified in v2, that this happen during compilation using W=1

For reference:

$ mipsel-linux-gnu-gcc -dumpversion
6.3.0


>>
>> Signed-off-by: Mathieu Malaterre 
>
> Reviewed-by: James Hogan 

Thanks !


Re: [PATCH 2/2] MIPS: Remove a warning when PHYS_OFFSET is 0x0

2018-01-02 Thread James Hogan
On Tue, Dec 26, 2017 at 12:37:14PM +0100, Mathieu Malaterre wrote:
> Rewrite the comparison in `else if` statement, case where `min_low_pfn >
> ARCH_PFN_OFFSET` has already been checked in the first `if` statement:
> 
>   if (min_low_pfn > ARCH_PFN_OFFSET) {
> 
> Fix non-fatal warning:
> 
> arch/mips/kernel/setup.c: In function ‘bootmem_init’:
> arch/mips/kernel/setup.c:461:25: warning: comparison of unsigned expression < 
> 0 is always false [-Wtype-limits]
>   } else if (min_low_pfn < ARCH_PFN_OFFSET) {
>  ^

What compiler version is that with out of interest? It isn't exactly new
code.

> 
> Signed-off-by: Mathieu Malaterre 

Reviewed-by: James Hogan 

Cheers
James

> ---
>  arch/mips/kernel/setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index f19d61224c71..073695ccc1aa 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -458,7 +458,7 @@ static void __init bootmem_init(void)
>   pr_info("Wasting %lu bytes for tracking %lu unused pages\n",
>   (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page),
>   min_low_pfn - ARCH_PFN_OFFSET);
> - } else if (min_low_pfn < ARCH_PFN_OFFSET) {
> + } else if (ARCH_PFN_OFFSET - min_low_pfn > 0UL) {
>   pr_info("%lu free pages won't be used\n",
>   ARCH_PFN_OFFSET - min_low_pfn);
>   }
> -- 
> 2.11.0
> 


signature.asc
Description: Digital signature