All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: rui.zhang@intel.com, Eduardo Valentin <edubezval@gmail.com>,
	linux-pm@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Masami Hiramatsu <masami.hiramatsu@linaro.org>,
	Jassi Brar <jaswinder.singh@linaro.org>
Subject: Re: [PATCH v4 2/2] thermal: uniphier: add UniPhier thermal driver
Date: Fri, 21 Jul 2017 02:09:18 +0900	[thread overview]
Message-ID: <CAK7LNATDY4SdGHH1_K2GhFcsXMuG_9vGECWNtNfBJ_D=AO785w@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNATDxacQXyJr=4b7zaWkX1Y6S8DMHEkQxECvmETemfGRfA@mail.gmail.com>

2017-07-21 1:53 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 2017-07-21 1:08 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>> 2017-07-07 10:54 GMT+09:00 Kunihiko Hayashi <hayashi.kunihiko@socionext.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@socionext.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...

My bad - I was cross-compiling with ARCH=arm, so I think that's why.

I think the incorrect type should be fixed.  (u32 -> __be32)



-- 
Best Regards
Masahiro Yamada

WARNING: multiple messages have this Message-ID (diff)
From: yamada.masahiro@socionext.com (Masahiro Yamada)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/2] thermal: uniphier: add UniPhier thermal driver
Date: Fri, 21 Jul 2017 02:09:18 +0900	[thread overview]
Message-ID: <CAK7LNATDY4SdGHH1_K2GhFcsXMuG_9vGECWNtNfBJ_D=AO785w@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNATDxacQXyJr=4b7zaWkX1Y6S8DMHEkQxECvmETemfGRfA@mail.gmail.com>

2017-07-21 1:53 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 2017-07-21 1:08 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>> 2017-07-07 10:54 GMT+09:00 Kunihiko Hayashi <hayashi.kunihiko@socionext.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@socionext.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...

My bad - I was cross-compiling with ARCH=arm, so I think that's why.

I think the incorrect type should be fixed.  (u32 -> __be32)



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2017-07-20 17:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  1:54 [PATCH v4 0/2] add UniPhier thermal support Kunihiko Hayashi
2017-07-07  1:54 ` Kunihiko Hayashi
2017-07-07  1:54 ` [PATCH v4 1/2] dt-bindings: thermal: add binding documentation for UniPhier thermal monitor Kunihiko Hayashi
2017-07-07  1:54   ` Kunihiko Hayashi
2017-07-07  1:54 ` [PATCH v4 2/2] thermal: uniphier: add UniPhier thermal driver Kunihiko Hayashi
2017-07-07  1:54   ` Kunihiko Hayashi
2017-07-20 16:08   ` Masahiro Yamada
2017-07-20 16:08     ` Masahiro Yamada
2017-07-20 16:53     ` Masahiro Yamada
2017-07-20 16:53       ` Masahiro Yamada
2017-07-20 17:09       ` Masahiro Yamada [this message]
2017-07-20 17:09         ` Masahiro Yamada
2017-07-21 11:15         ` Kunihiko Hayashi
2017-07-21 11:15           ` Kunihiko Hayashi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNATDY4SdGHH1_K2GhFcsXMuG_9vGECWNtNfBJ_D=AO785w@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=edubezval@gmail.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masami.hiramatsu@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.