All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [PATCH v2]ata:ahci.c Fix warning: comparison between 'enum <anonymous>' and 'enum <anonymous>'
Date: Wed, 30 Jun 2010 00:06:43 -0700	[thread overview]
Message-ID: <4C2AED03.7070103@gmail.com> (raw)
In-Reply-To: <4C2AE8FE.3020409@kernel.org>

On 06/29/2010 11:49 PM, Tejun Heo wrote:
> Hello,
>
> On 06/30/2010 08:37 AM, Justin P. Mattock wrote:
>> The below patch fixes a warning message during compiling of the kernel
>>    CC      drivers/ata/ahci.o
>> drivers/ata/ahci.c: In function 'ahci_init_one':
>> drivers/ata/ahci.c:1045:2: warning: comparison between 'enum<anonymous>' and 'enum<anonymous>'
>>
>>   Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>
> Hmm, is this something we wanna go around the kernel and updating
> sources?  Or should we just flick a gcc option?
>

the flick a gcc option seems easier todo, but my guess its probably not 
the right way of dealing with the issue(even a warning).

>> @@ -1038,11 +1038,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>>   	struct device *dev =&pdev->dev;
>>   	struct ahci_host_priv *hpriv;
>>   	struct ata_host *host;
>> -	int n_ports, i, rc;
>> +	int n_ports, i, rc, sum = AHCI_MAX_CMDS;
>>
>>   	VPRINTK("ENTER\n");
>>
>> -	WARN_ON(ATA_MAX_QUEUE>  AHCI_MAX_CMDS);
>> +	WARN_ON(ATA_MAX_QUEUE>  sum);
>
> And, just do WARN_ON((int)ATA_MAX_QUEUE>  (int)AHCI_MAX_CMDS)
>
> Thanks.
>

that builds clean. keep in mind I just compile tested, no rebooting or 
anything. Should I just resend with what you posted, and call it that, 
or is this something that needs more?

Justin P. Mattock

  reply	other threads:[~2010-06-30  7:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30  6:37 [PATCH v2]ata:ahci.c Fix warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' Justin P. Mattock
2010-06-30  6:49 ` Tejun Heo
2010-06-30  7:06   ` Justin P. Mattock [this message]
2010-06-30  7:11     ` Tejun Heo
2010-06-30  7:21       ` Justin P. Mattock
2010-07-03  9:57         ` Tejun Heo
2010-07-03 14:32           ` Justin P. Mattock
2010-07-03 14:39           ` Justin P. Mattock

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=4C2AED03.7070103@gmail.com \
    --to=justinmattock@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.org \
    /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 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.