alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	Baolin Wang <baolin.wang@linaro.org>
Subject: Re: [alsa-devel] [PATCH] ALSA: timer: fix nsec/sec initialization confusion
Date: Sun, 12 Jan 2020 09:43:34 +0100	[thread overview]
Message-ID: <s5h36clkqtl.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200111203325.20498-1-pierre-louis.bossart@linux.intel.com>

On Sat, 11 Jan 2020 21:33:25 +0100,
Pierre-Louis Bossart wrote:
> 
> GCC reports a warning with W=1:
> 
> sound/core/timer.c: In function ‘snd_timer_user_read’:
> sound/core/timer.c:2219:19: warning: initialized field overwritten
> [-Woverride-init]
>  2219 |     .tstamp_sec = tread->tstamp_nsec,
>       |                   ^~~~~
> sound/core/timer.c:2219:19: note: (near initialization for
> ‘(anonymous).tstamp_sec’)
> 
> Assigning nsec values to sec fields is problematic in general, even
> more so when the initial goal was to survive the 2030 timer
> armageddon.
> 
> Fix by using the proper field in the initialization
> 
> Cc: Baolin Wang <baolin.wang@linaro.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Fixes: 07094ae6f9527 ("ALSA: Avoid using timespec for struct snd_timer_tread")
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Applied now.  Thanks.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      parent reply	other threads:[~2020-01-12  8:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 20:33 [alsa-devel] [PATCH] ALSA: timer: fix nsec/sec initialization confusion Pierre-Louis Bossart
2020-01-11 20:41 ` Arnd Bergmann
2020-01-12  8:43 ` Takashi Iwai [this message]

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=s5h36clkqtl.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=pierre-louis.bossart@linux.intel.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;
as well as URLs for NNTP newsgroup(s).