linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: PM / OPP: Add clock-latency-ns support
@ 2015-08-10 16:38 Dan Carpenter
  2015-08-11  8:12 ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2015-08-10 16:38 UTC (permalink / raw)
  To: viresh.kumar; +Cc: linux-pm

Hello Viresh Kumar,

The patch 3ca9bb33c627: "PM / OPP: Add clock-latency-ns support" from
Jul 29, 2015, leads to the following static checker warning:

	drivers/base/power/opp.c:949 _opp_add_static_v2()
	warn: passing casted pointer '&new_opp->clock_latency_ns' to 'of_property_read_u32()' 64 vs 32.

drivers/base/power/opp.c
   946          new_opp->np = np;
   947          new_opp->dynamic = false;
   948          new_opp->available = true;
   949          of_property_read_u32(np, "clock-latency-ns",
   950                               (u32 *)&new_opp->clock_latency_ns);
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^

This code will break on 64 bit, big endian machines.  I doin't know if
that is an issue for this driver.  I saw this was in the power/
directory and I spent a minute googling to see if PowerPC machines are
big endian...  :P

   951  
   952          ret = opp_get_microvolt(new_opp, dev);
   953          if (ret)
   954                  goto free_opp;
   955  

Also:

	drivers/base/power/opp.c:956 _opp_add_static_v2()
	warn: passing casted pointer '&new_opp->u_amp' to 'of_property_read_u32()' 64 vs 32.

regards,
dan carpenter

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

end of thread, other threads:[~2015-08-12  7:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 16:38 PM / OPP: Add clock-latency-ns support Dan Carpenter
2015-08-11  8:12 ` Viresh Kumar
2015-08-11 13:53   ` Dan Carpenter
2015-08-11 18:54     ` Stephen Boyd
2015-08-12  6:57       ` Viresh Kumar
2015-08-12  7:58         ` Dan Carpenter

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).