From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbdGULPH (ORCPT ); Fri, 21 Jul 2017 07:15:07 -0400 Received: from mx.socionext.com ([202.248.49.38]:7713 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbdGULPF (ORCPT ); Fri, 21 Jul 2017 07:15:05 -0400 Date: Fri, 21 Jul 2017 20:15:03 +0900 From: Kunihiko Hayashi To: Masahiro Yamada Subject: Re: [PATCH v4 2/2] thermal: uniphier: add UniPhier thermal driver Cc: rui.zhang@intel.com, Eduardo Valentin , linux-pm@vger.kernel.org, linux-arm-kernel , Linux Kernel Mailing List , Rob Herring , Mark Rutland , Masami Hiramatsu , Jassi Brar In-Reply-To: References: Message-Id: <20170721201503.BC76.4A936039@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.70 [ja] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Jul 2017 02:09:18 +0900 wrote: > 2017-07-21 1:53 GMT+09:00 Masahiro Yamada : > > 2017-07-21 1:08 GMT+09:00 Masahiro Yamada : > >> 2017-07-07 10:54 GMT+09:00 Kunihiko Hayashi : > >>> 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 > >> > >> > >> 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) Thanks for your pointing out. I'll fix it next. Best Regards, Kunihiko Hayashi