From: Hans de Goede <hdegoede@redhat.com>
To: Yuantian.Tang@freescale.com
Cc: tj@kernel.org, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] ahci: qoriq: fixed using uninitialized variable warnings
Date: Wed, 9 Sep 2015 12:57:19 +0200 [thread overview]
Message-ID: <55F0108F.30609@redhat.com> (raw)
In-Reply-To: <1441790182-20248-1-git-send-email-Yuantian.Tang@freescale.com>
Hi,
On 09-09-15 11:16, Yuantian.Tang@freescale.com wrote:
> From: Tang Yuantian <Yuantian.Tang@freescale.com>
>
> kbuild test robot reports the warnings:
> drivers/ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset':
>>> include/asm-generic/io.h:163:2: warning: 'px_is' may be used
>>> uninitialized in this function [-Wuninitialized]
> drivers/ata/ahci_qoriq.c:70:14: note: 'px_is' was declared here
>>> include/asm-generic/io.h:163:2: warning: 'px_cmd' may be used
>>> uninitialized in this function [-Wuninitialized]
> drivers/ata/ahci_qoriq.c:70:6: note: 'px_cmd' was declared here
>
> This patch fixed it by assigning 0 to px_is and px_cmd variables.
> This patch also remove line 'struct ccsr_ahci *reg_base' which is
> not referred by any other codes and thus a dead one.
>
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
LGTM: Acked-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/ata/ahci_qoriq.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
> index e5e4988..f790852 100644
> --- a/drivers/ata/ahci_qoriq.c
> +++ b/drivers/ata/ahci_qoriq.c
> @@ -49,7 +49,6 @@ enum ahci_qoriq_type {
> };
>
> struct ahci_qoriq_priv {
> - struct ccsr_ahci *reg_base;
> enum ahci_qoriq_type type;
> void __iomem *ecc_addr;
> };
> @@ -67,7 +66,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
> {
> const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context);
> void __iomem *port_mmio = ahci_port_base(link->ap);
> - u32 px_cmd, px_is, px_val;
> + u32 px_cmd = 0, px_is = 0, px_val;
> struct ata_port *ap = link->ap;
> struct ahci_port_priv *pp = ap->private_data;
> struct ahci_host_priv *hpriv = ap->host->private_data;
>
next prev parent reply other threads:[~2015-09-09 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 9:16 [PATCH] ahci: qoriq: fixed using uninitialized variable warnings Yuantian.Tang
2015-09-09 9:16 ` Yuantian.Tang
2015-09-09 10:57 ` Hans de Goede [this message]
2015-09-09 14:01 ` Tejun Heo
2015-09-10 6:17 ` Yuantian Tang
2015-09-11 5:27 ` Yuantian Tang
2015-09-11 13:54 ` Tejun Heo
2015-09-14 3:02 ` Yuantian Tang
2015-09-14 4:04 ` Fengguang Wu
2015-09-14 6:51 ` Yuantian Tang
2015-09-14 6:54 ` Fengguang Wu
2015-09-14 7:45 ` Arnd Bergmann
2015-09-14 16:00 ` Tejun Heo
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=55F0108F.30609@redhat.com \
--to=hdegoede@redhat.com \
--cc=Yuantian.Tang@freescale.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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.