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: <CAMRc=Mfo_N75ByOGe0TRxr__ajZ0fdGmzaVu9ig4uSsyMPSOhA@mail.gmail.com>
Date:   Wed, 22 Nov 2023 18:26:27 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Peter Rosin <peda@...ntia.se>
Cc:     Wolfram Sang <wsa@...-dreams.de>, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] eeprom: at24: use of_match_ptr()

On Wed, Nov 22, 2023 at 6:14 PM Peter Rosin <peda@...ntia.se> wrote:
>
>
> 2023-11-22 at 17:57, Bartosz Golaszewski wrote:
> > On Wed, 22 Nov 2023 at 17:41, Peter Rosin <peda@...ntia.se> wrote:
> >>
> >> Hi!
> >>
> >> 2023-11-22 at 16:59, Bartosz Golaszewski wrote:
> >>> -             .of_match_table = at24_of_match,
> >>> +             .of_match_table = of_match_ptr(at24_of_match),
> >>
> >> If you do that, you will need to also add #ifdef CONFIG_OF around the
> >> at24_of_match definition, of you'll trigger a warning about an unused
> >> const variable (for some configs). I think.
> >>
> >> Cheers,
> >> Peter
> >
> > Nope, no warnings even with W=2. This is true for unused functions but
> > unused data structures are just silently removed.
>
> Then I wonder what the difference is from the following?
>
> https://lore.kernel.org/all/202311161306.opyfcoCY-lkp@intel.com/T/#m3a33dc4c3221ae167563bcff70757af776cf07b1
>
> It sure looks like the exact same pattern to me.
> I.e. a static const struct of_device_id paired with of_match_ptr().
>
> CHeers,
> Peter

Ah, we need __maybe_unused here.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ