From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: u-boot@lists.denx.de
Subject: [PATCH] rtc: pcf2127: fix uninitialized variable msg
Date: Thu, 9 Jul 2020 13:29:48 +0200 [thread overview]
Message-ID: <5d211753-a8d7-87ea-7b30-87794309cb67@prevas.dk> (raw)
In-Reply-To: <20200709105823.7039-1-biwen.li@oss.nxp.com>
On 09/07/2020 12.58, Biwen Li wrote:
> From: Biwen Li <biwen.li@nxp.com>
>
> Fix uninitialized variable msg
>
> struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
> - struct i2c_msg msg;
> + struct i2c_msg msg = {0};
> int ret;
>
> /* Set the address of the start register to be read */
>
I assume it's the
msg.flags |= I2C_M_RD;
line that is warned about (please include such info)? Isn't the right
fix to replace that by
msg.flags = I2C_M_RD;
?
Rasmus
next prev parent reply other threads:[~2020-07-09 11:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 10:58 [PATCH] rtc: pcf2127: fix uninitialized variable msg Biwen Li
2020-07-09 11:29 ` Rasmus Villemoes [this message]
2020-07-09 11:38 ` [EXT] " Biwen Li
2020-07-09 11:57 ` Rasmus Villemoes
2020-07-10 1:53 ` Biwen Li
2020-09-23 13:36 ` Priyanka Jain
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=5d211753-a8d7-87ea-7b30-87794309cb67@prevas.dk \
--to=rasmus.villemoes@prevas.dk \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.