From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.de>
Subject: Re: sound/firewire/amdtp-stream.c:1099 process_rx_packets() error: uninitialized symbol 'curr_cycle_time'.
Date: Tue, 04 Jul 2023 10:16:38 +0200 [thread overview]
Message-ID: <87o7ks2is9.wl-tiwai@suse.de> (raw)
In-Reply-To: <bacd122c-175c-4fe8-bc6a-66de5820eed0@kadam.mountain>
On Mon, 03 Jul 2023 15:00:01 +0200,
Dan Carpenter wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: b25f62ccb490680a8cee755ac4528909395e0711
> commit: fef4e61b0b765b6d22badcd5b6575b159e7d510a ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI
> config: i386-randconfig-m021-20230701 (https://download.01.org/0day-ci/archive/20230701/202307011324.jFJ96dTo-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20230701/202307011324.jFJ96dTo-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202307011324.jFJ96dTo-lkp@intel.com/
>
> New smatch warnings:
> sound/firewire/amdtp-stream.c:1099 process_rx_packets() error: uninitialized symbol 'curr_cycle_time'.
>
> Old smatch warnings:
> sound/firewire/amdtp-stream.c:944 generate_tx_packet_descs() error: uninitialized symbol 'curr_cycle_time'.
(snip)
> The curr_cycle_time variable is only going to be used if trace_amdtp_packet_enabled()
> is true. We would consider it a false positive if build_it_pkt_header()
> is inlined but a bug if it's not. (Technically passing uninitialized
> data is undefined behavior but if a function is inlined then it's not
> "passing" anything).
Yes, this is a false-positive, so no much worry needed. But it's hard
for compiler / checker to know it, and I guess that simply
initializing the variable would be the easiest workaround, after all.
thanks,
Takashi
prev parent reply other threads:[~2023-07-04 8:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 13:00 sound/firewire/amdtp-stream.c:1099 process_rx_packets() error: uninitialized symbol 'curr_cycle_time' Dan Carpenter
2023-07-04 8:16 ` 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=87o7ks2is9.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=o-takashi@sakamocchi.jp \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/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