From: "Fábio Belavenuto" <belavenuto@gmail.com>
To: Alexey Klimov <klimov.linux@gmail.com>
Cc: video4linux-list@redhat.com
Subject: Re: [PATCH] Add TEA5764 radio driver
Date: Thu, 18 Dec 2008 18:12:42 -0300 [thread overview]
Message-ID: <494ABCCA.2040103@gmail.com> (raw)
In-Reply-To: <1229565443.8079.56.camel@tux.localhost>
Alexey Klimov escreveu:
> Hello, Fabio
> May i tell some suggestion here ?
>
>
Yes, I appreciate.
> So, you used printk + KBUILD_MODNAME here and then you used it in code.
> As i know(may be i'm wrong) that using KBUILD_MODNAME here is bad.
> Better way is doing something like this:
>
> #define TEA5764_DRIVER_NAME "radio-tea5764"
>
> (defined driver name should be unique)
>
> #define PINFO(format, ...) \
> printk(KERN_INFO TEA5764_DRIVER_NAME": " \
> DRIVER_VERSION ": " format "\n", ## __VA_ARGS__)
> Later, you can(should?) use TEA5764_DRIVER_NAME in static const struct
> i2c_device_id tea5764_id and in static struct i2c_driver
> tea5764_i2c_driver.
>
> But, really good way is using dev_info, dev_warn, dev_err macros. You
> can look for examples in dsbr100.c or radio-mr800.c. Or in other
> drivers.
>
>
Thank you, I will use this constant and macros dev_*.
>
>
> It will be really nice to hear what other developers think about making
> header file for structures and a lot of defines. Should it go to
> separate .h file ?
>
>
>
I study on the use of headers, I thought it was complicated to create
more headlines.
>
> Here. You can insert TEA5764_DRIVER_NAME instead of "radio-tea5764".
>
>
Ok.
> Please, reformat the patch. All rest code looks good for my eyes.
>
>
>
Thank you, I will.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-12-18 20:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 22:49 [PATCH] Add TEA5764 radio driver Fabio Belavenuto
2008-12-18 1:57 ` Alexey Klimov
2008-12-18 21:12 ` Fábio Belavenuto [this message]
2008-12-18 11:52 ` Hans Verkuil
2008-12-18 21:13 ` Fábio Belavenuto
2008-12-30 22:32 ` Mauro Carvalho Chehab
2008-12-31 9:52 ` Hans Verkuil
2008-12-31 10:12 ` Mauro Carvalho Chehab
2009-01-02 2:22 ` Fábio Belavenuto
2009-02-11 7:10 ` Hans Verkuil
2009-02-17 16:38 ` Fabio Belavenuto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=494ABCCA.2040103@gmail.com \
--to=belavenuto@gmail.com \
--cc=klimov.linux@gmail.com \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox