mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jack Stone <jwjstone@fastmail.fm>
To: Viresh Kumar <viresh.kumar@st.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel/async.c: fixing compilation warnings
Date: Fri, 14 Jan 2011 09:18:56 +0000	[thread overview]
Message-ID: <7f454c6e-eeb9-4de0-acfe-6ced96ecdad0@email.android.com> (raw)
In-Reply-To: <1294989246-1621-1-git-send-email-viresh.kumar@st.com>

"Viresh Kumar" <viresh.kumar@st.com> wrote:

>This patch fixes following compilation warnings:
>270:10: warning: ‘starttime.tv64’ may be used uninitialized in this
>function
>122:10: warning: ‘calltime.tv64’ may be used uninitialized in this
>function
>
>Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
>---
> kernel/async.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/kernel/async.c b/kernel/async.c
>index cd9dbb9..9c06931 100644
>--- a/kernel/async.c
>+++ b/kernel/async.c
>@@ -119,7 +119,7 @@ static void async_run_entry_fn(struct work_struct
>*work)
> 	struct async_entry *entry =
> 		container_of(work, struct async_entry, work);
> 	unsigned long flags;
>-	ktime_t calltime, delta, rettime;
>+	ktime_t calltime = {0}, delta, rettime;

I think this is a false positive so we can use uninitalized_var().

> 	/* 1) move self to the running queue */
> 	spin_lock_irqsave(&async_lock, flags);
>@@ -267,7 +267,7 @@ EXPORT_SYMBOL_GPL(async_synchronize_full_domain);
> void async_synchronize_cookie_domain(async_cookie_t cookie,
> 				     struct list_head *running)
> {
>-	ktime_t starttime, delta, endtime;
>+	ktime_t starttime = {0}, delta, endtime;
> 

Same for this one.

> 	if (initcall_debug && system_state == SYSTEM_BOOTING) {
> 		printk("async_waiting @ %i\n", task_pid_nr(current));

Thanks,

Jack


-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

  reply	other threads:[~2011-01-14  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14  7:14 Viresh Kumar
2011-01-14  9:18 ` Jack Stone [this message]
2011-01-14 11:13   ` viresh kumar

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=7f454c6e-eeb9-4de0-acfe-6ced96ecdad0@email.android.com \
    --to=jwjstone@fastmail.fm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viresh.kumar@st.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

all inboxes | Powered by JetHome®