From: Jonathan Cameron <jic23@kernel.org>
To: Martin Kepplinger <martink@posteo.de>
Cc: kbuild test robot <lkp@intel.com>,
kbuild-all@01.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: dln2-adc: initialize local struct before using it
Date: Wed, 13 Sep 2017 17:52:32 +0100 [thread overview]
Message-ID: <20170913175232.599fc822@archlinux> (raw)
In-Reply-To: <1ddf9c2d45a9a93cd21e4ba597a3004f@posteo.de>
On Tue, 12 Sep 2017 09:01:27 +0200
Martin Kepplinger <martink@posteo.de> wrote:
> Am 12.09.2017 03:32 schrieb kbuild test robot:
> > Hi Martin,
> >
> > [auto build test WARNING on iio/togreg]
> > [also build test WARNING on next-20170911]
> > [cannot apply to v4.13]
> > [if your patch is applied to the wrong git tree, please drop us a note
> > to help improve the system]
> >
> > url:
> > https://github.com/0day-ci/linux/commits/Martin-Kepplinger/iio-adc-dln2-adc-initialize-local-struct-before-using-it/20170912-064250
> > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
> > togreg
> > config: tile-allyesconfig (attached as .config)
> > compiler: tilegx-linux-gcc (GCC) 4.6.2
> > reproduce:
> > wget
> > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
> > -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # save the attached .config to linux build tree
> > make.cross ARCH=tile
> >
> > All warnings (new ones prefixed by >>):
> >
> > drivers/iio/adc/dln2-adc.c: In function 'dln2_adc_trigger_h':
> >>> drivers/iio/adc/dln2-adc.c:492:2: warning: missing braces around
> >>> initializer [-Wmissing-braces]
> > drivers/iio/adc/dln2-adc.c:492:2: warning: (near initialization for
> > 'data.values') [-Wmissing-braces]
> >
> > vim +492 drivers/iio/adc/dln2-adc.c
> >
> > 484
> > 485 static irqreturn_t dln2_adc_trigger_h(int irq, void *p)
> > 486 {
> > 487 struct iio_poll_func *pf = p;
> > 488 struct iio_dev *indio_dev = pf->indio_dev;
> > 489 struct {
> > 490 __le16 values[DLN2_ADC_MAX_CHANNELS];
> > 491 int64_t timestamp_space;
> > > 492 } data = { 0 };
>
>
> ok :) I guess
>
> } data = {{ 0 }};
>
> would be ok for gcc in this case. How far has this patch gone? Do you
> want a fix
> on top or the patch re-done? Or do you just do it yourself?
>
I'm unconvinced the patch is necessary as I think all elements of
that structure are initialized anyway before they are used.
I might be missing a code path where that isn't true though so
feel free to point one out!
Jonathan
> thanks,
>
> martin
prev parent reply other threads:[~2017-09-13 16:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-10 12:45 [PATCH] iio: adc: dln2-adc: initialize local struct before using it Martin Kepplinger
2017-09-10 15:30 ` Jonathan Cameron
2017-09-12 1:32 ` kbuild test robot
2017-09-12 7:01 ` Martin Kepplinger
2017-09-13 16:52 ` Jonathan Cameron [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=20170913175232.599fc822@archlinux \
--to=jic23@kernel.org \
--cc=kbuild-all@01.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martink@posteo.de \
--cc=pmeerw@pmeerw.net \
/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).