android_kernel_sony_sdm845/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arnd Bergmann 56df2dbea3 bcache: avoid clang -Wunintialized warning
[ Upstream commit 78d4eb8ad9e1d413449d1b7a060f50b6efa81ebd ]

clang has identified a code path in which it thinks a
variable may be unused:

drivers/md/bcache/alloc.c:333:4: error: variable 'bucket' is used uninitialized whenever 'if' condition is false
      [-Werror,-Wsometimes-uninitialized]
                        fifo_pop(&ca->free_inc, bucket);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/md/bcache/util.h:219:27: note: expanded from macro 'fifo_pop'
 #define fifo_pop(fifo, i)       fifo_pop_front(fifo, (i))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/md/bcache/util.h:189:6: note: expanded from macro 'fifo_pop_front'
        if (_r) {                                                       \
            ^~
drivers/md/bcache/alloc.c:343:46: note: uninitialized use occurs here
                        allocator_wait(ca, bch_allocator_push(ca, bucket));
                                                                  ^~~~~~
drivers/md/bcache/alloc.c:287:7: note: expanded from macro 'allocator_wait'
                if (cond)                                               \
                    ^~~~
drivers/md/bcache/alloc.c:333:4: note: remove the 'if' if its condition is always true
                        fifo_pop(&ca->free_inc, bucket);
                        ^
drivers/md/bcache/util.h:219:27: note: expanded from macro 'fifo_pop'
 #define fifo_pop(fifo, i)       fifo_pop_front(fifo, (i))
                                ^
drivers/md/bcache/util.h:189:2: note: expanded from macro 'fifo_pop_front'
        if (_r) {                                                       \
        ^
drivers/md/bcache/alloc.c:331:15: note: initialize the variable 'bucket' to silence this warning
                        long bucket;
                                   ^

This cannot happen in practice because we only enter the loop
if there is at least one element in the list.

Slightly rearranging the code makes this clearer to both the
reader and the compiler, which avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:48:16 -07:00
..
accessibility
acpi x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
amba ARM: amba: Don't read past the end of sysfs "driver_override" buffer 2018-05-01 15:13:08 -07:00
android binder: fix proc->files use-after-free 2018-12-08 13:05:07 +01:00
ata libata: fix using DMA buffers on stack 2019-05-04 08:49:09 +02:00
atm atm: he: fix sign-extension overflow on large shift 2019-02-27 10:06:59 +01:00
auxdisplay
base x86/speculation/mds: Add sysfs reporting for MDS 2019-05-14 19:19:40 +02:00
bcma
block virtio-blk: limit number of hw queues by nr_cpu_ids 2019-05-10 17:52:09 +02:00
bluetooth Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV" 2018-11-27 16:09:40 +01:00
bus bus: arm-cci: remove unnecessary unreachable() 2018-12-05 19:42:41 +01:00
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:29:12 +02:00
char ipmi:ssif: compare block number correctly for multi-part return messages 2019-05-21 18:49:00 +02:00
clk clk: tegra: Fix PLLM programming on Tegra124+ when PMC overrides divider 2019-05-25 18:26:48 +02:00
clocksource clocksource/drivers/exynos_mct: Clear timer interrupt when shutdown 2019-03-23 13:19:46 +01:00
connector
cpufreq sched/cpufreq: Fix kobject memleak 2019-05-31 06:48:15 -07:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:44:55 +01:00
crypto crypto: sun4i-ss - Fix invalid calculation of hash end 2019-05-31 06:48:16 -07:00
dax
dca
devfreq PM / devfreq: Fix potential NULL pointer dereference in governor_store 2018-04-13 19:48:09 +02:00
dio
dma dmaengine: pl330: _stop: clear interrupt status 2019-05-31 06:48:15 -07:00
dma-buf dma-buf: remove redundant initialization of sg_table 2018-06-06 16:44:33 +02:00
edac EDAC, skx_edac: Fix logical channel intermediate decoding 2018-11-13 11:16:56 -08:00
eisa
extcon
firewire firewire-ohci: work around oversized DMA reads on JMicron controllers 2018-05-30 07:50:18 +02:00
firmware efi/memattr: Don't bail on zero VA if it equals the region's PA 2019-04-05 22:29:12 +02:00
fmc
fpga
gpio gpio: of: Fix of_gpiochip_add() error path 2019-05-04 08:49:09 +02:00
gpu gpu: ipu-v3: dp: fix CSC handling 2019-05-16 19:43:43 +02:00
hid HID: input: add mapping for "Toggle Display" key 2019-05-16 19:43:41 +02:00
hsi
hv Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels 2018-12-29 13:40:15 +01:00
hwmon hwmon: (lm80) Fix missing unlock on error in set_fan_div() 2019-02-23 09:05:58 +01:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with IOMMU 2019-05-25 18:26:46 +02:00
i2c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2019-04-05 22:29:05 +02:00
ide ide: pmac: add of_node_put() 2018-12-21 14:11:37 +01:00
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
iio iio: adc: xilinx: fix potential use-after-free on remove 2019-05-16 19:43:40 +02:00
infiniband IB/hfi1: Eliminate opcode tests on mr deref 2019-05-10 17:52:08 +02:00
input Input: synaptics-rmi4 - fix possible double free 2019-05-16 19:43:44 +02:00
iommu iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114 2019-05-25 18:26:48 +02:00
ipack
irqchip MIPS: perf: ath79: Fix perfcount IRQ assignment 2019-05-16 19:43:43 +02:00
isdn mISDN: Check address length before reading address family 2019-05-16 19:43:42 +02:00
leds leds: pca9532: fix a potential NULL pointer dereference 2019-05-04 08:49:10 +02:00
lguest
lightnvm
macintosh macintosh/rack-meter: Convert cputime64_t use to u64 2018-10-20 09:51:32 +02:00
mailbox mailbox: xgene-slimpro: Fix potential NULL pointer dereference 2018-09-09 20:01:19 +02:00
mcb
md bcache: avoid clang -Wunintialized warning 2019-05-31 06:48:16 -07:00
media media: vivid: use vfree() instead of kfree() for dev->bitmap_cap 2019-05-31 06:48:12 -07:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:26:49 +02:00
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:44:55 +01:00
message scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() 2018-05-25 16:13:06 +02:00
mfd mfd: mc13xxx: Fix a missing check of a register-read failure 2019-02-27 10:06:59 +01:00
misc lkdtm: Add tests for NULL pointer dereference 2019-04-20 09:07:53 +02:00
mmc mmc: core: Verify SD bus width 2019-05-31 06:48:13 -07:00
mtd mtd: rawnand: gpmi: fix MX28 bus master lockup problem 2019-02-15 08:07:37 +01:00
net net: cw1200: fix a NULL pointer dereference 2019-05-31 06:48:16 -07:00
nfc spi: ST ST95HF NFC: declare missing of table 2019-05-16 19:43:43 +02:00
ntb ntb_transport: Fix bug with max_mw_size parameter 2018-05-30 07:50:22 +02:00
nubus
nvdimm libnvdimm/namespace: Fix label tracking error 2019-05-31 06:48:11 -07:00
nvme nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-05-08 07:19:08 +02:00
nvmem nvmem: properly handle returned value nvmem_reg_read 2018-08-03 07:55:22 +02:00
of of: add helper to lookup compatible child node 2018-12-01 09:44:21 +01:00
oprofile
parisc parisc: Skip registering LED when running in QEMU 2019-05-25 18:26:45 +02:00
parport parport_pc: fix find_superio io compare code, should use equal test. 2019-03-23 13:19:50 +01:00
pci PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum 2019-05-25 18:26:53 +02:00
pcmcia pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges 2018-11-13 11:16:46 -08:00
perf
phy phy: tegra: remove redundant self assignment of 'map' 2019-02-27 10:07:03 +01:00
pinctrl pinctrl: meson: meson8b: fix the sdxc_a data 1..3 pins 2019-03-23 13:19:43 +01:00
platform platform/x86: sony-laptop: Fix unintentional fall-through 2019-05-16 19:43:40 +02:00
pnp
power power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG 2019-05-25 18:26:56 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
pps
ps3
ptp ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl 2019-02-12 19:44:52 +01:00
pwm pwm: tiehrpwm: Fix disabling of output of PWMs 2018-09-09 20:01:25 +02:00
rapidio
ras
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-05 22:29:14 +02:00
remoteproc
reset reset: make device_reset_optional() really optional 2018-12-08 13:05:08 +01:00
rpmsg rpmsg: smd: fix memory leak on channel create 2018-11-13 11:17:03 -08:00
rtc rtc: 88pm860x: prevent use-after-free on device remove 2019-05-31 06:48:15 -07:00
s390 s390: ctcm: fix ctcm_new_device error return code 2019-05-16 19:43:43 +02:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:11:36 +01:00
scsi scsi: qla2xxx: Fix a qla24xx_enable_msix() error path 2019-05-31 06:48:15 -07:00
sfi
sh
sn
soc soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() 2019-04-20 09:07:53 +02:00
spi spi: pxa2xx: fix SCR (divisor) calculation 2019-05-31 06:48:14 -07:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:48:12 -07:00
staging staging: greybus: power_supply: fix prop-descriptor request size 2019-05-10 17:52:07 +02:00
target scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock 2019-03-23 13:19:47 +01:00
tc TC: Set DMA masks for devices 2018-11-13 11:17:02 -08:00
thermal x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
thunderbolt thunderbolt: Resume control channel after hibernation image is created 2018-04-24 09:34:12 +02:00
tty tty/vt: fix write/write race in ioctl(KDSKBSENT) handler 2019-05-21 18:48:59 +02:00
uio uio: Fix an Oops on load 2018-11-27 16:09:41 +01:00
usb USB: serial: fix unthrottle races 2019-05-16 19:43:40 +02:00
uwb uwb: hwa-rc: fix memory leak at probe 2018-10-03 17:01:42 -07:00
vfio vfio/pci: use correct format characters 2019-05-08 07:19:10 +02:00
vhost vhost: reject zero size iova range 2019-04-27 09:34:40 +02:00
video fbdev: fix WARNING in __alloc_pages_nodemask bug 2019-05-31 06:48:12 -07:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:43:47 +02:00
virtio virtio: Honour 'may_reduce_num' in vring_create_virtqueue 2019-04-17 08:36:47 +02:00
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:48:15 -07:00
watchdog watchdog: sbsa: use 32-bit read for WCV 2018-05-30 07:50:34 +02:00
xen xen: xlate_mmu: add missing header to fix 'W=1' warning 2018-12-17 09:38:34 +01:00
zorro zorro: Set up z->dev.dma_mask for the DMA API 2018-05-30 07:50:44 +02:00
Kconfig
Makefile