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]
Date:   Fri, 21 Jul 2017 01:53:00 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
Cc:     rui.zhang@...el.com, Eduardo Valentin <edubezval@...il.com>,
        linux-pm@...r.kernel.org,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Masami Hiramatsu <masami.hiramatsu@...aro.org>,
        Jassi Brar <jaswinder.singh@...aro.org>
Subject: Re: [PATCH v4 2/2] thermal: uniphier: add UniPhier thermal driver

2017-07-21 1:08 GMT+09:00 Masahiro Yamada <yamada.masahiro@...ionext.com>:
> 2017-07-07 10:54 GMT+09:00 Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>:
>> Add a thermal driver for on-chip PVT (Process, Voltage and Temperature)
>> monitoring unit implemented on UniPhier SoCs. This driver supports
>> temperature monitoring and alert function.
>>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
>
>
> Sparse reports several warnings.
>
>
>   CHECK   drivers/thermal/uniphier_thermal.c
> drivers/thermal/uniphier_thermal.c:276:52: warning: incorrect type in
> argument 1 (different base types)
> drivers/thermal/uniphier_thermal.c:276:52:    expected restricted
> __be32 const [usertype] *cell
> drivers/thermal/uniphier_thermal.c:276:52:    got unsigned int const
> [usertype] *[assigned] calib
> drivers/thermal/uniphier_thermal.c:277:58: warning: incorrect type in
> argument 1 (different base types)
> drivers/thermal/uniphier_thermal.c:277:58:    expected restricted
> __be32 const [usertype] *cell
> drivers/thermal/uniphier_thermal.c:277:58:    got unsigned int const
> [usertype] *
> drivers/thermal/uniphier_thermal.c:136:9: warning: cast truncates bits
> from constant value (fffffffff becomes ffffffff)
> drivers/thermal/uniphier_thermal.c:141:9: warning: cast truncates bits
> from constant value (7ffffffff becomes ffffffff)
> drivers/thermal/uniphier_thermal.c:153:9: warning: cast truncates bits
> from constant value (ffffffffff0001 becomes ffff0001)
> drivers/thermal/uniphier_thermal.c:170:9: warning: cast truncates bits
> from constant value (7ffffffffff becomes ffffffff)
> drivers/thermal/uniphier_thermal.c:185:9: warning: cast truncates bits
> from constant value (7ffffffffff becomes ffffffff)
>

Hmm.
The endian mismatch can be fixed by replacing u32 with __be32.

I can not get the truncates bits warnings.
Why sparse complains about this...



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ