linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_scmi: Use NULL instead of integer 0 for rate pointer
@ 2020-07-17 14:04 Sudeep Holla
  2020-07-17 14:07 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Sudeep Holla @ 2020-07-17 14:04 UTC (permalink / raw)
  To: linux-kernel, arm, soc; +Cc: Sudeep Holla, Arnd Bergmann

Kbuild test robot reports the following sparse warning:

drivers/firmware/arm_scmi/clock.c:142:21:
	sparse: Using plain integer as NULL pointer

Use NULL pointer instead of integer 0 for rate pointer and fix the
warning.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scmi/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Arnd,

Kbuild test robot reported this warning from the soc tree. Can you apply
this directly or do you prefer pull request. Let me know.

Regards,
Sudeep

diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c
index 6593ce87f420..75e39882746e 100644
--- a/drivers/firmware/arm_scmi/clock.c
+++ b/drivers/firmware/arm_scmi/clock.c
@@ -139,7 +139,7 @@ static int
 scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,
 			      struct scmi_clock_info *clk)
 {
-	u64 *rate = 0;
+	u64 *rate = NULL;
 	int ret, cnt;
 	bool rate_discrete = false;
 	u32 tot_rate_cnt = 0, rates_flag;
--
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] firmware: arm_scmi: Use NULL instead of integer 0 for rate pointer
  2020-07-17 14:04 [PATCH] firmware: arm_scmi: Use NULL instead of integer 0 for rate pointer Sudeep Holla
@ 2020-07-17 14:07 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2020-07-17 14:07 UTC (permalink / raw)
  To: Sudeep Holla; +Cc: linux-kernel, arm-soc, SoC Team

On Fri, Jul 17, 2020 at 4:04 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> Kbuild test robot reports the following sparse warning:
>
> drivers/firmware/arm_scmi/clock.c:142:21:
>         sparse: Using plain integer as NULL pointer
>
> Use NULL pointer instead of integer 0 for rate pointer and fix the
> warning.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/firmware/arm_scmi/clock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Hi Arnd,
>
> Kbuild test robot reported this warning from the soc tree. Can you apply
> this directly or do you prefer pull request. Let me know.

Applied, thanks!

      Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-17 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 14:04 [PATCH] firmware: arm_scmi: Use NULL instead of integer 0 for rate pointer Sudeep Holla
2020-07-17 14:07 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).