lkml.org 
[lkml]   [2010]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] power: introduce library for device-specific OPPs
> -----Original Message-----
> From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
> Sent: Thursday, October 07, 2010 5:14 PM
> To: Menon, Nishanth
> Cc: Rafael J. Wysocki; linux-pm; lkml; l-o; l-a; Paul
> Subject: Re: [PATCH] power: introduce library for device-specific OPPs
>
[...]
> >> > +static int opp_set_availability(struct device *dev, unsigned long
> freq,
> >> > + bool availability_req)
> >> > +{
> >> > + struct device_opp *tmp_dev_opp, *dev_opp = NULL;
> >> > + struct opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
> >> > + int r = 0;
> >> > +
> >> > + /* keep the node allocated */
> >> > + new_opp = kmalloc(sizeof(struct opp), GFP_KERNEL);
> >> > + if (!new_opp) {
> >> > + pr_warning("Unable to allocate opp\n");
> >>
> >> Please add an identification string to the messages, something like
> >> "OPP: Unable to allocat object\n" (and similarly in the other messages).
> >> That would help to find the source of a message in case there's any
> >> problem.
> >
> > pr_fmt has been reformatted for this. The actual message which will
> appear
> > is as follows:
> > opp_set_availability: Unable to allocate opp
> >
> > is'nt that good enough considering that all functions are opp_ prefixed?
> > I can modify pr_fmt to add "OPP:" but I kinda think it is redundant. But
> I
> > have no strong opinions on that and look forward to your recommendations.
>
> Even more informative would be to use dev_warn() and include the func.
> That way we'll even know which device has the problem.
Ack. Thanks. Yeah, this is better.. will do the change.

Regards,
Nishanth Menon


\
 
 \ /
  Last update: 2010-10-08 00:19    [from the cache]
©2003-2011 Jasper Spaans