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: <CAJZ5v0grw=PcbLcMmaUSU_spdh7W2tSAy0zyw=08H+Ak82NXNA@mail.gmail.com>
Date:   Wed, 9 Nov 2022 12:14:40 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rafael@...nel.org>, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v1 2/2] resource: Convert DEFINE_RES_NAMED() to be
 compound literal

On Wed, Nov 9, 2022 at 11:50 AM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> Currently DEFINE_RES_NAMED() can only be used to fill the static data.
> In some cases it would be convenient to use it as right value in the
> assignment operation. But it can't be done as is, because compiler has
> no clue about the data layout. Converting it to be a compound literal
> allows the above mentioned usage.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Reviewed-by: Rafael J. Wysocki <rafael@...nel.org>

> ---
>  include/linux/ioport.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/ioport.h b/include/linux/ioport.h
> index 27642ca15d93..67d3fb2133b6 100644
> --- a/include/linux/ioport.h
> +++ b/include/linux/ioport.h
> @@ -155,7 +155,7 @@ enum {
>
>  /* helpers to define resources */
>  #define DEFINE_RES_NAMED(_start, _size, _name, _flags)                 \
> -       {                                                               \
> +(struct resource) {                                                    \
>                 .start = (_start),                                      \
>                 .end = (_start) + (_size) - 1,                          \
>                 .name = (_name),                                        \
> --
> 2.35.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ