linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Qian Cai <cai@lca.pw>, Thomas Gleixner <tglx@linutronix.de>,
	Waiman Long <longman@redhat.com>,
	Will Deacon <will.deacon@arm.com>, Will Deacon <will@kernel.org>,
	Yuyang Du <duyuyang@gmail.com>,
	frederic@kernel.org, Ingo Molnar <mingo@kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 097/113] locking/lockdep: Hide unused class variable
Date: Mon, 29 Jul 2019 21:23:04 +0200	[thread overview]
Message-ID: <20190729190718.722179820@linuxfoundation.org> (raw)
In-Reply-To: <20190729190655.455345569@linuxfoundation.org>

[ Upstream commit 68037aa78208f34bda4e5cd76c357f718b838cbb ]

The usage is now hidden in an #ifdef, so we need to move
the variable itself in there as well to avoid this warning:

  kernel/locking/lockdep_proc.c:203:21: error: unused variable 'class' [-Werror,-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qian Cai <cai@lca.pw>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yuyang Du <duyuyang@gmail.com>
Cc: frederic@kernel.org
Fixes: 68d41d8c94a3 ("locking/lockdep: Fix lock used or unused stats error")
Link: https://lkml.kernel.org/r/20190715092809.736834-1-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/locking/lockdep_proc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c
index 6cf288eef670..6fcc4650f0c4 100644
--- a/kernel/locking/lockdep_proc.c
+++ b/kernel/locking/lockdep_proc.c
@@ -200,7 +200,6 @@ static void lockdep_stats_debug_show(struct seq_file *m)
 
 static int lockdep_stats_show(struct seq_file *m, void *v)
 {
-	struct lock_class *class;
 	unsigned long nr_unused = 0, nr_uncategorized = 0,
 		      nr_irq_safe = 0, nr_irq_unsafe = 0,
 		      nr_softirq_safe = 0, nr_softirq_unsafe = 0,
@@ -211,6 +210,8 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
 		      sum_forward_deps = 0;
 
 #ifdef CONFIG_PROVE_LOCKING
+	struct lock_class *class;
+
 	list_for_each_entry(class, &all_lock_classes, lock_entry) {
 
 		if (class->usage_mask == 0)
-- 
2.20.1




  parent reply	other threads:[~2019-07-29 19:44 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 19:21 [PATCH 4.19 000/113] 4.19.63-stable review Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 001/113] hvsock: fix epollout hang from race condition Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 002/113] drm/panel: simple: Fix panel_simple_dsi_probe Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 003/113] iio: adc: stm32-dfsdm: manage the get_irq error case Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 004/113] iio: adc: stm32-dfsdm: missing error case during probe Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 005/113] staging: vt6656: use meaningful error code during buffer allocation Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 006/113] usb: core: hub: Disable hub-initiated U1/U2 Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 007/113] tty: max310x: Fix invalid baudrate divisors calculator Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 008/113] pinctrl: rockchip: fix leaked of_node references Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 009/113] tty: serial: cpm_uart - fix init when SMC is relocated Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 010/113] drm/amd/display: Fill prescale_params->scale for RGB565 Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 011/113] drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 012/113] drm/amd/display: Disable ABM before destroy ABM struct Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 013/113] drm/amdkfd: Fix a potential memory leak Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 014/113] drm/amdkfd: Fix sdma queue map issue Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 015/113] drm/edid: Fix a missing-check bug in drm_load_edid_firmware() Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 016/113] PCI: Return error if cannot probe VF Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 017/113] drm/bridge: tc358767: read display_props in get_modes() Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 018/113] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 019/113] gpu: host1x: Increase maximum DMA segment size Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 020/113] drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 021/113] drm/crc-debugfs: Also sprinkle irqrestore over early exits Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 022/113] memstick: Fix error cleanup path of memstick_init Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 023/113] tty/serial: digicolor: Fix digicolor-usart already registered warning Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 024/113] tty: serial: msm_serial: avoid system lockup condition Greg Kroah-Hartman
2019-07-31 19:05   ` Pavel Machek
2019-07-31 20:34     ` Jorge Ramirez
2019-08-15  7:07       ` Pavel Machek
2019-07-29 19:21 ` [PATCH 4.19 025/113] serial: 8250: Fix TX interrupt handling condition Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 026/113] drm/amd/display: Always allocate initial connector state state Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 027/113] drm/virtio: Add memory barriers for capset cache Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 028/113] phy: renesas: rcar-gen2: Fix memory leak at error paths Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 029/113] drm/amd/display: fix compilation error Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 030/113] powerpc/pseries/mobility: prevent cpu hotplug during DT update Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 031/113] drm/rockchip: Properly adjust to a true clock in adjusted_mode Greg Kroah-Hartman
2019-07-29 19:21 ` [PATCH 4.19 032/113] serial: imx: fix locking in set_termios() Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 033/113] tty: serial_core: Set port active bit in uart_port_activate Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 034/113] usb: gadget: Zero ffs_io_data Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 035/113] mmc: sdhci: sdhci-pci-o2micro: Check if controller supports 8-bit width Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 036/113] powerpc/pci/of: Fix OF flags parsing for 64bit BARs Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 037/113] drm/msm: Depopulate platform on probe failure Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 038/113] serial: mctrl_gpio: Check if GPIO property exisits before requesting it Greg Kroah-Hartman
2019-07-31 18:19   ` Pavel Machek
2019-07-29 19:22 ` [PATCH 4.19 039/113] PCI: sysfs: Ignore lockdep for remove attribute Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 040/113] i2c: stm32f7: fix the get_irq error cases Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 041/113] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 042/113] genksyms: Teach parser about 128-bit built-in types Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 043/113] PCI: xilinx-nwl: Fix Multi MSI data programming Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 044/113] iio: iio-utils: Fix possible incorrect mask calculation Greg Kroah-Hartman
2019-07-30 18:51   ` Pavel Machek
2019-07-29 19:22 ` [PATCH 4.19 045/113] powerpc/cacheflush: fix variable set but not used Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 046/113] powerpc/xmon: Fix disabling tracing while in xmon Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 047/113] recordmcount: Fix spurious mcount entries on powerpc Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 048/113] mfd: madera: Add missing of table registration Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 049/113] mfd: core: Set fwnode for created devices Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 050/113] mfd: arizona: Fix undefined behavior Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 051/113] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 052/113] mm/swap: fix release_pages() when releasing devmap pages Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 053/113] um: Silence lockdep complaint about mmap_sem Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 054/113] powerpc/4xx/uic: clear pending interrupt after irq type/pol change Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 055/113] RDMA/i40iw: Set queue pair state when being queried Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 056/113] serial: sh-sci: Terminate TX DMA during buffer flushing Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 057/113] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 058/113] IB/mlx5: Fixed reporting counters on 2nd port for Dual port RoCE Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 059/113] powerpc/mm: Handle page table allocation failures Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 060/113] IB/ipoib: Add child to parent list only if device initialized Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 061/113] arm64: assembler: Switch ESB-instruction with a vanilla nop if !ARM64_HAS_RAS Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 062/113] PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 063/113] PCI: mobiveil: Fix the Class Code field Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 064/113] kallsyms: exclude kasan local symbols on s390 Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 065/113] PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 066/113] PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 067/113] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 068/113] perf stat: Fix use-after-freed pointer detected by the smatch tool Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 069/113] perf top: Fix potential NULL pointer dereference " Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 070/113] perf session: Fix potential NULL pointer dereference found " Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 071/113] perf annotate: Fix dereferencing freed memory " Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 072/113] perf hists browser: Fix potential NULL pointer dereference " Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 073/113] RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 074/113] PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 075/113] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 076/113] block: init flush rq ref count to 1 Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 077/113] f2fs: avoid out-of-range memory access Greg Kroah-Hartman
2019-07-31 19:11   ` Pavel Machek
2019-08-01  1:19     ` Chao Yu
2019-07-29 19:22 ` [PATCH 4.19 078/113] mailbox: handle failed named mailbox channel request Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 079/113] dlm: check if workqueues are NULL before flushing/destroying Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 080/113] powerpc/eeh: Handle hugepages in ioremap space Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 081/113] block/bio-integrity: fix a memory leak bug Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 082/113] sh: prevent warnings when using iounmap Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 083/113] mm/kmemleak.c: fix check for softirq context Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 084/113] 9p: pass the correct prototype to read_cache_page Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 085/113] mm/gup.c: mark undo_dev_pagemap as __maybe_unused Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 086/113] mm/gup.c: remove some BUG_ONs from get_gate_page() Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 087/113] memcg, fsnotify: no oom-kill for remote memcg charging Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 088/113] mm/mmu_notifier: use hlist_add_head_rcu() Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 089/113] proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 090/113] proc: use down_read_killable mmap_sem for /proc/pid/pagemap Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 091/113] proc: use down_read_killable mmap_sem for /proc/pid/clear_refs Greg Kroah-Hartman
2019-07-29 19:22 ` [PATCH 4.19 092/113] proc: use down_read_killable mmap_sem for /proc/pid/map_files Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 093/113] cxgb4: reduce kernel stack usage in cudbg_collect_mem_region() Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 094/113] proc: use down_read_killable mmap_sem for /proc/pid/maps Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 095/113] locking/lockdep: Fix lock used or unused stats error Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 096/113] mm: use down_read_killable for locking mmap_sem in access_remote_vm Greg Kroah-Hartman
2019-07-29 19:23 ` Greg Kroah-Hartman [this message]
2019-07-29 19:23 ` [PATCH 4.19 098/113] usb: wusbcore: fix unbalanced get/put cluster_id Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 099/113] usb: pci-quirks: Correct AMD PLL quirk detection Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 100/113] btrfs: inode: Dont compress if NODATASUM or NODATACOW set Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 101/113] x86/sysfb_efi: Add quirks for some devices with swapped width and height Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 102/113] x86/speculation/mds: Apply more accurate check on hypervisor platform Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 103/113] binder: prevent transactions to context manager from its own process Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 104/113] fpga-manager: altera-ps-spi: Fix build error Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 105/113] mei: me: add mule creek canyon (EHL) device ids Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 106/113] hpet: Fix division by zero in hpet_time_div() Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 107/113] ALSA: ac97: Fix double free of ac97_codec_device Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 108/113] ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1 Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 109/113] ALSA: hda - Add a conexant codec entry to let mute led work Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 110/113] powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask() Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 111/113] powerpc/tm: Fix oops on sigreturn on systems without TM Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 112/113] libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl() Greg Kroah-Hartman
2019-07-31 18:14   ` Pavel Machek
2019-07-31 19:31     ` Dan Williams
2019-08-01  8:47       ` Greg Kroah-Hartman
2019-07-29 19:23 ` [PATCH 4.19 113/113] access: avoid the RCU grace period for the temporary subjective credentials Greg Kroah-Hartman
2019-07-30  2:34 ` [PATCH 4.19 000/113] 4.19.63-stable review kernelci.org bot
2019-07-30  9:11 ` Naresh Kamboju
2019-07-30 14:00 ` shuah
2019-07-30 18:42 ` Guenter Roeck
2019-07-31  5:30 ` Kelsey Skunberg
2019-07-31  9:35 ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729190718.722179820@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bvanassche@acm.org \
    --cc=cai@lca.pw \
    --cc=duyuyang@gmail.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).