* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-14 8:46 ` Tang Yuantian
0 siblings, 0 replies; 15+ messages in thread
From: Tang Yuantian @ 2015-10-14 8:46 UTC (permalink / raw
To: hdegoede
Cc: tj, fengguang.wu, linux-ide, linux-kernel, linux-arm-kernel,
Tang Yuantian, Arnd Bergmann
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 introducing a local variable.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I found this warning again on gcc version 4.8.3 20131202.
So this warning may not go way with newer gcc version.
I verified Arnd's suggestion and it works.
So please apply this patch which I sent on behalf of Arnd.
drivers/ata/ahci_qoriq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index e5e4988..58c1a94 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
struct ata_taskfile tf;
bool online;
int rc;
+ bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
DPRINTK("ENTER\n");
@@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
* After the sequence is complete, software should restore the
* PxCMD and PxIS with the stored values.
*/
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_cmd = readl(port_mmio + PORT_CMD);
px_is = readl(port_mmio + PORT_IRQ_STAT);
}
@@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
ahci_check_ready);
/* restore the PxCMD and PxIS on ls1021 */
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_val = readl(port_mmio + PORT_CMD);
if (px_val != px_cmd)
writel(px_cmd, port_mmio + PORT_CMD);
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-14 8:46 ` Tang Yuantian
0 siblings, 0 replies; 15+ messages in thread
From: Tang Yuantian @ 2015-10-14 8:46 UTC (permalink / raw
To: linux-arm-kernel
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 introducing a local variable.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I found this warning again on gcc version 4.8.3 20131202.
So this warning may not go way with newer gcc version.
I verified Arnd's suggestion and it works.
So please apply this patch which I sent on behalf of Arnd.
drivers/ata/ahci_qoriq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index e5e4988..58c1a94 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
struct ata_taskfile tf;
bool online;
int rc;
+ bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
DPRINTK("ENTER\n");
@@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
* After the sequence is complete, software should restore the
* PxCMD and PxIS with the stored values.
*/
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_cmd = readl(port_mmio + PORT_CMD);
px_is = readl(port_mmio + PORT_IRQ_STAT);
}
@@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
ahci_check_ready);
/* restore the PxCMD and PxIS on ls1021 */
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_val = readl(port_mmio + PORT_CMD);
if (px_val != px_cmd)
writel(px_cmd, port_mmio + PORT_CMD);
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-14 8:46 ` Tang Yuantian
0 siblings, 0 replies; 15+ messages in thread
From: Tang Yuantian @ 2015-10-14 8:46 UTC (permalink / raw
To: hdegoede
Cc: tj, fengguang.wu, linux-ide, linux-kernel, linux-arm-kernel,
Tang Yuantian, Arnd Bergmann
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 introducing a local variable.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I found this warning again on gcc version 4.8.3 20131202.
So this warning may not go way with newer gcc version.
I verified Arnd's suggestion and it works.
So please apply this patch which I sent on behalf of Arnd.
drivers/ata/ahci_qoriq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index e5e4988..58c1a94 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
struct ata_taskfile tf;
bool online;
int rc;
+ bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
DPRINTK("ENTER\n");
@@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
* After the sequence is complete, software should restore the
* PxCMD and PxIS with the stored values.
*/
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_cmd = readl(port_mmio + PORT_CMD);
px_is = readl(port_mmio + PORT_IRQ_STAT);
}
@@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
ahci_check_ready);
/* restore the PxCMD and PxIS on ls1021 */
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_val = readl(port_mmio + PORT_CMD);
if (px_val != px_cmd)
writel(px_cmd, port_mmio + PORT_CMD);
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] ahci: qoriq: Fix a compiling warning
2015-10-14 8:46 ` Tang Yuantian
@ 2015-10-15 15:11 ` Tejun Heo
-1 siblings, 0 replies; 15+ messages in thread
From: Tejun Heo @ 2015-10-15 15:11 UTC (permalink / raw
To: Tang Yuantian
Cc: hdegoede, fengguang.wu, linux-ide, linux-kernel, linux-arm-kernel,
Arnd Bergmann
Hello,
On Wed, Oct 14, 2015 at 04:46:52PM +0800, Tang Yuantian wrote:
> 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 introducing a local variable.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Hmmm... why is the patch signed off by Arnd? You can't sign off for
other people. If this was suggested by Arnd, please use
"Suggested-by:" or "Original-patch-by:".
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-15 15:11 ` Tejun Heo
0 siblings, 0 replies; 15+ messages in thread
From: Tejun Heo @ 2015-10-15 15:11 UTC (permalink / raw
To: linux-arm-kernel
Hello,
On Wed, Oct 14, 2015 at 04:46:52PM +0800, Tang Yuantian wrote:
> 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 introducing a local variable.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Hmmm... why is the patch signed off by Arnd? You can't sign off for
other people. If this was suggested by Arnd, please use
"Suggested-by:" or "Original-patch-by:".
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] ahci: qoriq: Fix a compiling warning
2015-10-15 15:11 ` Tejun Heo
@ 2015-10-15 15:35 ` Arnd Bergmann
-1 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2015-10-15 15:35 UTC (permalink / raw
To: linux-arm-kernel
Cc: Tejun Heo, Tang Yuantian, linux-ide, linux-kernel, hdegoede,
fengguang.wu
On Thursday 15 October 2015 11:11:52 Tejun Heo wrote:
>
> On Wed, Oct 14, 2015 at 04:46:52PM +0800, Tang Yuantian wrote:
> > 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 introducing a local variable.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Hmmm... why is the patch signed off by Arnd? You can't sign off for
> other people. If this was suggested by Arnd, please use
> "Suggested-by:" or "Original-patch-by:".
The original patch I sent had my Signed-off-by, see
https://lkml.org/lkml/2015/9/14/64
Tang Yuantian now submitted it properly with a full changelog text
but forgot to add the 'From: Arnd Bergmann <arnd@arndb.de>' line at
the start and the second Signed-off-by below mine.
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-15 15:35 ` Arnd Bergmann
0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2015-10-15 15:35 UTC (permalink / raw
To: linux-arm-kernel
On Thursday 15 October 2015 11:11:52 Tejun Heo wrote:
>
> On Wed, Oct 14, 2015 at 04:46:52PM +0800, Tang Yuantian wrote:
> > 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 introducing a local variable.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Hmmm... why is the patch signed off by Arnd? You can't sign off for
> other people. If this was suggested by Arnd, please use
> "Suggested-by:" or "Original-patch-by:".
The original patch I sent had my Signed-off-by, see
https://lkml.org/lkml/2015/9/14/64
Tang Yuantian now submitted it properly with a full changelog text
but forgot to add the 'From: Arnd Bergmann <arnd@arndb.de>' line at
the start and the second Signed-off-by below mine.
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] ahci: qoriq: Fix a compiling warning
2015-10-15 15:35 ` Arnd Bergmann
@ 2015-10-15 16:04 ` Tejun Heo
-1 siblings, 0 replies; 15+ messages in thread
From: Tejun Heo @ 2015-10-15 16:04 UTC (permalink / raw
To: Arnd Bergmann
Cc: linux-arm-kernel, Tang Yuantian, linux-ide, linux-kernel,
hdegoede, fengguang.wu
Hello,
I see. I applied the following to libata/for-4.4.
Thanks.
------ 8< ------
>From eb351031a15c4a83b9955aadad783c6672ab8868 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 14 Oct 2015 16:46:52 +0800
Subject: [PATCH] ahci: qoriq: Fix a compiling warning
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 introducing a local variable.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/ahci_qoriq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index e5e4988..58c1a94 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
struct ata_taskfile tf;
bool online;
int rc;
+ bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
DPRINTK("ENTER\n");
@@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
* After the sequence is complete, software should restore the
* PxCMD and PxIS with the stored values.
*/
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_cmd = readl(port_mmio + PORT_CMD);
px_is = readl(port_mmio + PORT_IRQ_STAT);
}
@@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
ahci_check_ready);
/* restore the PxCMD and PxIS on ls1021 */
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_val = readl(port_mmio + PORT_CMD);
if (px_val != px_cmd)
writel(px_cmd, port_mmio + PORT_CMD);
--
2.4.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-15 16:04 ` Tejun Heo
0 siblings, 0 replies; 15+ messages in thread
From: Tejun Heo @ 2015-10-15 16:04 UTC (permalink / raw
To: linux-arm-kernel
Hello,
I see. I applied the following to libata/for-4.4.
Thanks.
------ 8< ------
>From eb351031a15c4a83b9955aadad783c6672ab8868 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 14 Oct 2015 16:46:52 +0800
Subject: [PATCH] ahci: qoriq: Fix a compiling warning
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 introducing a local variable.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/ahci_qoriq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index e5e4988..58c1a94 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
struct ata_taskfile tf;
bool online;
int rc;
+ bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
DPRINTK("ENTER\n");
@@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
* After the sequence is complete, software should restore the
* PxCMD and PxIS with the stored values.
*/
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_cmd = readl(port_mmio + PORT_CMD);
px_is = readl(port_mmio + PORT_IRQ_STAT);
}
@@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
ahci_check_ready);
/* restore the PxCMD and PxIS on ls1021 */
- if (qoriq_priv->type == AHCI_LS1021A) {
+ if (ls1021a_workaround) {
px_val = readl(port_mmio + PORT_CMD);
if (px_val != px_cmd)
writel(px_cmd, port_mmio + PORT_CMD);
--
2.4.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] ahci: qoriq: Fix a compiling warning
2015-10-15 16:04 ` Tejun Heo
(?)
@ 2015-10-15 19:42 ` Arnd Bergmann
-1 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2015-10-15 19:42 UTC (permalink / raw
To: Tejun Heo
Cc: linux-arm-kernel, Tang Yuantian, linux-ide, linux-kernel,
hdegoede, fengguang.wu
On Thursday 15 October 2015 12:04:10 Tejun Heo wrote:
> Hello,
>
> I see. I applied the following to libata/for-4.4.
>
>
Thanks!
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-15 19:42 ` Arnd Bergmann
0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2015-10-15 19:42 UTC (permalink / raw
To: linux-arm-kernel
On Thursday 15 October 2015 12:04:10 Tejun Heo wrote:
> Hello,
>
> I see. I applied the following to libata/for-4.4.
>
>
Thanks!
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-15 19:42 ` Arnd Bergmann
0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2015-10-15 19:42 UTC (permalink / raw
To: Tejun Heo
Cc: linux-ide, hdegoede, linux-kernel, Tang Yuantian, fengguang.wu,
linux-arm-kernel
On Thursday 15 October 2015 12:04:10 Tejun Heo wrote:
> Hello,
>
> I see. I applied the following to libata/for-4.4.
>
>
Thanks!
Arnd
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH] ahci: qoriq: Fix a compiling warning
2015-10-15 16:04 ` Tejun Heo
(?)
@ 2015-10-16 2:12 ` Yuantian Tang
-1 siblings, 0 replies; 15+ messages in thread
From: Yuantian Tang @ 2015-10-16 2:12 UTC (permalink / raw
To: Tejun Heo, Arnd Bergmann
Cc: linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org, hdegoede@redhat.com,
fengguang.wu@intel.com
Thanks Tejun.
Regards,
Yuantian
> -----Original Message-----
> From: Tejun Heo [mailto:htejun@gmail.com] On Behalf Of Tejun Heo
> Sent: Friday, October 16, 2015 12:04 AM
> To: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arm-kernel@lists.infradead.org; Tang Yuantian-B29983
> <Yuantian.Tang@freescale.com>; linux-ide@vger.kernel.org; linux-
> kernel@vger.kernel.org; hdegoede@redhat.com; fengguang.wu@intel.com
> Subject: Re: [PATCH] ahci: qoriq: Fix a compiling warning
>
> Hello,
>
> I see. I applied the following to libata/for-4.4.
>
> Thanks.
>
> ------ 8< ------
> From eb351031a15c4a83b9955aadad783c6672ab8868 Mon Sep 17 00:00:00
> 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Wed, 14 Oct 2015 16:46:52 +0800
> Subject: [PATCH] ahci: qoriq: Fix a compiling warning
>
> 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 introducing a local variable.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> drivers/ata/ahci_qoriq.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index
> e5e4988..58c1a94 100644
> --- a/drivers/ata/ahci_qoriq.c
> +++ b/drivers/ata/ahci_qoriq.c
> @@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> struct ata_taskfile tf;
> bool online;
> int rc;
> + bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
>
> DPRINTK("ENTER\n");
>
> @@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> * After the sequence is complete, software should restore the
> * PxCMD and PxIS with the stored values.
> */
> - if (qoriq_priv->type == AHCI_LS1021A) {
> + if (ls1021a_workaround) {
> px_cmd = readl(port_mmio + PORT_CMD);
> px_is = readl(port_mmio + PORT_IRQ_STAT);
> }
> @@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> ahci_check_ready);
>
> /* restore the PxCMD and PxIS on ls1021 */
> - if (qoriq_priv->type == AHCI_LS1021A) {
> + if (ls1021a_workaround) {
> px_val = readl(port_mmio + PORT_CMD);
> if (px_val != px_cmd)
> writel(px_cmd, port_mmio + PORT_CMD);
> --
> 2.4.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-16 2:12 ` Yuantian Tang
0 siblings, 0 replies; 15+ messages in thread
From: Yuantian Tang @ 2015-10-16 2:12 UTC (permalink / raw
To: linux-arm-kernel
Thanks Tejun.
Regards,
Yuantian
> -----Original Message-----
> From: Tejun Heo [mailto:htejun at gmail.com] On Behalf Of Tejun Heo
> Sent: Friday, October 16, 2015 12:04 AM
> To: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arm-kernel at lists.infradead.org; Tang Yuantian-B29983
> <Yuantian.Tang@freescale.com>; linux-ide at vger.kernel.org; linux-
> kernel at vger.kernel.org; hdegoede at redhat.com; fengguang.wu at intel.com
> Subject: Re: [PATCH] ahci: qoriq: Fix a compiling warning
>
> Hello,
>
> I see. I applied the following to libata/for-4.4.
>
> Thanks.
>
> ------ 8< ------
> From eb351031a15c4a83b9955aadad783c6672ab8868 Mon Sep 17 00:00:00
> 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Wed, 14 Oct 2015 16:46:52 +0800
> Subject: [PATCH] ahci: qoriq: Fix a compiling warning
>
> 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 introducing a local variable.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> drivers/ata/ahci_qoriq.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index
> e5e4988..58c1a94 100644
> --- a/drivers/ata/ahci_qoriq.c
> +++ b/drivers/ata/ahci_qoriq.c
> @@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> struct ata_taskfile tf;
> bool online;
> int rc;
> + bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
>
> DPRINTK("ENTER\n");
>
> @@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> * After the sequence is complete, software should restore the
> * PxCMD and PxIS with the stored values.
> */
> - if (qoriq_priv->type == AHCI_LS1021A) {
> + if (ls1021a_workaround) {
> px_cmd = readl(port_mmio + PORT_CMD);
> px_is = readl(port_mmio + PORT_IRQ_STAT);
> }
> @@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> ahci_check_ready);
>
> /* restore the PxCMD and PxIS on ls1021 */
> - if (qoriq_priv->type == AHCI_LS1021A) {
> + if (ls1021a_workaround) {
> px_val = readl(port_mmio + PORT_CMD);
> if (px_val != px_cmd)
> writel(px_cmd, port_mmio + PORT_CMD);
> --
> 2.4.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH] ahci: qoriq: Fix a compiling warning
@ 2015-10-16 2:12 ` Yuantian Tang
0 siblings, 0 replies; 15+ messages in thread
From: Yuantian Tang @ 2015-10-16 2:12 UTC (permalink / raw
To: Tejun Heo, Arnd Bergmann
Cc: linux-ide@vger.kernel.org, fengguang.wu@intel.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, hdegoede@redhat.com
Thanks Tejun.
Regards,
Yuantian
> -----Original Message-----
> From: Tejun Heo [mailto:htejun@gmail.com] On Behalf Of Tejun Heo
> Sent: Friday, October 16, 2015 12:04 AM
> To: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arm-kernel@lists.infradead.org; Tang Yuantian-B29983
> <Yuantian.Tang@freescale.com>; linux-ide@vger.kernel.org; linux-
> kernel@vger.kernel.org; hdegoede@redhat.com; fengguang.wu@intel.com
> Subject: Re: [PATCH] ahci: qoriq: Fix a compiling warning
>
> Hello,
>
> I see. I applied the following to libata/for-4.4.
>
> Thanks.
>
> ------ 8< ------
> From eb351031a15c4a83b9955aadad783c6672ab8868 Mon Sep 17 00:00:00
> 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Wed, 14 Oct 2015 16:46:52 +0800
> Subject: [PATCH] ahci: qoriq: Fix a compiling warning
>
> 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 introducing a local variable.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> drivers/ata/ahci_qoriq.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index
> e5e4988..58c1a94 100644
> --- a/drivers/ata/ahci_qoriq.c
> +++ b/drivers/ata/ahci_qoriq.c
> @@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> struct ata_taskfile tf;
> bool online;
> int rc;
> + bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A);
>
> DPRINTK("ENTER\n");
>
> @@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> * After the sequence is complete, software should restore the
> * PxCMD and PxIS with the stored values.
> */
> - if (qoriq_priv->type == AHCI_LS1021A) {
> + if (ls1021a_workaround) {
> px_cmd = readl(port_mmio + PORT_CMD);
> px_is = readl(port_mmio + PORT_IRQ_STAT);
> }
> @@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link,
> unsigned int *class,
> ahci_check_ready);
>
> /* restore the PxCMD and PxIS on ls1021 */
> - if (qoriq_priv->type == AHCI_LS1021A) {
> + if (ls1021a_workaround) {
> px_val = readl(port_mmio + PORT_CMD);
> if (px_val != px_cmd)
> writel(px_cmd, port_mmio + PORT_CMD);
> --
> 2.4.3
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-10-16 2:46 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 8:46 [PATCH] ahci: qoriq: Fix a compiling warning Tang Yuantian
2015-10-14 8:46 ` Tang Yuantian
2015-10-14 8:46 ` Tang Yuantian
2015-10-15 15:11 ` Tejun Heo
2015-10-15 15:11 ` Tejun Heo
2015-10-15 15:35 ` Arnd Bergmann
2015-10-15 15:35 ` Arnd Bergmann
2015-10-15 16:04 ` Tejun Heo
2015-10-15 16:04 ` Tejun Heo
2015-10-15 19:42 ` Arnd Bergmann
2015-10-15 19:42 ` Arnd Bergmann
2015-10-15 19:42 ` Arnd Bergmann
2015-10-16 2:12 ` Yuantian Tang
2015-10-16 2:12 ` Yuantian Tang
2015-10-16 2:12 ` Yuantian Tang
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.