Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp136456imm; Thu, 26 Jul 2018 00:23:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeDnUgTrGVJgVibp7/UevZpDRZfoCLeHS7RRdwgzVW2uFtHHW4OSTJoLQBSdKLtdtNk2FSk X-Received: by 2002:a62:3545:: with SMTP id c66-v6mr916756pfa.63.1532589795762; Thu, 26 Jul 2018 00:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532589795; cv=none; d=google.com; s=arc-20160816; b=AB/2yKtA1msT8NWEKMtQKcsS/sjKNq6H9dEMh7d0OV1nTreKDbCbXkfbZA36H7NaVH FVLTA2MNtShS7mMD8iG82UptTboaJZazQ9tCT8KvJeodiV2PapkMw029x+Q+21tL0GCc IdbqC6eOhKfNR8lwaqMPxWazzrzFICbB1pyF1LAmuaw6SKkgzFnZMnrBlLY9BqZHsgRJ Z9WUWga9CkrRpJWtZ9R0jsURIGNFgRLXGclmVbX6if/rMRXUWDc6DMOXtMiasMG2fpE9 iq2fXprKE3lKWdMEkHGlW40uv55vABmPJ/KQ0Hj8RByzdJs/2XVwiptF9BBA7ttWECIG 3xNg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=1EbsPcZcjsDuY1dqnolyh+nbnPm1YrwAKtHrJd32bEs=; b=kxPvwHAkAgeCloK3ClcIOSf7ManVXNVqUHbF1a6KlI1d3MUS8RAfxly5fNjYoYD4xY zLegZ1aocmnjs/H0qiFW1qRCtetje9rqrweYI/elfgHtCcZsVlJpNzniyJVGAgqf50kl OI06pq/fpjOibadd+WJ9nyH11K8K7uqktEPbMcJTNbJoTtxNeij/ltL8VCBFWO6LUrhB fPc1JeCymr9evbW4L0Xnq11yE1mtxeS5hknxT90H9HTrDCtc256I5ibP3Ps5g/w/kQ2k EPTmRsHuHKI7l5s8TOMoKm3II7yaYphjmBopA1d7phJxvL4bLmd+Ku8sbV7aSSYOxcKg lQbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RJvdtN4C; 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 u30-v6si716338pfl.87.2018.07.26.00.23.01; Thu, 26 Jul 2018 00:23:15 -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=RJvdtN4C; 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 S1729123AbeGZIhI (ORCPT + 99 others); Thu, 26 Jul 2018 04:37:08 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:34244 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727847AbeGZIhH (ORCPT ); Thu, 26 Jul 2018 04:37:07 -0400 Received: by mail-yb0-f194.google.com with SMTP id e9-v6so277075ybq.1 for ; Thu, 26 Jul 2018 00:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1EbsPcZcjsDuY1dqnolyh+nbnPm1YrwAKtHrJd32bEs=; b=RJvdtN4CWuaRHatF6HpNHtCIrNB9v4cY413FmJa8CsqVIEHi5xEgqCrkU7bJiRcokS J/sRli/I1iaIXqwyIO8EInKDynFoBV6bMUrZYlad/JNbJKQrwgzaTyPItZqk/pbXhoAn AnrIylS5vdGKPusb0IsZ2IYH9KPFJZI5ZHdlo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1EbsPcZcjsDuY1dqnolyh+nbnPm1YrwAKtHrJd32bEs=; b=TgQUfYO5nJfydGmsBRptARWur/lt7GrUFprdMT3M90nqPKBvFAfHSACMAa9J922Ovx 2RCd+UpohgFySzSPUXaVKSlgODAoVeAvnhU+Dl5HQDEVat26RtVGNuhQVJkkl1Syhjoa v6ktoruKLlCeroyBefR2CIid6P2BPQb5owr/Cy8WWo2CyUJzpSO8kiLqJpWPRBbIYW28 oP+6vPzkoyx00hd8CE1nos0Cx1433dge13rFvkEIT+9ca86r06bOEd+63ttT/Q1c/0cG VrT8eezheV2IMYl47nVU1fxRELroQNaHSZKNqIgQwkzU2XGAeGGfTTJlY9gWbHTooTdd TZvA== X-Gm-Message-State: AOUpUlHYleVLhTIWZl1rqAwYyqULKaipBjunAdg3nT6OSrCcq3APwwa+ oyEwUeQYQXUkp3L6ea3/5D9hkkmId4yU85oh1ERyAQ== X-Received: by 2002:a25:4a85:: with SMTP id x127-v6mr358689yba.135.1532589698127; Thu, 26 Jul 2018 00:21:38 -0700 (PDT) MIME-Version: 1.0 References: <20180704095318.19218-1-anders.roxell@linaro.org> In-Reply-To: <20180704095318.19218-1-anders.roxell@linaro.org> From: Anders Roxell Date: Thu, 26 Jul 2018 09:21:27 +0200 Message-ID: Subject: Re: [PATCH] fs/ocfs2/dlmglue: lockdep_keys defined but not used To: Mark Fasheh , Joel Becker Cc: ocfs2-devel@oss.oracle.com, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Jul 2018 at 11:53, Anders Roxell 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: =E2=80=98lockdep_keys=E2=80=99 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(-) > > 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.