kernel_samsung_a53x/drivers
Chen-Yu Tsai 87a0cfeac2 pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case logic
[ Upstream commit 9b780fa1ff14663c2e0f07ad098b96b8337f27a4 ]

The current code deals with optional features by testing for the
function pointers and returning -ENOTSUPP if it is not valid. This is
done for multiple pin config settings and results in the code that
handles the supporting cases to get indented by one level. This is
aggrevated by the fact that some features require another level of
conditionals.

Instead of assigning the same error code in all unsupported optional
feature cases, simply have that error code as the default, and break
out of the switch/case block whenever a feature is unsupported, or an
error is returned. This reduces indentation by one level for the useful
code.

Also replace the goto statements with break statements. The result is
the same, as the gotos simply exit the switch/case block, which can
also be achieved with a break statement. With the latter the intent
is clear and easier to understand.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220308100956.2750295-8-wenst@chromium.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Stable-dep-of: 08f66a8edd08 ("pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 11:32:41 +01:00
..
accessibility speakup: Avoid crash on very long word 2024-11-19 11:32:23 +01:00
acpi Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default" 2024-11-19 09:23:14 +01:00
amba
android binder: check offset alignment in binder_get_object() 2024-11-19 11:32:22 +01:00
ata ata: sata_mv: Fix PCI device ID table declaration compilation warning 2024-11-19 09:23:10 +01:00
atm
auxdisplay
base x86/rfds: Mitigate Register File Data Sampling (RFDS) 2024-11-19 09:22:40 +01:00
battery
bcma
block aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-11-19 08:44:37 +01:00
bluetooth Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0bda:0x4853 2024-11-19 11:32:38 +01:00
bts
bus bus: tegra-aconnect: Update dependency to ARCH_TEGRA 2024-11-19 08:44:45 +01:00
cdrom
char
clk clk: Get runtime PM before walking tree during disable_unused 2024-11-19 11:32:22 +01:00
clocksource
connector
counter
cpufreq cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value" 2024-11-19 09:22:38 +01:00
cpuidle
crypto crypto: qat - resolve race condition during AER recovery 2024-11-19 09:22:15 +01:00
dax
dca
devfreq PM / devfreq: Fix buffer overflow in trans_stat_show 2024-11-19 11:32:38 +01:00
dio
dma dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state" 2024-11-19 11:32:41 +01:00
dma-buf
edac
eisa
extcon
fingerprint
firewire
firmware efivarfs: Request at most 512 bytes for variable names 2024-11-19 09:22:41 +01:00
fpga
fsi
gnss
gpio
gpu drm/amdgpu: Fix leak when GPU memory allocation fails 2024-11-19 11:32:39 +01:00
greybus
gud
hid HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up 2024-11-19 11:32:40 +01:00
hsi
hv
hwmon hwmon: (amc6821) add of_match table 2024-11-19 09:22:33 +01:00
hwspinlock
hwtracing
i2c i2c: smbus: fix NULL function pointer dereference 2024-11-19 11:32:40 +01:00
i3c
ide
idle
ifconn
iio
infiniband RDMA/mlx5: Fix port number for counter query in multi-port configuration 2024-11-19 11:32:21 +01:00
input Input: synaptics-rmi4 - fail probing if memory allocation for "phys" fails 2024-11-19 09:23:14 +01:00
interconnect
iommu iommu/vt-d: Allocate local memory for page request queue 2024-11-19 11:32:20 +01:00
ipack
irqchip irqchip/gic-v3-its: Prevent double free on error 2024-11-19 11:32:39 +01:00
isdn
kperfmon
kq/mesh
leds leds: sgm3140: Add missing timer cleanup and flash gpio control 2024-11-19 08:44:56 +01:00
lightnvm
macintosh
mailbox mailbox: imx: fix suspend failue 2024-11-19 11:32:20 +01:00
mcb
md dm integrity: fix out-of-range warning 2024-11-19 09:22:44 +01:00
media media: cec: core: remove length check of Timer Status 2024-11-19 11:32:19 +01:00
memory
memstick
message
mfd mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref 2024-11-19 08:44:54 +01:00
misc eeprom: at24: fix memory corruption race condition 2024-11-19 11:32:41 +01:00
mmc mmc: core: Avoid negative index with array access 2024-11-19 09:22:42 +01:00
most
mtd mtd: diskonchip: work around ubsan link failure 2024-11-19 11:32:40 +01:00
muic
mux
net net: b44: set pause params only when interface is up 2024-11-19 11:32:39 +01:00
nfc NFC: trf7970a: disable all regulators on removal 2024-11-19 11:32:37 +01:00
ntb
nubus
nvdimm
nvme drivers/nvme: Add quirks for device 126f:2262 2024-11-19 09:23:15 +01:00
nvmem nvmem: meson-efuse: fix function pointer type mismatch 2024-11-19 09:22:34 +01:00
of of: dynamic: Synchronize of_changeset_destroy() with the devlink removals 2024-11-19 09:23:10 +01:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-11-19 08:44:49 +01:00
oprofile
parisc
parport
pci Manual Revert: PCI/ASPM: Make Intel DG2 L1 acceptable latency unlimited 2024-11-19 10:37:22 +01:00
pcmcia
perf
phy phy: tegra: xusb: Add API to retrieve the port number of phy 2024-11-19 09:22:34 +01:00
pinctrl pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case logic 2024-11-19 11:32:41 +01:00
platform platform/x86: touchscreen_dmi: Add an extra entry for a variant of the Chuwi Vi8 tablet 2024-11-19 09:23:14 +01:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc remoteproc: stm32: fix phys_addr_t format string 2024-11-19 08:45:00 +01:00
reset
rpmsg
rtc rtc: mt6397: select IRQ_DOMAIN instead of depending on it 2024-11-19 08:44:58 +01:00
s390 s390/zcrypt: fix reference counting on zcrypt card objects 2024-11-19 09:22:35 +01:00
samsung
sbus
scsi scsi: sd: Fix wrong zone_write_granularity value during revalidate 2024-11-19 09:23:16 +01:00
sensorhub
sensors
sfi
sh
siox
slimbus slimbus: core: Remove usage of the deprecated ida_simple_xx() API 2024-11-19 09:22:34 +01:00
soc soc: fsl: qbman: Use raw spinlock for cgr_lock 2024-11-19 09:22:35 +01:00
soundwire
spi spi: spi-mt65xx: Fix NULL pointer access in interrupt handler 2024-11-19 08:45:00 +01:00
spmi
spu_verify
ssb
staging comedi: vmk80xx: fix incomplete endpoint checking 2024-11-19 11:32:22 +01:00
sti
target
tc
tee tee: optee: Fix kernel panic caused by incorrect error handling 2024-11-19 09:22:39 +01:00
thermal
thunderbolt thunderbolt: Fix wake configurations after device unplug 2024-11-19 11:32:22 +01:00
tty serial: mxs-auart: add spinlock around changing cts state 2024-11-19 11:32:38 +01:00
uh
uio
usb usb: Disable USB3 LPM at shutdown 2024-11-19 11:32:23 +01:00
vdpa
vfio vfio/fsl-mc: Block calling interrupt handler without trigger 2024-11-19 09:22:45 +01:00
vhost vhost: Add smp_rmb() in vhost_vq_avail_empty() 2024-11-19 11:32:20 +01:00
vibrator
video fbmon: prevent division by zero in fb_videomode_from_videomode() 2024-11-19 09:23:15 +01:00
virt
virtio virtio: reenable config if freezing device failed 2024-11-19 09:23:15 +01:00
vision
vision3
visorbus
vlynq
vme
w1
watchdog watchdog: stm32_iwdg: initialize default timeout 2024-11-19 08:44:57 +01:00
xen xen/events: close evtchn after mapping cleanup 2024-11-19 09:22:39 +01:00
zorro
Kconfig
Kconfig.variant1
Makefile
Makefile.variant1