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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VdUj+FjRm8YNTqFer_GtuHzB4shk3KwQ0bMgQ7Rvd7uFg@mail.gmail.com>
Date:   Wed, 31 May 2017 21:09:44 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jan Kiszka <jan.kiszka@...mens.com>
Cc:     Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 5/6] stmmac: pci: Use dmi_system_id table for
 retrieving PHY addresses

On Tue, May 30, 2017 at 10:33 AM, Jan Kiszka <jan.kiszka@...mens.com> wrote:
> Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr.

>  struct stmmac_pci_dmi_data {
> -       const char *name;
> -       const char *asset_tag;
> -       unsigned int func;
> +       int func;
>         int phy_addr;
>  };

Can we use the following instead:

struct stmmac_pci_dmi_data {
       unsigned int *func;
       int *phy_addr;
       size_t nfuncs;
};

or something like

struct stmmac_pci_func_data {
       unsigned int func;
       int phy_addr;
};

struct stmmac_pci_dmi_data {
    struct stmmac_pci_func_data *func;
    size_t nfuncs;
};

(Latter would be better since it allows to use ARRAY_SIZE() and less
error prone for possible asymmetrical amount of values in the former)

?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ