* printk(KERN_x...) vs dev_x()
@ 2011-01-21 6:38 ` Sutharshan Ramamoorthy / Prod
0 siblings, 0 replies; 4+ messages in thread
From: Sutharshan Ramamoorthy / Prod @ 2011-01-21 6:38 UTC (permalink / raw)
To: kernelnewbies
Hi,
I'm submitting patches to linux kernel.
I'd like to know, Which is the acceptable practice to print debug messages?
At some places in the code, there is no valid 'dev' pointer to pass to
dev_xx() macro, at such places is it ok to use printk(KERN_XXX...)?
Please let me know correct format of print messages.
Thanks,
Sutharsan.
---------------------------------------------------------------
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* printk(KERN_x...) vs dev_x()
@ 2011-01-21 6:38 ` Sutharshan Ramamoorthy / Prod
0 siblings, 0 replies; 4+ messages in thread
From: Sutharshan Ramamoorthy / Prod @ 2011-01-21 6:38 UTC (permalink / raw)
To: kernelnewbies, linux-kernel; +Cc: odc
Hi,
I'm submitting patches to linux kernel.
I'd like to know, Which is the acceptable practice to print debug messages?
At some places in the code, there is no valid 'dev' pointer to pass to
dev_xx() macro, at such places is it ok to use printk(KERN_XXX...)?
Please let me know correct format of print messages.
Thanks,
Sutharsan.
---------------------------------------------------------------
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* printk(KERN_x...) vs dev_x()
2011-01-21 6:38 ` Sutharshan Ramamoorthy / Prod
@ 2011-01-21 8:55 ` Alan Cox
-1 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2011-01-21 8:55 UTC (permalink / raw)
To: kernelnewbies
> At some places in the code, there is no valid 'dev' pointer to pass to
> dev_xx() macro, at such places is it ok to use printk(KERN_XXX...)?
pr_debug() is the equivalent you want. Ideally tweak the code so the dev
pointer is available. I know that right now is a bit of a problem in a
few cases (some tty stuff for example only just acquired a usable dev
pointer)
Alan
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: printk(KERN_x...) vs dev_x()
@ 2011-01-21 8:55 ` Alan Cox
0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2011-01-21 8:55 UTC (permalink / raw)
To: Sutharshan Ramamoorthy / Prod; +Cc: kernelnewbies, linux-kernel, odc
> At some places in the code, there is no valid 'dev' pointer to pass to
> dev_xx() macro, at such places is it ok to use printk(KERN_XXX...)?
pr_debug() is the equivalent you want. Ideally tweak the code so the dev
pointer is available. I know that right now is a bit of a problem in a
few cases (some tty stuff for example only just acquired a usable dev
pointer)
Alan
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-21 8:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-21 6:38 printk(KERN_x...) vs dev_x() Sutharshan Ramamoorthy / Prod
2011-01-21 6:38 ` Sutharshan Ramamoorthy / Prod
2011-01-21 8:55 ` Alan Cox
2011-01-21 8:55 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.