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: <CADYN=9K5zPmsXOd8N1X9vKRAkKF7nfZXOLMvYNGwLEE9gzJeRA@mail.gmail.com>
Date:   Thu, 26 Jul 2018 09:21:27 +0200
From:   Anders Roxell <anders.roxell@...aro.org>
To:     Mark Fasheh <mark@...heh.com>, Joel Becker <jlbec@...lplan.org>
Cc:     ocfs2-devel@....oracle.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs/ocfs2/dlmglue: lockdep_keys defined but not used

On Wed, 4 Jul 2018 at 11:53, Anders Roxell <anders.roxell@...aro.org> wrote:
>
> When CONFIG_DEBUG_LOCK_ALLOC isn't enabled lockdep_keys isn't used and
> we get a warning:
> fs/ocfs2/dlmglue.c:99:30: warning: ‘lockdep_keys’ defined but not used
>     [-Wunused-variable]
>  static struct lock_class_key lockdep_keys[OCFS2_NUM_LOCK_TYPES];
>                               ^~~~~~~~~~~~
> Adding __maybe_unused to the declaration hids the warning.
>
> Fixes: 1cd75cdb8fbb ("ocfs2: make several functions and variables static (and some const)")
> Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
> ---
>  fs/ocfs2/dlmglue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index 040ddb6e7dab..160e0b224367 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -96,7 +96,7 @@ struct ocfs2_unblock_ctl {
>  };
>
>  /* Lockdep class keys */
> -static struct lock_class_key lockdep_keys[OCFS2_NUM_LOCK_TYPES];
> +static struct lock_class_key __maybe_unused lockdep_keys[OCFS2_NUM_LOCK_TYPES];
>
>  static int ocfs2_check_meta_downconvert(struct ocfs2_lock_res *lockres,
>                                         int new_level);
> --
> 2.18.0
>

Ping.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ