linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tony@bakeyournoodle.com (Tony Breeds)
To: Gabriel C <nix.or.die@googlemail.com>
Cc: rolandd@cisco.com,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	general@lists.openfabrics.org, sean.hefty@intel.com,
	hal.rosenstock@gmail.com, linux-next@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: linux-next: [PATCH] infiniband/hw/ipath/ipath_sdma.c , fix compiler warnings
Date: Thu, 22 May 2008 10:23:35 +1000	[thread overview]
Message-ID: <20080522002335.GG20457@bakeyournoodle.com> (raw)
In-Reply-To: <48342C6C.2010502@googlemail.com>

On Wed, May 21, 2008 at 04:06:36PM +0200, Gabriel C wrote:
> On linux-next from today , allmodconfig, I see the following warnings on 64bit:

x86_64 right?

<snip>

> diff --git a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c
> index 3697449..5f80151 100644
> --- a/drivers/infiniband/hw/ipath/ipath_sdma.c
> +++ b/drivers/infiniband/hw/ipath/ipath_sdma.c
> @@ -257,7 +257,7 @@ static void sdma_abort_task(unsigned long opaque)
>  	/* everything is stopped, time to clean up and restart */
>  	if (status == IPATH_SDMA_ABORT_ABORTED) {
>  		struct ipath_sdma_txreq *txp, *txpnext;
> -		u64 hwstatus;
> +		unsigned long hwstatus;
>  		int notify = 0;
>  
>  		hwstatus = ipath_read_kreg64(dd,

This can't be right.  hwstatus needs to be u64, as that's what ipath_read_kreg64() retuns.
and a little bit further down we see:

---
if (/* ScoreBoardDrainInProg */
    test_bit(63, &hwstatus) ||
    /* AbortInProg */
    test_bit(62, &hwstatus) ||
    /* InternalSDmaEnable */
    test_bit(61, &hwstatus) ||
---

so hwstatus, clearly needs to be 64-bits.  This brings up an interesting
point.  test_bit() and co are essntally expecting to be passed the address
of an unsigned long[], so is it correct to pass &u64?

Yours Tony

  linux.conf.au    http://www.marchsouth.org/
  Jan 19 - 24 2009 The Australian Linux Technical Conference!


  parent reply	other threads:[~2008-05-22  0:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 14:06 linux-next: [PATCH] infiniband/hw/ipath/ipath_sdma.c , fix compiler warnings Gabriel C
2008-05-22  0:17 ` Stephen Rothwell
2008-05-22  1:45   ` [ofa-general] " Gabriel C
2008-05-22  0:23 ` Tony Breeds [this message]
2008-05-22  2:39   ` Gabriel C
2008-05-22  2:42   ` [ofa-general] " Gabriel C
2008-05-23 17:42 ` Roland Dreier
2008-05-23 21:45   ` Ralph Campbell
2008-05-26 22:21     ` Roland Dreier

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=20080522002335.GG20457@bakeyournoodle.com \
    --to=tony@bakeyournoodle.com \
    --cc=akpm@linux-foundation.org \
    --cc=general@lists.openfabrics.org \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=nix.or.die@googlemail.com \
    --cc=rolandd@cisco.com \
    --cc=sean.hefty@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).