From: Richa Jha <richa.jha2@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Richa Jha <richa.jha2@gmail.com>
Subject: [PATCH] Signed-off-by: Richa Jha <richa.jha2@gmail.com>
Date: Wed, 17 May 2017 15:42:25 +0530 [thread overview]
Message-ID: <1495015945-6404-1-git-send-email-richa.jha2@gmail.com> (raw)
From short to string conversion
---
drivers/char/efirtc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
index dc62568..b8a4d02 100644
--- a/drivers/char/efirtc.c
+++ b/drivers/char/efirtc.c
@@ -302,6 +302,7 @@ static int efi_rtc_proc_show(struct seq_file *m, void *v)
efi_time_cap_t cap;
efi_bool_t enabled, pending;
unsigned long flags;
+ char str_timezone[128];
memset(&eft, 0, sizeof(eft));
memset(&alm, 0, sizeof(alm));
@@ -326,7 +327,9 @@ static int efi_rtc_proc_show(struct seq_file *m, void *v)
seq_puts(m, "Timezone : unspecified\n");
else
/* XXX fixme: convert to string? */
- seq_printf(m, "Timezone : %u\n", eft.timezone);
+ for(i= eft.timezone,c=0; i>0 ;c++,i=i/10)
+ str_timezone[c] = i%10 - 48
+ seq_puts(m, str_timezone);
seq_printf(m,
--
2.1.4
next reply other threads:[~2017-05-17 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 10:12 Richa Jha [this message]
2017-05-17 12:02 ` Arnd Bergmann
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=1495015945-6404-1-git-send-email-richa.jha2@gmail.com \
--to=richa.jha2@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®