* [PATCH] bfa: fix compilation warning in powerpc (resend)
@ 2010-04-13 19:22 Jing Huang
2010-04-21 23:12 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Jing Huang @ 2010-04-13 19:22 UTC (permalink / raw)
To: sfr, James.Bottomley
Cc: linux-next, linux-kernel, linux-scsi, kgudipat, rvadivel,
vravindr, Jing Huang
Fix the compilation warning in powerpc. The same change also fixes endian
issue we found in powerpc test. This patch has been tested in x86 and
powerpc platform. it is created using scsi-misc-2.6.
Signed-off-by: Jing Huang <huangj@brocade.com>
---
drivers/scsi/bfa/bfa_os_inc.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/bfa/bfa_os_inc.h b/drivers/scsi/bfa/bfa_os_inc.h
index 4eb1330..bd1cd3e 100644
--- a/drivers/scsi/bfa/bfa_os_inc.h
+++ b/drivers/scsi/bfa/bfa_os_inc.h
@@ -176,12 +176,12 @@ int bfa_os_MWB(void *);
#define bfa_os_addr_t char __iomem *
#define bfa_os_panic()
-#define bfa_os_reg_read(_raddr) bfa_os_wtole(readl(_raddr))
-#define bfa_os_reg_write(_raddr, _val) writel(bfa_os_wtole((_val)), (_raddr))
+#define bfa_os_reg_read(_raddr) readl(_raddr)
+#define bfa_os_reg_write(_raddr, _val) writel((_val), (_raddr))
#define bfa_os_mem_read(_raddr, _off) \
- bfa_os_ntohl(readl(((_raddr) + (_off))))
+ bfa_os_swap32(readl(((_raddr) + (_off))))
#define bfa_os_mem_write(_raddr, _off, _val) \
- writel(bfa_os_htonl((_val)), ((_raddr) + (_off)))
+ writel(bfa_os_swap32((_val)), ((_raddr) + (_off)))
#define BFA_TRC_TS(_trcm) \
({ \
--
1.6.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] bfa: fix compilation warning in powerpc (resend)
2010-04-13 19:22 [PATCH] bfa: fix compilation warning in powerpc (resend) Jing Huang
@ 2010-04-21 23:12 ` Andrew Morton
2010-04-22 19:50 ` Jing Huang
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2010-04-21 23:12 UTC (permalink / raw)
To: Jing Huang
Cc: sfr, James.Bottomley, linux-next, linux-kernel, linux-scsi,
kgudipat, rvadivel, vravindr
On Tue, 13 Apr 2010 12:22:29 -0700
Jing Huang <huangj@Brocade.com> wrote:
> Fix the compilation warning in powerpc.
When fixing a warning, please quote that warning in the patch description!
<does a cross-build>
It seems that you're referring to this:
drivers/scsi/bfa/bfa_ioc.c: In function 'bfa_ioc_msgget':
drivers/scsi/bfa/bfa_ioc.c:1331: warning: value computed is not used
drivers/scsi/bfa/bfa_ioc_ct.c: In function 'bfa_ioc_ct_notify_hbfail':
drivers/scsi/bfa/bfa_ioc_ct.c:177: warning: value computed is not used
drivers/scsi/bfa/bfa_ioc_ct.c:180: warning: value computed is not used
drivers/scsi/bfa/bfa_ioc_ct.c: In function 'bfa_ioc_ct_pll_init':
drivers/scsi/bfa/bfa_ioc_ct.c:381: warning: value computed is not used
drivers/scsi/bfa/bfa_ioc_ct.c: In function 'bfa_ioc_ct_ownership_reset':
drivers/scsi/bfa/bfa_ioc_ct.c:421: warning: value computed is not used
drivers/scsi/bfa/bfa_ioc_cb.c: In function 'bfa_ioc_cb_notify_hbfail':
drivers/scsi/bfa/bfa_ioc_cb.c:99: warning: value computed is not used
drivers/scsi/bfa/bfa_ioc_cb.c: In function 'bfa_ioc_cb_ownership_reset':
drivers/scsi/bfa/bfa_ioc_cb.c:272: warning: value computed is not used
> The same change also fixes endian
> issue we found in powerpc test.
When fixing a bug, please fully describe the bug!
If this driver has "endian issues" on powerpc then it's quite possible
that this is a running-around-with-hair-on-fire,
must-backport-to-2.6.33.x bugfix.
But how would I know? You didn't tell me!
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] bfa: fix compilation warning in powerpc (resend)
2010-04-21 23:12 ` Andrew Morton
@ 2010-04-22 19:50 ` Jing Huang
0 siblings, 0 replies; 3+ messages in thread
From: Jing Huang @ 2010-04-22 19:50 UTC (permalink / raw)
To: Andrew Morton
Cc: sfr@canb.auug.org.au, James.Bottomley@suse.de,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, Krishna Gudipati, Ramkumar Vadivelu,
Vinodh Ravindran
>> Fix the compilation warning in powerpc.
>
>When fixing a warning, please quote that warning in the patch description!
>
><does a cross-build>
>
>It seems that you're referring to this:
>
>drivers/scsi/bfa/bfa_ioc.c: In function 'bfa_ioc_msgget':
>drivers/scsi/bfa/bfa_ioc.c:1331: warning: value computed is not used
>drivers/scsi/bfa/bfa_ioc_ct.c: In function 'bfa_ioc_ct_notify_hbfail':
>drivers/scsi/bfa/bfa_ioc_ct.c:177: warning: value computed is not used
>drivers/scsi/bfa/bfa_ioc_ct.c:180: warning: value computed is not used
>drivers/scsi/bfa/bfa_ioc_ct.c: In function 'bfa_ioc_ct_pll_init':
>drivers/scsi/bfa/bfa_ioc_ct.c:381: warning: value computed is not used
>drivers/scsi/bfa/bfa_ioc_ct.c: In function 'bfa_ioc_ct_ownership_reset':
>drivers/scsi/bfa/bfa_ioc_ct.c:421: warning: value computed is not used
>drivers/scsi/bfa/bfa_ioc_cb.c: In function 'bfa_ioc_cb_notify_hbfail':
>drivers/scsi/bfa/bfa_ioc_cb.c:99: warning: value computed is not used
>drivers/scsi/bfa/bfa_ioc_cb.c: In function 'bfa_ioc_cb_ownership_reset':
>drivers/scsi/bfa/bfa_ioc_cb.c:272: warning: value computed is not used
>
>
>> The same change also fixes endian
>> issue we found in powerpc test.
>
>When fixing a bug, please fully describe the bug!
>
>If this driver has "endian issues" on powerpc then it's quite possible
>that this is a running-around-with-hair-on-fire,
>must-backport-to-2.6.33.x bugfix.
>
>But how would I know? You didn't tell me!
>
Hi Andrew,
Sorry about the obscure description of the patch, I will provide detailed
description in the future patch submission.
Yes this patch is intended to fix the compilation warning you listed above.
Regarding the big endian issue I mentioned, basically I remove an
unnecessary word swap in bfa_os_reg_read() and bfa_os_reg_write()
because the kernel provided readl and writel are already doing so. The
compilation warning also goes away after this change. For
bfa_os_mem_read() and bfa_os_mem_write() macros, I add a swap since
these two macros are designed to read/write from/to a memory region
that is in BE format per ASIC spec.
Thanks
Jing
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-22 19:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 19:22 [PATCH] bfa: fix compilation warning in powerpc (resend) Jing Huang
2010-04-21 23:12 ` Andrew Morton
2010-04-22 19:50 ` Jing Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox