2020-10-15 10:47:58

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warnings after merge of the kunit-next tree

Hi all,

After merging the kunit-next tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

lib/bitfield_kunit.c: In function 'test_bitfields_compile':
lib/bitfield_kunit.c:136:21: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '393216' to '0' [-Woverflow]
136 | u16_encode_bits(0, 0x60000);
| ^~~~~~~
At top level:
lib/bitfield_kunit.c:129:20: warning: 'test_bitfields_compile' defined but not used [-Wunused-function]
129 | static void __init test_bitfields_compile(struct kunit *context)
| ^~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-10-15 12:04:28

by Vitor Massaru Iha

[permalink] [raw]
Subject: Re: linux-next: build warnings after merge of the kunit-next tree

Hi Stephen,

On Thu, Oct 15, 2020 at 2:31 AM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the kunit-next tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> lib/bitfield_kunit.c: In function 'test_bitfields_compile':
> lib/bitfield_kunit.c:136:21: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '393216' to '0' [-Woverflow]
> 136 | u16_encode_bits(0, 0x60000);
> | ^~~~~~~
> At top level:
> lib/bitfield_kunit.c:129:20: warning: 'test_bitfields_compile' defined but not used [-Wunused-function]
> 129 | static void __init test_bitfields_compile(struct kunit *context)
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> Introduced by commit
>
> d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")

I saw the problem, I will send the patch.

Thanks!

2020-10-15 18:04:10

by Shuah Khan

[permalink] [raw]
Subject: Re: linux-next: build warnings after merge of the kunit-next tree

On 10/15/20 4:43 AM, Vitor Massaru Iha wrote:
> Hi Stephen,
>
> On Thu, Oct 15, 2020 at 2:31 AM Stephen Rothwell <[email protected]> wrote:
>>
>> Hi all,
>>
>> After merging the kunit-next tree, today's linux-next build (x86_64
>> allmodconfig) produced this warning:
>>
>> lib/bitfield_kunit.c: In function 'test_bitfields_compile':
>> lib/bitfield_kunit.c:136:21: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '393216' to '0' [-Woverflow]
>> 136 | u16_encode_bits(0, 0x60000);
>> | ^~~~~~~
>> At top level:
>> lib/bitfield_kunit.c:129:20: warning: 'test_bitfields_compile' defined but not used [-Wunused-function]
>> 129 | static void __init test_bitfields_compile(struct kunit *context)
>> | ^~~~~~~~~~~~~~~~~~~~~~
>>
>> Introduced by commit
>>
>> d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")
>
> I saw the problem, I will send the patch.
>

Please send the fix in as soon as possible. I will go ahead and send the
pull request and will apply the fix in rc2.

thanks,
-- Shuah

2020-10-15 21:45:27

by Vitor Massaru Iha

[permalink] [raw]
Subject: Re: linux-next: build warnings after merge of the kunit-next tree

Hi Shuah,


I already sent the patch:
https://patchwork.kernel.org/project/linux-kselftest/patch/[email protected]

On Thu, Oct 15, 2020 at 3:01 PM Shuah Khan <[email protected]> wrote:
>
> On 10/15/20 4:43 AM, Vitor Massaru Iha wrote:
> > Hi Stephen,
> >
> > On Thu, Oct 15, 2020 at 2:31 AM Stephen Rothwell <[email protected]> wrote:
> >>
> >> Hi all,
> >>
> >> After merging the kunit-next tree, today's linux-next build (x86_64
> >> allmodconfig) produced this warning:
> >>
> >> lib/bitfield_kunit.c: In function 'test_bitfields_compile':
> >> lib/bitfield_kunit.c:136:21: warning: unsigned conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '393216' to '0' [-Woverflow]
> >> 136 | u16_encode_bits(0, 0x60000);
> >> | ^~~~~~~
> >> At top level:
> >> lib/bitfield_kunit.c:129:20: warning: 'test_bitfields_compile' defined but not used [-Wunused-function]
> >> 129 | static void __init test_bitfields_compile(struct kunit *context)
> >> | ^~~~~~~~~~~~~~~~~~~~~~
> >>
> >> Introduced by commit
> >>
> >> d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")
> >
> > I saw the problem, I will send the patch.
> >
>
> Please send the fix in as soon as possible. I will go ahead and send the
> pull request and will apply the fix in rc2.
>
> thanks,
> -- Shuah
>