Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247888 > unrolled thread

Re: [PATCH] ahci: qoriq: Fix a compiling warning

Started byTejun Heo <tj@kernel.org>
First post2015-10-15 17:20 +0200
Last post2015-10-16 04:50 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] ahci: qoriq: Fix a compiling warning Tejun Heo <tj@kernel.org> - 2015-10-15 17:20 +0200
    Re: [PATCH] ahci: qoriq: Fix a compiling warning Arnd Bergmann <arnd@arndb.de> - 2015-10-15 17:40 +0200
      Re: [PATCH] ahci: qoriq: Fix a compiling warning Tejun Heo <tj@kernel.org> - 2015-10-15 18:10 +0200
        Re: [PATCH] ahci: qoriq: Fix a compiling warning Arnd Bergmann <arnd@arndb.de> - 2015-10-15 21:50 +0200
        RE: [PATCH] ahci: qoriq: Fix a compiling warning Yuantian Tang <Yuantian.Tang@freescale.com> - 2015-10-16 04:50 +0200

#1247888 — Re: [PATCH] ahci: qoriq: Fix a compiling warning

FromTejun Heo <tj@kernel.org>
Date2015-10-15 17:20 +0200
SubjectRe: [PATCH] ahci: qoriq: Fix a compiling warning
Message-ID<qjStY-1O0-33@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1247903

FromArnd Bergmann <arnd@arndb.de>
Date2015-10-15 17:40 +0200
Message-ID<qjSNk-2aP-17@gated-at.bofh.it>
In reply to#1247888
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247935

FromTejun Heo <tj@kernel.org>
Date2015-10-15 18:10 +0200
Message-ID<qjTgl-2Z7-1@gated-at.bofh.it>
In reply to#1247903
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248116

FromArnd Bergmann <arnd@arndb.de>
Date2015-10-15 21:50 +0200
Message-ID<qjWHg-7WB-15@gated-at.bofh.it>
In reply to#1247935
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248312

FromYuantian Tang <Yuantian.Tang@freescale.com>
Date2015-10-16 04:50 +0200
Message-ID<qk3fI-155-9@gated-at.bofh.it>
In reply to#1247935
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web