lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46640C30.9050808@gmail.com>
Date:	Mon, 04 Jun 2007 14:57:20 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Sergei Shtylyov <sshtylyov@...mvista.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Ingo Korb <ml@...na.de>,
	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	linux-ide@...r.kernel.org
Subject: Re: [PATCH 1/1] ide: ide-generic, add another device exception

Sergei Shtylyov napsal(a):
> Hello.
> 
> Jiri Slaby wrote:
> 
>> diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
>> index f2c5a14..0d51a11 100644
>> --- a/drivers/ide/pci/generic.c
>> +++ b/drivers/ide/pci/generic.c
>> @@ -198,32 +198,41 @@ static ide_pci_device_t generic_chipsets[]
>> __devinitdata = {
>>  static int __devinit generic_init_one(struct pci_dev *dev, const
>> struct pci_device_id *id)
>>  {
>>      ide_pci_device_t *d = &generic_chipsets[id->driver_data];
>> -    u16 command;
>>      int ret = -ENODEV;
>>  
>>      /* Don't use the generic entry unless instructed to do so */
>>      if (id->driver_data == 0 && ide_generic_all == 0)
>>              goto out;
>>  
>> -    if (dev->vendor == PCI_VENDOR_ID_UMC &&
>> -        dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
>> -        (!(PCI_FUNC(dev->devfn) & 1)))
>> -        goto out; /* UM8886A/BF pair */
>> -
>> -    if (dev->vendor == PCI_VENDOR_ID_OPTI &&
>> -        dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
>> -        (!(PCI_FUNC(dev->devfn) & 1)))
>> -        goto out;
>> -
>> -    if (dev->vendor == PCI_VENDOR_ID_JMICRON) {
>> -        if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 &&
>> PCI_FUNC(dev->devfn) != 1)
>> +    switch (dev->vendor) {
>> +    case PCI_VENDOR_ID_UMC:
>> +        if (dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
>> +                !(PCI_FUNC(dev->devfn) & 1))
>> +            goto out; /* UM8886A/BF pair */
>> +        break;
>> +    case PCI_VENDOR_ID_OPTI:
>> +        if (dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
>> +                !(PCI_FUNC(dev->devfn) & 1))
>> +            goto out;
>> +        break;
>> +    case PCI_VENDOR_ID_JMICRON:
>> +        if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 &&
>> +                PCI_FUNC(dev->devfn) != 1)
>> +            goto out;
>> +        break;
>> +    case PCI_VENDOR_ID_NS:
>> +        if (dev->device == PCI_DEVICE_ID_NS_87410 &&
>> +                (dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
>>              goto out;
>> +        break;
>>      }
> 
>   Could you intend the if() conditions carried to another line the way
> they were intended before?

I could, if you tell me the reason.

regards,
-- 
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ