[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7A436F7769CA33409C6B44B358BFFF0C014F748B1A@dlee02.ent.ti.com>
Date: Thu, 7 Oct 2010 17:15:15 -0500
From: "Menon, Nishanth" <nm@...com>
To: Kevin Hilman <khilman@...prootsystems.com>
CC: "Rafael J. Wysocki" <rjw@...k.pl>,
linux-pm <linux-pm@...ts.linux-foundation.org>,
lkml <linux-kernel@...r.kernel.org>,
l-o <linux-omap@...r.kernel.org>,
l-a <linux-arm-kernel@...ts.infradead.org>,
Paul <paulmck@...ux.vnet.ibm.com>
Subject: RE: [PATCH] power: introduce library for device-specific OPPs
> -----Original Message-----
> From: Kevin Hilman [mailto:khilman@...prootsystems.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists