mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Shashidhar Hiremath <shashidharh@vayavyalabs.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: A question on printascii
Date: Thu, 19 Jul 2012 23:54:15 -0400	[thread overview]
Message-ID: <87hat35bq0.fsf@octavius.laptop.org> (raw)
In-Reply-To: <CANYdXnrf-f2e=3YKpwweSmvrYdmy7z_yOEyZ11k=La=8b3W6Pw@mail.gmail.com> (Shashidhar Hiremath's message of "Wed, 18 Jul 2012 18:33:03 +0530")

Hi Shashidhar,

On Wed, Jul 18 2012, Shashidhar Hiremath wrote:
>   I want to use printascii to debug my serial driver. How do I enable
> it and use the feature.
>   Currently I have enabled in menuconfig and done an extern on the
> printascii api, this doesn't seem to work, So any hints for debugging
> serial drivers ?

Sounds like you want this patch, against linux-next:

diff --git a/kernel/printk.c b/kernel/printk.c
index 3991862..36abce8 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -45,6 +45,8 @@
 
 #include <asm/uaccess.h>
 
+extern void printascii(char *);
+
 #define CREATE_TRACE_POINTS
 #include <trace/events/printk.h>
 
@@ -1542,6 +1544,8 @@ asmlinkage int vprintk_emit(int facility, int level,
 	 */
 	text_len = vscnprintf(text, sizeof(textbuf), fmt, args);
 
+	printascii(text);
+
 	/* mark and strip a trailing newline */
 	if (text_len && text[text_len-1] == '\n') {
 		text_len--;

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  parent reply	other threads:[~2012-07-20  3:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 13:03 Shashidhar Hiremath
2012-07-18 16:03 ` Randy Dunlap
2012-07-20  3:34   ` Shashidhar Hiremath
2012-07-20  3:54 ` Chris Ball [this message]
2012-07-20  8:20   ` Shashidhar Hiremath

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=87hat35bq0.fsf@octavius.laptop.org \
    --to=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shashidharh@vayavyalabs.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

Powered by JetHome