linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Brett Russ <russb@emc.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH libata-2.6] AHCI: compiler warning fix
Date: Wed, 23 Mar 2005 00:15:14 -0500	[thread overview]
Message-ID: <4240FB62.7080208@pobox.com> (raw)
In-Reply-To: <20050311212108.4BB4514FB1@lns1032.lss.emc.com>

Brett Russ wrote:
> This fixes the compile warning below, which seems due to the enum
> being signed:
> drivers/scsi/ahci.c:199: warning: overflow in implicit constant
> conversion
> 
> Signed-off-by: Brett Russ <russb@emc.com>
> 
> ===== drivers/scsi/ahci.c 1.17 vs edited =====
> --- 1.17/drivers/scsi/ahci.c	Thu Feb 24 14:52:41 2005
> +++ edited/drivers/scsi/ahci.c	Wed Mar  9 17:29:36 2005
> @@ -44,7 +44,6 @@
>  enum {
>  	AHCI_PCI_BAR		= 5,
>  	AHCI_MAX_SG		= 168, /* hardware max is 64K */
> -	AHCI_DMA_BOUNDARY	= 0xffffffff,
>  	AHCI_USE_CLUSTERING	= 0,
>  	AHCI_CMD_SLOT_SZ	= 32 * 32,
>  	AHCI_RX_FIS_SZ		= 256,
> @@ -135,6 +134,8 @@
>  	PORT_CMD_ICC_SLUMBER	= (0x6 << 28), /* Put i/f in slumber state */
>  };
>  
> +#define AHCI_DMA_BOUNDARY	0xffffffff
> +

I really don't like defines.  They aren't visible to debuggers and other 
post-cpp checking tools.

It should kill the warning if you move it into a separate enum, and add 
a UL suffix to the constant, I should think?

	Jeff




  parent reply	other threads:[~2005-03-23  5:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11 21:21 [PATCH libata-2.6] AHCI: compiler warning fix Brett Russ
2005-03-12  4:58 ` Jeff Garzik
2005-03-23  5:15 ` Jeff Garzik [this message]
2005-03-23 22:01   ` Brett Russ

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=4240FB62.7080208@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=russb@emc.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).