Re: [PATCHv4 06/17] pps: convert printk/pr_* to dev_*

From: Rodolfo Giometti
Date: Sun Nov 21 2010 - 03:20:14 EST


On Sun, Nov 21, 2010 at 12:33:23AM +0300, Alexander Gordeev wrote:
> ?? Sat, 20 Nov 2010 16:49:40 +0100
> Rodolfo Giometti <giometti@xxxxxxxxxxxx> ??????????:
>
> > On Thu, Nov 18, 2010 at 07:00:59PM +0300, Alexander Gordeev wrote:
> > > Since we now have direct pointers to struct pps_device everywhere it's
> > > easy to use dev_* functions to print messages instead of plain printks.
> > > Where dev_* cannot be used printks are converted to pr_*.
> > >
> > > Signed-off-by: Alexander Gordeev <lasaine@xxxxxxxxxxxxx>
> > > ---
> > > drivers/pps/clients/pps-ktimer.c | 5 +++--
> > > drivers/pps/clients/pps-ldisc.c | 2 ++
> > > drivers/pps/kapi.c | 15 ++++++++-------
> > > drivers/pps/pps.c | 25 +++++++++++++------------
> > > 4 files changed, 26 insertions(+), 21 deletions(-)
> > >
> > > diff --git a/drivers/pps/clients/pps-ktimer.c b/drivers/pps/clients/pps-ktimer.c
> > > index 966ead1..2728469 100644
> > > --- a/drivers/pps/clients/pps-ktimer.c
> > > +++ b/drivers/pps/clients/pps-ktimer.c
> > > @@ -19,6 +19,7 @@
> > > * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> > > */
> > >
> > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> >
> > Instead of redefining pr_fmt() in each file you may do it once into
> > include file pps_kernel.h...
>
> Yes, but then every .c file will have to include linux/pps_kernel.h
> before including linux/kernel.h (where pr_* are defined) and only you
> and me will know the reason for that. Of course, we can add a comment to
> every .c file to discourage others from moving includes but IMHO the
> way how it is done in the patch is better. I dislike hidden
> dependencies between header files very much.

Ok.

Acked-by: Rodolfo Giometti <giometti@xxxxxxxx>

--

GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver giometti@xxxxxxxx
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/