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] [day] [month] [year] [list]
Message-ID: <c64543d3-10ee-c1a0-0010-f352d6fe937b@enpas.org>
Date:   Mon, 29 Jul 2019 12:49:23 +0200
From:   Max <max@...as.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     linux-ide@...r.kernel.org, Linux/m68k <linux-m68k@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ata/pata_buddha: Probe via modalias instead of
 initcall

On 07/29/2019 10:53 AM, Geert Uytterhoeven wrote:
>> +       switch (z->id) {
>> +       case ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA:
>> +       default:
>> +               type = BOARD_BUDDHA;
>> +               break;
>> +       case ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL:
>> +               type = BOARD_CATWEASEL;
>> +               nr_ports++;
>> +               break;
>> +       case ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF:
>> +               type = BOARD_XSURF;
>> +               break;
>> +       }
> 
> Please obtain the type from ent->driver_data instead of using a switch()
> statement...
> 
>> -module_init(pata_buddha_init_one);
>> +static const struct zorro_device_id pata_buddha_zorro_tbl[] = {
>> +       { ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA, },
>> +       { ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL, },
>> +       { ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, },
> 
> ... after storing it in zorro_device_id.driver_data here.


Thanks Geert for your feedback, this is a good idea. I'll make this change.


Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ