From patchwork Wed Jul 4 09:53:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 141057 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp601891ljj; Wed, 4 Jul 2018 02:53:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfeoenXUASYeZqlo9KpIshNdlYdr8Zlr9J/zhk2yut7dQVm8F8l0RYPWs+/JLjcWKBAmg5F X-Received: by 2002:a65:4841:: with SMTP id i1-v6mr1255860pgs.75.1530698028706; Wed, 04 Jul 2018 02:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530698028; cv=none; d=google.com; s=arc-20160816; b=0SoSWdKjZRdfuD6mu6OLEUE3jH7Z6dgNCuBCA0nzJ+P1soWPi2mR8tcy7LEnJT6ad4 ySptiu6dGuzI9h0//sovMyhc0fAiE/1T/9IJB+h5nJaTFZmuRn782hFoxUxhJT/esqdO 7p8TzBzY4Yc5C/bRO9jZy6tFte41wkf3O2YdiSn37uSIC+/kCiI3iGlIuhIaZRpDHK51 CwUHU7/ZYYtHY+AudcFYk7aFjBQ2jTuK2VZBs1owY63IjYVVktC78O7MNPWFv2GkdIg9 Nok0EfL1dT7qmK3fHX4Ks91u9fFqGwniOcslDUPppg1Jy4z8yHo+hvWwxe/XbgvAC9kF s5zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=KhCFMQfYszhr7+qkmxc2d6kgcyxhQdTFxe+zevbgli4=; b=eNpVTyFIvVfbHS9hb31OjaBmE9opuplx8xYRqYaRE0pnSxcmrVxsNhtcl1CJ6Lnl8a OTu9m/eo2tukYTzjHisjHpsjIspcYRoc0V0yw7dCPQxWLwI7kiG6cOmwI6AqKO8JjtvC FisJMUKug+DTAZf2MyIFlkgmNBRLfciksxRrdh0DThyE/+iOauNhdPF353u0PDCKM5k2 bGWkVBuZJujbfC0uxLp19gDSW7+EW5eqLaldmmWRV/uuBCicQ2Zz7JUr2iSexiS76cVK EK6QBg7Tg4tHlEIO95qlFMh9CiosdZ90fpUZJM1lGRQAlh5wFSCobxWQrYsx99UAxldp rI7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Rc857/zV"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si3162743plz.379.2018.07.04.02.53.48; Wed, 04 Jul 2018 02:53:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Rc857/zV"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753561AbeGDJxq (ORCPT + 31 others); Wed, 4 Jul 2018 05:53:46 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:42565 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932517AbeGDJxc (ORCPT ); Wed, 4 Jul 2018 05:53:32 -0400 Received: by mail-lj1-f195.google.com with SMTP id 1-v6so3809866ljv.9 for ; Wed, 04 Jul 2018 02:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KhCFMQfYszhr7+qkmxc2d6kgcyxhQdTFxe+zevbgli4=; b=Rc857/zVt4gMebZxO3Sgbe8oggogjBQdwooLrQtBuYUPmdNvqeFiXe8mKZr7VYlzLg NZbRNRw7ypO+1iB7wwFbjtysj+cwfpyIUHogUc3KmbX0ePFQBGVErwJij0QlmcN2voJ9 SHGoFoFE+ukWHSM2uiVe3RCemGlo3B1Psd6ys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KhCFMQfYszhr7+qkmxc2d6kgcyxhQdTFxe+zevbgli4=; b=ntezn27SUaoIm9I6CZWq2v+lqQt6tifQwmyD6lRWrRHhBM7HtoOqL7AkYtBE5rPBnj 3Jy1qGHD/eFX7miFmD9affARkcDksJB21peCz9OHiT4aihYzMYclal3tXlVn7pjlQUsS gkZQ3wtMapiucmO6GHoVLZi5RvLI1BEleut/jtLwtq5/YQcRL4vq5MpZn4EV0Xnw6jcx xbAjxTn0mdcH+w9P3hn3n5Dk5FsGAPSP/S/OQhRU5xz1zzooojg6dwyC5gx1iUwyFSzO IqAxnVW9m6LCDC6ziAAdG8EgDb0fJ7Cd1GHPmXzkSnKAy/XRcbjNlhXcTLS/6iJSL9lg zj/Q== X-Gm-Message-State: APt69E1u8C/15I+SGWG0Y/27h5UgAre/VTnSeO9uhIctRu//Jf14lkBx LcLNNCOvChvYpAjy9fmM9+j5h7LjDao= X-Received: by 2002:a2e:83cf:: with SMTP id s15-v6mr1059307ljh.101.1530698011468; Wed, 04 Jul 2018 02:53:31 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.bbcust.telenor.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id c3-v6sm512331lja.22.2018.07.04.02.53.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 02:53:30 -0700 (PDT) From: Anders Roxell To: mark@fasheh.com, jlbec@evilplan.org Cc: ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] fs/ocfs2/dlmglue: lockdep_keys defined but not used Date: Wed, 4 Jul 2018 11:53:18 +0200 Message-Id: <20180704095318.19218-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/ocfs2/dlmglue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 Acked-by: Geert Uytterhoeven 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);