Skip to contentSkip to conversation

Linux 5.15.195

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Oct 19, 2025 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.15.195 kernel.

All users of the 5.15 kernel series must upgrade.

The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/admin-guide/kernel-parameters.txt                       |    3 
 Documentation/gpu/todo.rst                                            |   11 
 Documentation/trace/histogram-design.rst                              |    4 
 Makefile                                                              |    2 
 arch/arm/mach-at91/pm_suspend.S                                       |    4 
 arch/arm/mach-omap2/pm33xx-core.c                                     |    6 
 arch/arm/mm/pageattr.c                                                |    6 
 arch/arm64/boot/dts/mediatek/mt8516-pumpkin.dts                       |    2 
 arch/arm64/boot/dts/qcom/msm8916.dtsi                                 |    2 
 arch/arm64/boot/dts/qcom/sdm845.dtsi                                  |    4 
 arch/arm64/kernel/cpufeature.c                                        |   10 
 arch/arm64/kernel/fpsimd.c                                            |    8 
 arch/arm64/kernel/mte.c                                               |    3 
 arch/parisc/include/uapi/asm/ioctls.h                                 |    8 
 arch/powerpc/platforms/powernv/pci-ioda.c                             |    2 
 arch/powerpc/platforms/pseries/msi.c                                  |    2 
 arch/sparc/kernel/of_device_32.c                                      |    1 
 arch/sparc/kernel/of_device_64.c                                      |    1 
 arch/sparc/lib/M7memcpy.S                                             |   20 
 arch/sparc/lib/Memcpy_utils.S                                         |    9 
 arch/sparc/lib/NG4memcpy.S                                            |    2 
 arch/sparc/lib/NGmemcpy.S                                             |   29 -
 arch/sparc/lib/U1memcpy.S                                             |   19 
 arch/sparc/lib/U3memcpy.S                                             |    2 
 arch/sparc/mm/hugetlbpage.c                                           |   20 
 arch/um/drivers/mconsole_user.c                                       |    2 
 arch/x86/include/asm/segment.h                                        |    8 
 arch/x86/kernel/umip.c                                                |   15 
 arch/x86/kvm/emulate.c                                                |   11 
 arch/x86/kvm/kvm_emulate.h                                            |    2 
 arch/x86/kvm/x86.c                                                    |    9 
 arch/x86/mm/pgtable.c                                                 |    2 
 block/blk-mq-sysfs.c                                                  |    6 
 block/blk-settings.c                                                  |    3 
 crypto/essiv.c                                                        |   14 
 crypto/rng.c                                                          |    8 
 drivers/acpi/acpi_dbg.c                                               |   26 
 drivers/acpi/acpi_tad.c                                               |    3 
 drivers/acpi/nfit/core.c                                              |    2 
 drivers/acpi/processor_idle.c                                         |    3 
 drivers/base/node.c                                                   |    4 
 drivers/base/power/main.c                                             |   14 
 drivers/base/regmap/regmap.c                                          |    2 
 drivers/bus/fsl-mc/fsl-mc-bus.c                                       |    3 
 drivers/bus/mhi/host/init.c                                           |    5 
 drivers/char/hw_random/ks-sa-rng.c                                    |    4 
 drivers/char/tpm/tpm_tis_core.c                                       |    4 
 drivers/clk/at91/clk-peripheral.c                                     |    7 
 drivers/clk/nxp/clk-lpc18xx-cgu.c                                     |   20 
 drivers/clocksource/clps711x-timer.c                                  |   23 
 drivers/cpufreq/intel_pstate.c                                        |    8 
 drivers/cpufreq/scmi-cpufreq.c                                        |   10 
 drivers/cpufreq/tegra186-cpufreq.c                                    |    8 
 drivers/crypto/atmel-tdes.c                                           |    2 
 drivers/dma/ioat/dma.c                                                |   12 
 drivers/edac/sb_edac.c                                                |    4 
 drivers/edac/skx_common.h                                             |    1 
 drivers/firmware/meson/Kconfig                                        |    2 
 drivers/firmware/meson/meson_sm.c                                     |    7 
 drivers/gpio/gpio-wcd934x.c                                           |    3 
 drivers/gpu/drm/amd/amdgpu/amdgpu.h                                   |    2 
 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c                                 |   29 -
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c                                  |    2 
 drivers/gpu/drm/amd/display/dc/dce/dce_transform.c                    |   21 
 drivers/gpu/drm/amd/display/dc/dce/dce_transform.h                    |    4 
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c                   |    2 
 drivers/gpu/drm/amd/include/asic_reg/dce/dce_6_0_d.h                  |    7 
 drivers/gpu/drm/amd/include/asic_reg/dce/dce_6_0_sh_mask.h            |    2 
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h                    |   14 
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c               |    2 
 drivers/gpu/drm/arm/display/include/malidp_utils.h                    |    2 
 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c            |   24 
 drivers/gpu/drm/drm_color_mgmt.c                                      |    2 
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c                                 |    6 
 drivers/gpu/drm/nouveau/nouveau_bo.c                                  |    2 
 drivers/gpu/drm/radeon/evergreen_cs.c                                 |    2 
 drivers/gpu/drm/radeon/r600_cs.c                                      |    4 
 drivers/gpu/drm/vmwgfx/Makefile                                       |    2 
 drivers/gpu/drm/vmwgfx/ttm_object.c                                   |   52 -
 drivers/gpu/drm/vmwgfx/ttm_object.h                                   |    3 
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c                            |   24 
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c                                   |    2 
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h                                   |    6 
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c                               |    2 
 drivers/gpu/drm/vmwgfx/vmwgfx_hashtab.c                               |  199 +++++++
 drivers/gpu/drm/vmwgfx/vmwgfx_hashtab.h                               |   83 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.c                            |   26 
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.h                            |    7 
 drivers/hid/hid-mcp2221.c                                             |    4 
 drivers/hwmon/adt7475.c                                               |   24 
 drivers/hwtracing/coresight/coresight-trbe.c                          |    9 
 drivers/i2c/busses/i2c-designware-platdrv.c                           |    1 
 drivers/i2c/busses/i2c-mt65xx.c                                       |   17 
 drivers/i3c/master/svc-i3c-master.c                                   |    1 
 drivers/iio/dac/ad5360.c                                              |    2 
 drivers/iio/dac/ad5421.c                                              |    2 
 drivers/iio/frequency/adf4350.c                                       |   20 
 drivers/iio/imu/inv_icm42600/inv_icm42600_core.c                      |    4 
 drivers/iio/inkern.c                                                  |    2 
 drivers/infiniband/core/addr.c                                        |   10 
 drivers/infiniband/core/cm.c                                          |    4 
 drivers/infiniband/core/sa_query.c                                    |    6 
 drivers/infiniband/sw/siw/siw_verbs.c                                 |   25 
 drivers/input/misc/uinput.c                                           |    1 
 drivers/input/touchscreen/atmel_mxt_ts.c                              |    2 
 drivers/input/touchscreen/cyttsp4_core.c                              |    2 
 drivers/iommu/amd/iommu.c                                             |    3 
 drivers/iommu/intel/iommu.c                                           |    2 
 drivers/irqchip/irq-sun6i-r.c                                         |    2 
 drivers/mailbox/zynqmp-ipi-mailbox.c                                  |    7 
 drivers/md/dm-integrity.c                                             |    6 
 drivers/md/dm.c                                                       |    7 
 drivers/media/dvb-frontends/stv0367_priv.h                            |    3 
 drivers/media/i2c/mt9v111.c                                           |    2 
 drivers/media/i2c/rj54n1cb0c.c                                        |    9 
 drivers/media/i2c/tc358743.c                                          |    4 
 drivers/media/mc/mc-devnode.c                                         |    6 
 drivers/media/pci/b2c2/flexcop-pci.c                                  |    2 
 drivers/media/pci/cobalt/cobalt-driver.c                              |    4 
 drivers/media/pci/cx18/cx18-driver.c                                  |    2 
 drivers/media/pci/cx18/cx18-queue.c                                   |   20 
 drivers/media/pci/cx18/cx18-streams.c                                 |   16 
 drivers/media/pci/ddbridge/ddbridge-main.c                            |    4 
 drivers/media/pci/intel/ipu3/ipu3-cio2-main.c                         |    2 
 drivers/media/pci/ivtv/ivtv-driver.c                                  |    2 
 drivers/media/pci/ivtv/ivtv-irq.c                                     |    2 
 drivers/media/pci/ivtv/ivtv-queue.c                                   |   18 
 drivers/media/pci/ivtv/ivtv-streams.c                                 |   22 
 drivers/media/pci/ivtv/ivtv-udma.c                                    |   27 -
 drivers/media/pci/ivtv/ivtv-yuv.c                                     |   24 
 drivers/media/pci/ivtv/ivtvfb.c                                       |    6 
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c                    |    2 
 drivers/media/pci/pluto2/pluto2.c                                     |   20 
 drivers/media/pci/pt1/pt1.c                                           |    2 
 drivers/media/pci/tw5864/tw5864-core.c                                |    2 
 drivers/media/rc/imon.c                                               |   27 -
 drivers/media/tuners/xc5000.c                                         |   41 -
 drivers/memory/samsung/exynos-srom.c                                  |   10 
 drivers/mfd/intel_soc_pmic_chtdc_ti.c                                 |    5 
 drivers/mfd/vexpress-sysreg.c                                         |    6 
 drivers/misc/genwqe/card_ddcb.c                                       |    2 
 drivers/mmc/core/sdio.c                                               |    6 
 drivers/mtd/nand/raw/fsmc_nand.c                                      |    6 
 drivers/net/ethernet/amazon/ena/ena_ethtool.c                         |    5 
 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c                       |   18 
 drivers/net/ethernet/dlink/dl2k.c                                     |    7 
 drivers/net/ethernet/freescale/fsl_pq_mdio.c                          |    2 
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c                        |    2 
 drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.h              |   12 
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c                     |   17 
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c                  |    2 
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c                     |    2 
 drivers/net/fjes/fjes_main.c                                          |    4 
 drivers/net/usb/asix_devices.c                                        |   35 +
 drivers/net/usb/rtl8150.c                                             |    2 
 drivers/net/wireless/ath/ath10k/wmi.c                                 |   39 -
 drivers/net/wireless/marvell/mwifiex/cfg80211.c                       |    7 
 drivers/net/wireless/mediatek/mt76/mt7603/soc.c                       |    2 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c                   |    1 
 drivers/nfc/pn544/i2c.c                                               |    2 
 drivers/nvme/host/pci.c                                               |    2 
 drivers/nvme/target/fc.c                                              |   19 
 drivers/pci/controller/dwc/pci-keystone.c                             |    4 
 drivers/pci/controller/dwc/pcie-tegra194.c                            |    4 
 drivers/pci/controller/pci-tegra.c                                    |    2 
 drivers/pci/iov.c                                                     |    5 
 drivers/pci/pci-driver.c                                              |    1 
 drivers/pci/pci-sysfs.c                                               |   20 
 drivers/pci/pcie/aer.c                                                |   12 
 drivers/pci/pcie/err.c                                                |    8 
 drivers/perf/arm_spe_pmu.c                                            |    3 
 drivers/pinctrl/meson/pinctrl-meson-gxl.c                             |   10 
 drivers/pinctrl/pinmux.c                                              |    2 
 drivers/pinctrl/renesas/pinctrl.c                                     |    3 
 drivers/platform/x86/intel/int3472/discrete.c                         |    3 
 drivers/platform/x86/intel/int3472/tps68470.c                         |    3 
 drivers/platform/x86/sony-laptop.c                                    |    1 
 drivers/pps/kapi.c                                                    |    5 
 drivers/pps/pps.c                                                     |    5 
 drivers/pwm/pwm-berlin.c                                              |    4 
 drivers/pwm/pwm-tiehrpwm.c                                            |    4 
 drivers/regulator/scmi-regulator.c                                    |    3 
 drivers/remoteproc/qcom_q6v5.c                                        |    3 
 drivers/rtc/interface.c                                               |   27 +
 drivers/rtc/rtc-x1205.c                                               |    2 
 drivers/s390/cio/device.c                                             |    2 
 drivers/scsi/hpsa.c                                                   |   21 
 drivers/scsi/isci/init.c                                              |    6 
 drivers/scsi/mpt3sas/mpt3sas_transport.c                              |    8 
 drivers/scsi/mvsas/mv_defs.h                                          |    1 
 drivers/scsi/mvsas/mv_init.c                                          |   13 
 drivers/scsi/mvsas/mv_sas.c                                           |   42 -
 drivers/scsi/mvsas/mv_sas.h                                           |    8 
 drivers/scsi/myrs.c                                                   |    8 
 drivers/scsi/pm8001/pm8001_sas.c                                      |    9 
 drivers/scsi/qla2xxx/qla_edif.c                                       |    4 
 drivers/scsi/qla2xxx/qla_init.c                                       |    4 
 drivers/soc/qcom/rpmh-rsc.c                                           |    7 
 drivers/spi/spi-cadence-quadspi.c                                     |    5 
 drivers/staging/axis-fifo/axis-fifo.c                                 |   32 -
 drivers/staging/media/atomisp/pci/hive_isp_css_include/math_support.h |    5 
 drivers/target/target_core_configfs.c                                 |    2 
 drivers/thermal/qcom/Kconfig                                          |    3 
 drivers/thermal/qcom/lmh.c                                            |    2 
 drivers/tty/serial/Kconfig                                            |    2 
 drivers/uio/uio_hv_generic.c                                          |    7 
 drivers/usb/cdns3/cdnsp-pci.c                                         |    5 
 drivers/usb/gadget/configfs.c                                         |    2 
 drivers/usb/host/max3421-hcd.c                                        |    2 
 drivers/usb/host/xhci-ring.c                                          |   11 
 drivers/usb/phy/phy-twl6030-usb.c                                     |    3 
 drivers/usb/serial/option.c                                           |    6 
 drivers/usb/usbip/vhci_hcd.c                                          |   22 
 drivers/virt/acrn/ioreq.c                                             |    4 
 drivers/watchdog/mpc8xxx_wdt.c                                        |    2 
 drivers/xen/events/events_base.c                                      |   20 
 drivers/xen/manage.c                                                  |    3 
 fs/btrfs/export.c                                                     |    8 
 fs/btrfs/extent_io.c                                                  |   14 
 fs/btrfs/misc.h                                                       |    2 
 fs/btrfs/tree-checker.c                                               |    2 
 fs/cramfs/inode.c                                                     |   11 
 fs/erofs/zdata.h                                                      |    2 
 fs/ext2/balloc.c                                                      |    2 
 fs/ext4/ext4.h                                                        |   12 
 fs/ext4/file.c                                                        |    2 
 fs/ext4/fsmap.c                                                       |   14 
 fs/ext4/inode.c                                                       |   12 
 fs/ext4/orphan.c                                                      |   23 
 fs/ext4/super.c                                                       |    4 
 fs/ext4/xattr.c                                                       |   15 
 fs/file.c                                                             |    5 
 fs/fs-writeback.c                                                     |   32 -
 fs/fsopen.c                                                           |   70 +-
 fs/ksmbd/smb2pdu.c                                                    |    3 
 fs/minix/inode.c                                                      |    8 
 fs/namei.c                                                            |    8 
 fs/namespace.c                                                        |   11 
 fs/nfs/nfs4proc.c                                                     |    2 
 fs/nfsd/lockd.c                                                       |   15 
 fs/nfsd/nfs4proc.c                                                    |    2 
 fs/ntfs3/bitmap.c                                                     |    1 
 fs/ntfs3/run.c                                                        |   12 
 fs/ocfs2/stack_user.c                                                 |    1 
 fs/squashfs/inode.c                                                   |   31 +
 fs/squashfs/squashfs_fs_i.h                                           |    2 
 fs/udf/inode.c                                                        |    3 
 fs/ufs/util.h                                                         |    6 
 include/linux/cleanup.h                                               |  171 ++++++
 include/linux/compiler-clang.h                                        |    9 
 include/linux/compiler.h                                              |    9 
 include/linux/compiler_attributes.h                                   |    6 
 include/linux/device.h                                                |   10 
 include/linux/file.h                                                  |    6 
 include/linux/iio/frequency/adf4350.h                                 |    2 
 include/linux/irqflags.h                                              |    7 
 include/linux/minmax.h                                                |  264 +++++++---
 include/linux/mutex.h                                                 |    4 
 include/linux/percpu.h                                                |    4 
 include/linux/preempt.h                                               |   47 +
 include/linux/rcupdate.h                                              |    3 
 include/linux/rwsem.h                                                 |    8 
 include/linux/sched/task.h                                            |    2 
 include/linux/slab.h                                                  |    3 
 include/linux/spinlock.h                                              |   32 +
 include/linux/srcu.h                                                  |    5 
 include/scsi/libsas.h                                                 |   18 
 include/trace/events/filelock.h                                       |    3 
 init/main.c                                                           |   14 
 kernel/bpf/inode.c                                                    |    4 
 kernel/fork.c                                                         |    2 
 kernel/pid.c                                                          |    2 
 kernel/smp.c                                                          |   11 
 kernel/trace/preemptirq_delay_test.c                                  |    2 
 kernel/trace/trace_kprobe.c                                           |   11 
 kernel/trace/trace_probe.h                                            |    9 
 kernel/trace/trace_uprobe.c                                           |   12 
 lib/btree.c                                                           |    1 
 lib/crypto/Makefile                                                   |    4 
 lib/decompress_unlzma.c                                               |    2 
 lib/genalloc.c                                                        |    5 
 lib/logic_pio.c                                                       |    3 
 lib/vsprintf.c                                                        |    2 
 lib/zstd/zstd_internal.h                                              |    2 
 mm/hugetlb.c                                                          |    2 
 mm/page_alloc.c                                                       |    2 
 mm/zsmalloc.c                                                         |    1 
 net/9p/trans_fd.c                                                     |    8 
 net/bluetooth/mgmt.c                                                  |   10 
 net/bridge/br_vlan.c                                                  |    2 
 net/core/filter.c                                                     |   18 
 net/ipv4/proc.c                                                       |    2 
 net/ipv4/tcp.c                                                        |    9 
 net/ipv4/tcp_input.c                                                  |    1 
 net/ipv4/udp.c                                                        |   16 
 net/ipv6/proc.c                                                       |    2 
 net/mptcp/pm.c                                                        |    7 
 net/mptcp/pm_netlink.c                                                |   49 +
 net/mptcp/protocol.h                                                  |    8 
 net/netfilter/ipset/ip_set_hash_gen.h                                 |    8 
 net/netfilter/ipvs/ip_vs_ftp.c                                        |    4 
 net/netfilter/nf_nat_core.c                                           |    6 
 net/nfc/nci/ntf.c                                                     |  135 +++--
 net/sctp/sm_make_chunk.c                                              |    3 
 net/sctp/sm_statefuns.c                                               |    6 
 net/tipc/core.h                                                       |    2 
 net/tipc/link.c                                                       |   10 
 scripts/checkpatch.pl                                                 |    2 
 security/keys/trusted-keys/trusted_tpm1.c                             |    7 
 sound/pci/lx6464es/lx_core.c                                          |    4 
 sound/soc/codecs/wcd934x.c                                            |   30 -
 sound/soc/intel/boards/bytcht_es8316.c                                |   20 
 sound/soc/intel/boards/bytcr_rt5640.c                                 |    7 
 sound/soc/intel/boards/bytcr_rt5651.c                                 |   26 
 tools/build/feature/Makefile                                          |    4 
 tools/include/nolibc/std.h                                            |    2 
 tools/lib/bpf/libbpf.c                                                |   10 
 tools/lib/perf/include/perf/event.h                                   |    1 
 tools/lib/subcmd/help.c                                               |    3 
 tools/perf/tests/perf-record.c                                        |    4 
 tools/perf/util/evsel.c                                               |    2 
 tools/perf/util/lzma.c                                                |    2 
 tools/perf/util/session.c                                             |    2 
 tools/perf/util/zlib.c                                                |    2 
 tools/testing/nvdimm/test/ndtest.c                                    |   13 
 tools/testing/selftests/arm64/pauth/exec_target.c                     |    7 
 tools/testing/selftests/net/mptcp/mptcp_join.sh                       |   10 
 tools/testing/selftests/rseq/rseq.c                                   |    8 
 tools/testing/selftests/vm/mremap_test.c                              |    2 
 tools/testing/selftests/watchdog/watchdog-test.c                      |    6 
 330 files changed, 2535 insertions(+), 1006 deletions(-)

Aaron Kling (1):
cpufreq: tegra186: Set target frequency for all cpus in policy

Abdun Nihaal (1):
wifi: mt76: fix potential memory leak in mt76_wmac_probe()

Adam Xue (1):
bus: mhi: host: Do not use uninitialized 'dev' pointer in mhi_init_irq_setup()

Ahmet Eray Karadag (1):
ext4: guard against EA inode refcount underflow in xattr update

Akhilesh Patil (1):
selftests: watchdog: skip ping loop if WDIOF_KEEPALIVEPING not supported

Aleksa Sarai (1):
fscontext: do not consume log entries when returning -EMSGSIZE

Alex Deucher (1):
drm/amdgpu: Add additional DCE6 SCL registers

Alexandr Sapozhnikov (1):
net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce()

Alok Tiwari (2):
PCI: tegra: Fix devm_kcalloc() argument order for port->phys allocation
clk: nxp: Fix pll0 rate check condition in LPC18xx CGU driver

Amir Mohammad Jahangirzad (1):
ACPI: debug: fix signedness issues in read/write helpers

Anderson Nascimento (1):
btrfs: avoid potential out-of-bounds in btrfs_encode_fh()

Andy Shevchenko (3):
gpio: wcd934x: Remove duplicate assignment of of_gpio_n_cells
mfd: intel_soc_pmic_chtdc_ti: Drop unneeded assignment for cache_type
minmax: deduplicate __unconst_integer_typeof()

AngeloGioacchino Del Regno (1):
arm64: dts: mediatek: mt8516-pumpkin: Fix machine compatible

Anthony Iliopoulos (1):
NFSv4.1: fix backchannel max_resp_sz verification check

Anthony Yznaga (1):
sparc64: fix hugetlb for sun4u

Arnaud Lecomte (1):
hid: fix I2C read buffer overflow in raw_event() for mcp2221

Askar Safin (1):
openat2: don't trigger automounts with RESOLVE_NO_XDEV

Bagas Sanjaya (1):
Documentation: trace: historgram-design: Separate sched_waking histogram section heading and the following diagram

Bala-Vignesh-Reddy (1):
selftests: arm64: Check fread return value in exec_target

Baochen Qiang (1):
wifi: ath10k: avoid unnecessary wait for service ready message

Bartosz Golaszewski (3):
mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data()
pinctrl: check the return value of pinmux_ops::get_function_name()
gpio: wcd934x: mark the GPIO controller as sleeping

Bernard Metzler (1):
RDMA/siw: Always report immediate post SQ errors

Bitterblue Smith (1):

      wifi: rtlwifi: rtl8192cu: Don't claim USB ID 07b8:8188

Brahmajit Das (1):
drm/radeon/r600_cs: clean up of dead code in r600_cs

Brian Masney (2):
clk: at91: peripheral: fix return value
clk: nxp: lpc18xx-cgu: convert from round_rate() to determine_rate()

Brian Norris (1):
PCI/sysfs: Ensure devices are powered for config reads

Catalin Marinas (1):
arm64: mte: Do not flag the zero page as PG_mte_tagged

Christophe JAILLET (2):
media: switch from 'pci_' to 'dma_' API
media: pci/ivtv: switch from 'pci_' to 'dma_' API

Christophe Leroy (1):
watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog

Colin Ian King (2):
misc: genwqe: Fix incorrect cmd field being reported in error
ACPI: NFIT: Fix incorrect ndr_desc being reportedin dev_err message

Cristian Ciocaltea (1):
usb: vhci-hcd: Prevent suspending virtually attached devices

Da Xue (1):
pinctrl: meson-gxl: add missing i2c_d pinmux

Dan Carpenter (4):
usb: host: max3421-hcd: Fix error pointer dereference in probe cleanup
ocfs2: fix double free in user_cluster_connect()
net/mlx4: prevent potential use after free in mlx4_en_do_uc_filter() mm/slab: make __free(kfree) accept error pointers

Daniel Borkmann (1):

      bpf: Fix metadata_dst leak __bpf_redirect_neigh_v{4,6}

Daniel Tang (1):
ACPI: TAD: Add missing sysfs_remove_group() for ACPI_TAD_RT

Daniel Wagner (1):
nvmet-fc: move lsop put work to nvmet_fc_ls_req_op

David Laight (8):
minmax: fix indentation of __cmp_once() and __clamp_once() minmax.h: add whitespace around operators and after commas minmax.h: update some comments
minmax.h: reduce the #define expansion of min(), max() and clamp() minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp() minmax.h: move all the clamp() definitions after the min/max() ones minmax.h: simplify the variants of clamp()
minmax.h: remove some #defines that are only expanded once

Deepak Sharma (1):
net: nfc: nci: Add parameter validation for packet data

Dmitry Baryshkov (2):
thermal/drivers/qcom: Make LMH select QCOM_SCM thermal/drivers/qcom/lmh: Add missing IRQ includes

Donet Tom (2):
drivers/base/node: handle error properly in register_one_node() drivers/base/node: fix double free in register_one_node()

Duoming Zhou (4):
media: b2c2: Fix use-after-free causing by irq_check_work in flexcop_pci_remove
media: tuner: xc5000: Fix use-after-free in xc5000_release
media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe
scsi: mvsas: Fix use-after-free bugs in mvs_work_queue

Edward Adam Davis (1):
media: mc: Clear minor number before put device

Eric Biggers (2):
KEYS: trusted_tpm1: Compare HMAC values in constant time
sctp: Fix MAC comparison to be constant-time

Eric Dumazet (1):
tcp: fix __tcp_close() to only send RST when required

Eric Woudstra (1):
bridge: br_vlan_fill_forward_path_pvid: use br_vlan_group_rcu()

Erick Karanja (1):
net: fsl_pq_mdio: Fix device node reference leak in fsl_pq_mdio_probe

Esben Haabendal (2):
rtc: interface: Ensure alarm irq is enabled when UIE is enabled
rtc: interface: Fix long-standing race when setting alarm

Florian Fainelli (1):
cpufreq: scmi: Account for malformed DT in scmi_dev_used_by_cpus()

Geert Uytterhoeven (1):
regmap: Remove superfluous check for !config in __regmap_init()

Georg Gottleuber (1):
nvme-pci: Add TUXEDO IBS Gen8 to Samsung sleep quirk

Greg Kroah-Hartman (1):

      Linux 5.15.195

Guangshuo Li (1):
nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe()

Gunnar Kudrjavets (1):
tpm_tis: Fix incorrect arguments in tpm_tis_probe_irq_single

Hans de Goede (4):
platform/x86: int3472: Check for adev == NULL
iio: consumers: Fix offset handling in iio_convert_raw_to_processed()
mfd: intel_soc_pmic_chtdc_ti: Fix invalid regmap-config max_register value
mfd: intel_soc_pmic_chtdc_ti: Set use_single_read regmap_config flag

Haoxiang Li (1):
fs/ntfs3: Fix a resource leak bug in wnd_extend()

Harini T (2):
mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister() call
mailbox: zynqmp-ipi: Remove dev.parent check in zynqmp_ipi_free_mboxes

Herbert Xu (2):
crypto: rng - Ensure set_ent is always present
crypto: essiv - Check ssize for decryption and in-place encryption

Herve Codina (1):
minmax: Introduce {min,max}_array()

Huacai Chen (1):
init: handle bootloader identifier in kernel parameters

Huisong Li (1):
ACPI: processor: idle: Fix memory leak when register cpuidle device failed

Håkon Bugge (1):
RDMA/cm: Rate limit destroy CM ID timeout error message

I Viswanath (1):
net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast

Ian Forbes (1):
drm/vmwgfx: Fix Use-after-free in validation

Ian Rogers (3):
perf evsel: Avoid container_of on a NULL leader libperf event: Ensure tracing data is multiple of 8 sized perf test: Don't leak workload gopipe in PERF_RECORD_*

Jakub Kicinski (1):
Revert "net/mlx5e: Update and set Xon/Xoff upon MTU set"

Jan Kara (5):
ext4: fix checks for orphan inodes
ext4: verify orphan file size is not too big
ext4: free orphan info with kvfree
writeback: Avoid softlockup when switching many inodes
writeback: Avoid excessively long inode switching times

Jason Andryuk (2):
xen/events: Cleanup find_virq() return codes xen/events: Update virq_to_irq on migration

Jeff Layton (1):
filelock: add FL_RECLAIM to show_fl_flags() macro

Jisheng Zhang (1):
pwm: berlin: Fix wrong register in suspend/resume

Johan Hovold (3):
firmware: firmware: meson-sm: fix compile-test default
firmware: meson_sm: fix device leak at probe lib/genalloc: fix device leak in of_gen_pool_get()

John Garry (3):
scsi: libsas: Add sas_task_find_rq()
scsi: mvsas: Delete mvs_tag_init()
scsi: mvsas: Use sas_task_find_rq() for tagging

KaFai Wan (1):
bpf: Avoid RCU context warning when unpinning htab with internal structs

Kohei Enju (2):
nfp: fix RSS hash key size when RSS is not supported
net: ena: return 0 in ena_get_rxfh_key_size() when RSS hash key is not configurable

Krzysztof Kozlowski (1):
ASoC: codecs: wcd934x: Simplify with dev_err_probe

Kunihiko Hayashi (1):
i2c: designware: Add disabling clocks when probe fails

Kuniyuki Iwashima (2):
udp: Fix memory accounting leak.
tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().

Larshin Sergey (2):
media: rc: fix races with imon_disconnect()
fs: udf: fix OOB read in lengthAllocDescs handling

Leilk.Liu (1):
i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD

Leo Yan (5):
coresight: trbe: Prevent overflow in PERF_IDX2OFF()
perf: arm_spe: Prevent overflow in PERF_IDX2OFF()
coresight: trbe: Return NULL pointer for allocation failures perf session: Fix handling when buffer exceeds 2 GiB tools build: Align warning options with perf

Li Nan (1):
blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx

Lichen Liu (1):
fs: Add 'initramfs_options' to set initramfs mount options

Linus Torvalds (8):
minmax: avoid overly complicated constant expressions in VM code
minmax: add a few more MIN_T/MAX_T users
minmax: simplify and clarify min_t()/max_t() implementation
minmax: make generic MIN() and MAX() macros available everywhere
minmax: don't use max() in situations that want a C constant expression
minmax: simplify min()/max()/clamp() implementation
minmax: improve macro expansion and type checking
minmax: fix up min3() and max3() too

Linus Walleij (1):
mtd: rawnand: fsmc: Default to autodetect buswidth

Lu Baolu (1):
iommu/vt-d: PRS isn't usable if PDS isn't supported

Luiz Augusto von Dentz (1):
Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO

Lukas Wunner (3):
xen/manage: Fix suspend error path PCI/ERR: Fix uevent on failure to recover PCI/AER: Support errors introduced by PCIe r6.0

Ma Ke (2):
sparc: fix error handling in scan_one_device()
ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()

Marek Vasut (1):
Input: atmel_mxt_ts - allow reset GPIO to sleep

Matthew Wilcox (Oracle) (1):
minmax: add in_range() macro

Matthieu Baerts (NGI0) (2):
mptcp: pm: in-kernel: usable client side with C-flag
selftests: mptcp: join: validate C-flag + def limit

Matvey Kovalev (1):
ksmbd: fix error code overwriting in smb2_get_info_filesystem()

Miaoqian Lin (2):
usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call
ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init

Michael Hennerich (2):
iio: frequency: adf4350: Fix ADF4350_REG3_12BIT_CLKDIV_MODE
iio: frequency: adf4350: Fix prescaler usage.

Michael Karcher (5):
sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC
sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III
sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara
sparc: fix accurate exception reporting in copy_to_user for Niagara 4
sparc: fix accurate exception reporting in copy_{from,to}_user for M7

Michal Pecio (1):
Revert "usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running"

Mikhail Kobuk (1):
media: pci: ivtv: Add check for DMA map result

Mikulas Patocka (1):
dm-integrity: limit MAX_TAG_SIZE to 255

Nalivayko Sergey (1):
net/9p: fix double req put in p9_fd_cancelled

Nam Cao (2):
powerpc/powernv/pci: Fix underflow and leak issue powerpc/pseries/msi: Fix potential underflow and leak issue

Naman Jain (1):
uio_hv_generic: Let userspace take care of interrupt mask

Nathan Chancellor (1):
lib/crypto/curve25519-hacl64: Disable KASAN with clang-17 and older

Nicolas Ferre (1):
ARM: at91: pm: fix MCKx restore routine

Niklas Cassel (2):
scsi: pm80xx: Fix array-index-out-of-of-bounds on rmmod
PCI: tegra194: Fix broken tegra_pcie_ep_raise_msi_irq()

Niklas Schnelle (2):
PCI/IOV: Add PCI rescan-remove locking when enabling/disabling SR-IOV PCI/AER: Fix missing uevent on recovery when a reset is requested

Nishanth Menon (1):
hwrng: ks-sa - fix division by zero in ks_sa_rng_init

Ojaswin Mujoo (1):
ext4: correctly handle queries for metadata mappings

Oleksij Rempel (1):
net: usb: asix: hold PM usage ref to avoid PM/MDIO + RTNL deadlock

Olga Kornievskaia (1):
nfsd: nfserr_jukebox in nlm_fopen should lead to a retry

Ovidiu Panait (2):
staging: axis-fifo: fix maximum TX packet length check
staging: axis-fifo: flush RX FIFO on read errors

Parav Pandit (1):
RDMA/core: Resolve MAC of next-hop device without ARP support

Paul Chaignon (1):
bpf: Explicitly check accesses to bpf_sock_addr

Peter Zijlstra (1):
locking: Introduce __cleanup() based infrastructure

Phillip Lougher (3):
Squashfs: fix uninit-value in squashfs_get_parent
Squashfs: add additional inode sanity checking
Squashfs: reject negative file sizes in squashfs_read_inode()

Pratyush Yadav (2):
spi: cadence-quadspi: Flush posted register writes before INDAC access
spi: cadence-quadspi: Flush posted register writes before DAC access

Qianfeng Rong (10):
regulator: scmi: Use int type to store negative error codes
block: use int to store blk_stack_limits() return value
pinctrl: renesas: Use int type to store negative error codes
ALSA: lx_core: use int type to store negative error codes drm/amdkfd: Fix error code sign for EINVAL in svm_ioctl()
scsi: qla2xxx: edif: Fix incorrect sign of error code
scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES()
media: i2c: mt9v111: fix incorrect type for ret
iio: dac: ad5360: use int type to store negative error codes
iio: dac: ad5421: use int type to store negative error codes

Qu Wenruo (1):
btrfs: fix the incorrect max_bytes value for find_lock_delalloc_range()

Rafael J. Wysocki (4):
driver core/PM: Set power.no_callbacks along with power.no_pm
PM: sleep: core: Clear power.must_resume in noirq suspend error path
smp: Fix up and expand the smp_call_function_many() kerneldoc
cpufreq: intel_pstate: Fix object lifecycle issue in update_qos_request()

Ranjan Kumar (1):
scsi: mpt3sas: Fix crash in transport port remove by using ioc_info()

Raphael Gallais-Pou (1):
serial: stm32: allow selecting console when the driver is module

Rex Chen (1):
mmc: core: SPI mode remove cmd7

Ricardo Ribalda (1):
media: tunner: xc5000: Refactor firmware load

Rob Herring (Arm) (1):
rtc: x1205: Fix Xicor X1205 vendor prefix

Salah Triki (1):
bus: fsl-mc: Check return value of platform_get_resource()

Sam James (1):
parisc: don't reference obsolete termio struct for TC* constants

Sean Christopherson (4):
rseq/selftests: Use weak symbol reference, not definition, to link with glibc x86/umip: Check that the instruction opcode is at least two bytes x86/umip: Fix decoding of register forms of 0F 01 (SGDT and SIDT aliases)
KVM: x86: Don't (re)check L1 intercepts when completing userspace I/O

Sean Nyekjaer (1):
iio: imu: inv_icm42600: Drop redundant pm_runtime reinitialization in resume

Shuhao Fu (1):
drm/nouveau: fix bad ret code in nouveau_bo_move_prep

Siddharth Vadapalli (1):
PCI: keystone: Use devm_request_irq() to free "ks-pcie-error-irq" on exit

Simon Schuster (1):
copy_sighand: Handle architectures where sizeof(unsigned long) < sizeof(u64)

Slavin Liu (1):
ipvs: Defer ip_vs_ftp unregister during netns cleanup

Sneh Mankad (1):
soc: qcom: rpmh-rsc: Unconditionally clear _TRIGGER bit for TCS

Stanley Chu (1):
i3c: master: svc: Recycle unused IBI slot

Stefan Kerkmann (1):
wifi: mwifiex: send world regulatory domain to driver

Stephan Gerhold (3):
remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice
arm64: dts: qcom: msm8916: Add missing MDSS reset
arm64: dts: qcom: sdm845: Fix slimbam num-channels/ees

Takashi Iwai (3):
ASoC: Intel: bytcht_es8316: Fix invalid quirk input mapping
ASoC: Intel: bytcr_rt5640: Fix invalid quirk input mapping
ASoC: Intel: bytcr_rt5651: Fix invalid quirk input mapping

Tetsuo Handa (2):
minixfs: Verify inode mode when loading from disk
cramfs: Verify inode mode when loading from disk

Thadeu Lima de Souza Cascardo (1):
mm/page_alloc: only set ALLOC_HIGHATOMIC for __GPF_HIGH allocations

Thomas Fourier (4):
scsi: myrs: Fix dma_alloc_coherent() error check
crypto: atmel - Fix dma_unmap_sg() direction
media: cx18: Add missing check after DMA map
media: pci: ivtv: Add missing check after DMA map

Thomas Weißschuh (1):
fs: always return zero on success from replace_fd()

Thomas Zimmermann (1):
drm/vmwgfx: Copy DRM hash-table code into driver

Thorsten Blum (2):
scsi: hpsa: Fix potential memory leak in hpsa_big_passthru_ioctl()
NFSD: Fix destination buffer size in nfsd4_ssc_setup_dul()

Timur Kristóf (4):
drm/amdgpu: Power up UVD 3 for FW validation (v2) drm/amd/display: Add missing DCE6 SCL_HORZ_FILTER_INIT* SRIs drm/amd/display: Properly clear SCL_*_FILTER_CONTROL on DCE6 drm/amd/display: Properly disable scaling on DCE6

Uros Bizjak (1):
x86/vdso: Fix output operand size of RDPID

Uwe Kleine-König (1):
pwm: tiehrpwm: Fix corner case in clock divisor calculation

Vasant Hegde (1):
iommu/amd: Add map/unmap_pages() iommu_domain_ops callback support

Vineeth Vijayan (1):
s390/cio: unregister the subchannel while purging

Vitaly Grigoryev (1):
fs: ntfs3: Fix integer overflow in run_unpack()

Vlad Dumitrescu (1):
IB/sa: Fix sa_local_svc_timeout_ms read race

Wang Haoran (1):
scsi: target: target_core_configfs: Add length check to avoid buffer overflow

Wang Liang (1):
pps: fix warning in pps_register_cdev when register device fail

Will Deacon (1):
KVM: arm64: Fix softirq masking in FPSIMD register saving sequence

William Wu (1):
usb: gadget: configfs: Correctly set use_os_string at bind

Xiaowei Li (1):
USB: serial: option: add SIMCom 8230C compositions

Xichao Zhao (1):
usb: phy: twl6030: Fix incorrect type for ret

Yang Shi (1):
mm: hugetlb: avoid soft lockup when mprotect to large memory area

Yeounsu Moon (1):
net: dlink: handle copy_thresh allocation failure

Yongjian Sun (1):
ext4: increase i_disksize to offset + len in ext4_update_disksize_before_punch()

Yuan Chen (1):
tracing: Fix race condition in kprobe initialization causing NULL pointer dereference

Yunseong Kim (1):
perf util: Fix compression checks returning -1 as bool

Yureka Lilian (1):
libbpf: Fix reuse of DEVMAP

Zhang Shurong (1):
media: rj54n1cb0c: Fix memleak in rj54n1_probe()

Zhen Ni (4):
netfilter: ipset: Remove unused htable_bits in macro ahash_region
Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak clocksource/drivers/clps711x: Fix resource leaks in error paths
memory: samsung: exynos-srom: Fix of_iomap leak in exynos_srom_probe

Zheng Qixing (1):
dm: fix NULL pointer dereference in __dm_suspend()

Zhouyi Zhou (1):
tools/nolibc: make time_t robust if __kernel_old_time_t is missing in host headers

gaoxiang17 (1):
pid: Add a judgment for ns null in pid_nr_ns

hupu (1):
perf subcmd: avoid crash in exclude_cmds when excludes is empty

author maintainer
#1 lore raw
Documentation/admin-guide/kernel-parameters.txt +3 -0
index 25e07ac5c1ca..ae09a6c701f0 100644
@@ -5148,6 +5148,9 @@
 
 	rootflags=	[KNL] Set root filesystem mount option string
 
+	initramfs_options= [KNL]
+                        Specify mount options for for the initramfs mount.
+
 	rootfstype=	[KNL] Set root filesystem type
 
 	rootwait	[KNL] Wait (indefinitely) for root device to show up.
Documentation/gpu/todo.rst +11 -0
index 67de1e94fdf7..f31a838d09fb 100644
@@ -635,6 +635,17 @@ See drivers/gpu/drm/amd/display/TODO for tasks.
 
 Contact: Harry Wentland, Alex Deucher
 
+vmwgfx: Replace hashtable with Linux' implementation
+----------------------------------------------------
+
+The vmwgfx driver uses its own hashtable implementation. Replace the
+code with Linux' implementation and update the callers. It's mostly a
+refactoring task, but the interfaces are different.
+
+Contact: Zack Rusin, Thomas Zimmermann <[email protected]>
+
+Level: Intermediate
+
 Bootsplash
 ==========
 
Documentation/trace/histogram-design.rst +3 -1
index 088c8cce738b..6e0d1a48bd50 100644
@@ -380,7 +380,9 @@ entry, ts0, corresponding to the ts0 variable in the sched_waking
 trigger above.
 
 sched_waking histogram
-----------------------::
+----------------------
+
+.. code-block::
 
   +------------------+
   | hist_data        |<-------------------------------------------------------+
Makefile +1 -1
index e3cf330f4832..b271b95873cf 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 15
-SUBLEVEL = 194
+SUBLEVEL = 195
 EXTRAVERSION =
 NAME = Trick or Treat
 
arch/arm/mach-at91/pm_suspend.S +2 -2
index 2f0a370a1309..60f9d6f5f822 100644
@@ -868,7 +868,7 @@ e_done:
 /**
  * at91_mckx_ps_restore: restore MCK1..4 settings
  *
- * Side effects: overwrites tmp1, tmp2
+ * Side effects: overwrites tmp1, tmp2 and tmp3
  */
 .macro at91_mckx_ps_restore
 #ifdef CONFIG_SOC_SAMA7
@@ -912,7 +912,7 @@ r_ps:
 	bic	tmp3, tmp3, #AT91_PMC_MCR_V2_ID_MSK
 	orr	tmp3, tmp3, tmp1
 	orr	tmp3, tmp3, #AT91_PMC_MCR_V2_CMD
-	str	tmp2, [pmc, #AT91_PMC_MCR_V2]
+	str	tmp3, [pmc, #AT91_PMC_MCR_V2]
 
 	wait_mckrdy tmp1
 
arch/arm/mach-omap2/pm33xx-core.c +5 -1
index bf0d25fd2cea..58b98a17746c 100644
@@ -393,12 +393,15 @@ static int __init amx3_idle_init(struct device_node *cpu_node, int cpu)
 		if (!state_node)
 			break;
 
-		if (!of_device_is_available(state_node))
+		if (!of_device_is_available(state_node)) {
+			of_node_put(state_node);
 			continue;
+		}
 
 		if (i == CPUIDLE_STATE_MAX) {
 			pr_warn("%s: cpuidle states reached max possible\n",
 				__func__);
+			of_node_put(state_node);
 			break;
 		}
 
@@ -408,6 +411,7 @@ static int __init amx3_idle_init(struct device_node *cpu_node, int cpu)
 			states[state_count].wfi_flags |= WFI_FLAG_WAKE_M3 |
 							 WFI_FLAG_FLUSH_CACHE;
 
+		of_node_put(state_node);
 		state_count++;
 	}
 
arch/arm/mm/pageattr.c +3 -3
index 9790ae3a8c68..3b3bfa825fad 100644
@@ -25,7 +25,7 @@ static int change_page_range(pte_t *ptep, unsigned long addr, void *data)
 	return 0;
 }
 
-static bool in_range(unsigned long start, unsigned long size,
+static bool range_in_range(unsigned long start, unsigned long size,
 	unsigned long range_start, unsigned long range_end)
 {
 	return start >= range_start && start < range_end &&
@@ -46,8 +46,8 @@ static int change_memory_common(unsigned long addr, int numpages,
 	if (!size)
 		return 0;
 
-	if (!in_range(start, size, MODULES_VADDR, MODULES_END) &&
-	    !in_range(start, size, VMALLOC_START, VMALLOC_END))
+	if (!range_in_range(start, size, MODULES_VADDR, MODULES_END) &&
+	    !range_in_range(start, size, VMALLOC_START, VMALLOC_END))
 		return -EINVAL;
 
 	data.set_mask = set_mask;
arch/arm64/boot/dts/mediatek/mt8516-pumpkin.dts +1 -1
index cce642c53812..3d3db33a64dc 100644
@@ -11,7 +11,7 @@
 
 / {
 	model = "Pumpkin MT8516";
-	compatible = "mediatek,mt8516";
+	compatible = "mediatek,mt8516-pumpkin", "mediatek,mt8516";
 
 	memory@40000000 {
 		device_type = "memory";
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -0
index 79d5f1433800..da053ff698a5 100644
@@ -957,6 +957,8 @@ mdss: mdss@1a00000 {
 
 			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
 
+			resets = <&gcc GCC_MDSS_BCR>;
+
 			interrupt-controller;
 			#interrupt-cells = <1>;
 
arch/arm64/boot/dts/qcom/sdm845.dtsi +2 -2
index 69212445d22c..c00b5712959d 100644
@@ -4839,11 +4839,11 @@ slimbam: dma-controller@17184000 {
 			compatible = "qcom,bam-v1.7.0";
 			qcom,controlled-remotely;
 			reg = <0 0x17184000 0 0x2a000>;
-			num-channels  = <31>;
+			num-channels = <23>;
 			interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
 			#dma-cells = <1>;
 			qcom,ee = <1>;
-			qcom,num-ees = <2>;
+			qcom,num-ees = <4>;
 			iommus = <&apps_smmu 0x1806 0x0>;
 		};
 
arch/arm64/kernel/cpufeature.c +8 -2
index e9d1e429456f..a2518ccc5e98 100644
@@ -1948,16 +1948,22 @@ static void bti_enable(const struct arm64_cpu_capabilities *__unused)
 #ifdef CONFIG_ARM64_MTE
 static void cpu_enable_mte(struct arm64_cpu_capabilities const *cap)
 {
+	static bool cleared_zero_page = false;
+
 	sysreg_clear_set(sctlr_el1, 0, SCTLR_ELx_ATA | SCTLR_EL1_ATA0);
 
 	mte_cpu_setup();
 
 	/*
 	 * Clear the tags in the zero page. This needs to be done via the
-	 * linear map which has the Tagged attribute.
+	 * linear map which has the Tagged attribute. Since this page is
+	 * always mapped as pte_special(), set_pte_at() will not attempt to
+	 * clear the tags or set PG_mte_tagged.
 	 */
-	if (!test_and_set_bit(PG_mte_tagged, &ZERO_PAGE(0)->flags))
+	if (!cleared_zero_page) {
+		cleared_zero_page = true;
 		mte_clear_page_tags(lm_alias(empty_zero_page));
+	}
 
 	kasan_init_hw_tags_cpu();
 }
arch/arm64/kernel/fpsimd.c +6 -2
index fc51cdd5aaa7..db1ed940a6dc 100644
@@ -1300,13 +1300,17 @@ static void fpsimd_flush_cpu_state(void)
  */
 void fpsimd_save_and_flush_cpu_state(void)
 {
+	unsigned long flags;
+
 	if (!system_supports_fpsimd())
 		return;
 	WARN_ON(preemptible());
-	get_cpu_fpsimd_context();
+	local_irq_save(flags);
+	__get_cpu_fpsimd_context();
 	fpsimd_save();
 	fpsimd_flush_cpu_state();
-	put_cpu_fpsimd_context();
+	__put_cpu_fpsimd_context();
+	local_irq_restore(flags);
 }
 
 #ifdef CONFIG_KERNEL_MODE_NEON
arch/arm64/kernel/mte.c +2 -1
index a3898bac5ae6..7f77fedb0901 100644
@@ -370,7 +370,8 @@ static int __access_remote_tags(struct mm_struct *mm, unsigned long addr,
 			put_page(page);
 			break;
 		}
-		WARN_ON_ONCE(!test_bit(PG_mte_tagged, &page->flags));
+		WARN_ON_ONCE(!test_bit(PG_mte_tagged, &page->flags) &&
+			     !is_zero_pfn(page_to_pfn(page)));
 
 		/* limit access to the end of the page */
 		offset = offset_in_page(addr);
arch/parisc/include/uapi/asm/ioctls.h +4 -4
index 82d1148c6379..74b4027a4e80 100644
@@ -10,10 +10,10 @@
 #define TCSETS		_IOW('T', 17, struct termios) /* TCSETATTR */
 #define TCSETSW		_IOW('T', 18, struct termios) /* TCSETATTRD */
 #define TCSETSF		_IOW('T', 19, struct termios) /* TCSETATTRF */
-#define TCGETA		_IOR('T', 1, struct termio)
-#define TCSETA		_IOW('T', 2, struct termio)
-#define TCSETAW		_IOW('T', 3, struct termio)
-#define TCSETAF		_IOW('T', 4, struct termio)
+#define TCGETA          0x40125401
+#define TCSETA          0x80125402
+#define TCSETAW         0x80125403
+#define TCSETAF         0x80125404
 #define TCSBRK		_IO('T', 5)
 #define TCXONC		_IO('T', 6)
 #define TCFLSH		_IO('T', 7)
arch/powerpc/platforms/powernv/pci-ioda.c +1 -1
index 8cf9e9f29763..d83a6578b0c4 100644
@@ -2243,7 +2243,7 @@ static int pnv_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
 	return 0;
 
 out:
-	irq_domain_free_irqs_parent(domain, virq, i - 1);
+	irq_domain_free_irqs_parent(domain, virq, i);
 	msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, nr_irqs);
 	return ret;
 }
arch/powerpc/platforms/pseries/msi.c +1 -1
index 2017fd30a477..23e75773fc4b 100644
@@ -607,7 +607,7 @@ static int pseries_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
 
 out:
 	/* TODO: handle RTAS cleanup in ->msi_finish() ? */
-	irq_domain_free_irqs_parent(domain, virq, i - 1);
+	irq_domain_free_irqs_parent(domain, virq, i);
 	return ret;
 }
 
arch/sparc/kernel/of_device_32.c +1 -0
index 4ebf51e6e78e..b06b92c9a375 100644
@@ -387,6 +387,7 @@ static struct platform_device * __init scan_one_device(struct device_node *dp,
 
 	if (of_device_register(op)) {
 		printk("%pOF: Could not register of device.\n", dp);
+		put_device(&op->dev);
 		kfree(op);
 		op = NULL;
 	}
arch/sparc/kernel/of_device_64.c +1 -0
index 5a9f86b1d4e7..6e616bd5cc46 100644
@@ -680,6 +680,7 @@ static struct platform_device * __init scan_one_device(struct device_node *dp,
 
 	if (of_device_register(op)) {
 		printk("%pOF: Could not register of device.\n", dp);
+		put_device(&op->dev);
 		kfree(op);
 		op = NULL;
 	}
arch/sparc/lib/M7memcpy.S +10 -10
index cbd42ea7c3f7..99357bfa8e82 100644
@@ -696,16 +696,16 @@ FUNC_NAME:
 	EX_LD_FP(LOAD(ldd, %o4+40, %f26), memcpy_retl_o2_plus_o5_plus_40)
 	faligndata %f24, %f26, %f10
 	EX_ST_FP(STORE(std, %f6, %o0+24), memcpy_retl_o2_plus_o5_plus_40)
-	EX_LD_FP(LOAD(ldd, %o4+48, %f28), memcpy_retl_o2_plus_o5_plus_40)
+	EX_LD_FP(LOAD(ldd, %o4+48, %f28), memcpy_retl_o2_plus_o5_plus_32)
 	faligndata %f26, %f28, %f12
-	EX_ST_FP(STORE(std, %f8, %o0+32), memcpy_retl_o2_plus_o5_plus_40)
+	EX_ST_FP(STORE(std, %f8, %o0+32), memcpy_retl_o2_plus_o5_plus_32)
 	add	%o4, 64, %o4
-	EX_LD_FP(LOAD(ldd, %o4-8, %f30), memcpy_retl_o2_plus_o5_plus_40)
+	EX_LD_FP(LOAD(ldd, %o4-8, %f30), memcpy_retl_o2_plus_o5_plus_24)
 	faligndata %f28, %f30, %f14
-	EX_ST_FP(STORE(std, %f10, %o0+40), memcpy_retl_o2_plus_o5_plus_40)
-	EX_ST_FP(STORE(std, %f12, %o0+48), memcpy_retl_o2_plus_o5_plus_40)
+	EX_ST_FP(STORE(std, %f10, %o0+40), memcpy_retl_o2_plus_o5_plus_24)
+	EX_ST_FP(STORE(std, %f12, %o0+48), memcpy_retl_o2_plus_o5_plus_16)
 	add	%o0, 64, %o0
-	EX_ST_FP(STORE(std, %f14, %o0-8), memcpy_retl_o2_plus_o5_plus_40)
+	EX_ST_FP(STORE(std, %f14, %o0-8), memcpy_retl_o2_plus_o5_plus_8)
 	fsrc2	%f30, %f14
 	bgu,pt	%xcc, .Lunalign_sloop
 	 prefetch [%o4 + (8 * BLOCK_SIZE)], 20
@@ -728,7 +728,7 @@ FUNC_NAME:
 	add	%o4, 8, %o4
 	faligndata %f0, %f2, %f16
 	subcc	%o5, 8, %o5
-	EX_ST_FP(STORE(std, %f16, %o0), memcpy_retl_o2_plus_o5)
+	EX_ST_FP(STORE(std, %f16, %o0), memcpy_retl_o2_plus_o5_plus_8)
 	fsrc2	%f2, %f0
 	bgu,pt	%xcc, .Lunalign_by8
 	 add	%o0, 8, %o0
@@ -772,7 +772,7 @@ FUNC_NAME:
 	subcc	%o5, 0x20, %o5
 	EX_ST(STORE(stx, %o3, %o0 + 0x00), memcpy_retl_o2_plus_o5_plus_32)
 	EX_ST(STORE(stx, %g2, %o0 + 0x08), memcpy_retl_o2_plus_o5_plus_24)
-	EX_ST(STORE(stx, %g7, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_24)
+	EX_ST(STORE(stx, %g7, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_16)
 	EX_ST(STORE(stx, %o4, %o0 + 0x18), memcpy_retl_o2_plus_o5_plus_8)
 	bne,pt	%xcc, 1b
 	 add	%o0, 0x20, %o0
@@ -804,12 +804,12 @@ FUNC_NAME:
 	brz,pt	%o3, 2f
 	 sub	%o2, %o3, %o2
 
-1:	EX_LD(LOAD(ldub, %o1 + 0x00, %g2), memcpy_retl_o2_plus_g1)
+1:	EX_LD(LOAD(ldub, %o1 + 0x00, %g2), memcpy_retl_o2_plus_o3)
 	add	%o1, 1, %o1
 	subcc	%o3, 1, %o3
 	add	%o0, 1, %o0
 	bne,pt	%xcc, 1b
-	 EX_ST(STORE(stb, %g2, %o0 - 0x01), memcpy_retl_o2_plus_g1_plus_1)
+	 EX_ST(STORE(stb, %g2, %o0 - 0x01), memcpy_retl_o2_plus_o3_plus_1)
 2:
 	and	%o1, 0x7, %o3
 	brz,pn	%o3, .Lmedium_noprefetch_cp
arch/sparc/lib/Memcpy_utils.S +9 -0
index 64fbac28b3db..207343367bb2 100644
@@ -137,6 +137,15 @@ ENTRY(memcpy_retl_o2_plus_63_8)
 	ba,pt	%xcc, __restore_asi
 	 add	%o2, 8, %o0
 ENDPROC(memcpy_retl_o2_plus_63_8)
+ENTRY(memcpy_retl_o2_plus_o3)
+	ba,pt	%xcc, __restore_asi
+	 add	%o2, %o3, %o0
+ENDPROC(memcpy_retl_o2_plus_o3)
+ENTRY(memcpy_retl_o2_plus_o3_plus_1)
+	add	%o3, 1, %o3
+	ba,pt	%xcc, __restore_asi
+	 add	%o2, %o3, %o0
+ENDPROC(memcpy_retl_o2_plus_o3_plus_1)
 ENTRY(memcpy_retl_o2_plus_o5)
 	ba,pt	%xcc, __restore_asi
 	 add	%o2, %o5, %o0
arch/sparc/lib/NG4memcpy.S +1 -1
index 7ad58ebe0d00..df0ec1bd1948 100644
@@ -281,7 +281,7 @@ FUNC_NAME:	/* %o0=dst, %o1=src, %o2=len */
 	subcc		%o5, 0x20, %o5
 	EX_ST(STORE(stx, %g1, %o0 + 0x00), memcpy_retl_o2_plus_o5_plus_32)
 	EX_ST(STORE(stx, %g2, %o0 + 0x08), memcpy_retl_o2_plus_o5_plus_24)
-	EX_ST(STORE(stx, GLOBAL_SPARE, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_24)
+	EX_ST(STORE(stx, GLOBAL_SPARE, %o0 + 0x10), memcpy_retl_o2_plus_o5_plus_16)
 	EX_ST(STORE(stx, %o4, %o0 + 0x18), memcpy_retl_o2_plus_o5_plus_8)
 	bne,pt		%icc, 1b
 	 add		%o0, 0x20, %o0
arch/sparc/lib/NGmemcpy.S +18 -11
index 8e4d22a6ba0b..846a8c4ea394 100644
@@ -80,8 +80,8 @@
 #ifndef EX_RETVAL
 #define EX_RETVAL(x)	x
 __restore_asi:
-	ret
 	wr	%g0, ASI_AIUS, %asi
+	ret
 	 restore
 ENTRY(NG_ret_i2_plus_i4_plus_1)
 	ba,pt	%xcc, __restore_asi
@@ -126,15 +126,16 @@ ENTRY(NG_ret_i2_plus_g1_minus_56)
 	ba,pt	%xcc, __restore_asi
 	 add	%i2, %g1, %i0
 ENDPROC(NG_ret_i2_plus_g1_minus_56)
-ENTRY(NG_ret_i2_plus_i4)
+ENTRY(NG_ret_i2_plus_i4_plus_16)
+        add     %i4, 16, %i4
 	ba,pt	%xcc, __restore_asi
 	 add	%i2, %i4, %i0
-ENDPROC(NG_ret_i2_plus_i4)
-ENTRY(NG_ret_i2_plus_i4_minus_8)
-	sub	%i4, 8, %i4
+ENDPROC(NG_ret_i2_plus_i4_plus_16)
+ENTRY(NG_ret_i2_plus_i4_plus_8)
+	add	%i4, 8, %i4
 	ba,pt	%xcc, __restore_asi
 	 add	%i2, %i4, %i0
-ENDPROC(NG_ret_i2_plus_i4_minus_8)
+ENDPROC(NG_ret_i2_plus_i4_plus_8)
 ENTRY(NG_ret_i2_plus_8)
 	ba,pt	%xcc, __restore_asi
 	 add	%i2, 8, %i0
@@ -161,6 +162,12 @@ ENTRY(NG_ret_i2_and_7_plus_i4)
 	ba,pt	%xcc, __restore_asi
 	 add	%i2, %i4, %i0
 ENDPROC(NG_ret_i2_and_7_plus_i4)
+ENTRY(NG_ret_i2_and_7_plus_i4_plus_8)
+	and	%i2, 7, %i2
+	add	%i4, 8, %i4
+	ba,pt	%xcc, __restore_asi
+	 add	%i2, %i4, %i0
+ENDPROC(NG_ret_i2_and_7_plus_i4)
 #endif
 
 	.align		64
@@ -406,13 +413,13 @@ FUNC_NAME:	/* %i0=dst, %i1=src, %i2=len */
 	andn		%i2, 0xf, %i4
 	and		%i2, 0xf, %i2
 1:	subcc		%i4, 0x10, %i4
-	EX_LD(LOAD(ldx, %i1, %o4), NG_ret_i2_plus_i4)
+	EX_LD(LOAD(ldx, %i1, %o4), NG_ret_i2_plus_i4_plus_16)
 	add		%i1, 0x08, %i1
-	EX_LD(LOAD(ldx, %i1, %g1), NG_ret_i2_plus_i4)
+	EX_LD(LOAD(ldx, %i1, %g1), NG_ret_i2_plus_i4_plus_16)
 	sub		%i1, 0x08, %i1
-	EX_ST(STORE(stx, %o4, %i1 + %i3), NG_ret_i2_plus_i4)
+	EX_ST(STORE(stx, %o4, %i1 + %i3), NG_ret_i2_plus_i4_plus_16)
 	add		%i1, 0x8, %i1
-	EX_ST(STORE(stx, %g1, %i1 + %i3), NG_ret_i2_plus_i4_minus_8)
+	EX_ST(STORE(stx, %g1, %i1 + %i3), NG_ret_i2_plus_i4_plus_8)
 	bgu,pt		%XCC, 1b
 	 add		%i1, 0x8, %i1
 73:	andcc		%i2, 0x8, %g0
@@ -469,7 +476,7 @@ FUNC_NAME:	/* %i0=dst, %i1=src, %i2=len */
 	subcc		%i4, 0x8, %i4
 	srlx		%g3, %i3, %i5
 	or		%i5, %g2, %i5
-	EX_ST(STORE(stx, %i5, %o0), NG_ret_i2_and_7_plus_i4)
+	EX_ST(STORE(stx, %i5, %o0), NG_ret_i2_and_7_plus_i4_plus_8)
 	add		%o0, 0x8, %o0
 	bgu,pt		%icc, 1b
 	 sllx		%g3, %g1, %g2
arch/sparc/lib/U1memcpy.S +10 -9
index a6f4ee391897..021b94a383d1 100644
@@ -164,17 +164,18 @@ ENTRY(U1_gs_40_fp)
 	retl
 	 add		%o0, %o2, %o0
 ENDPROC(U1_gs_40_fp)
-ENTRY(U1_g3_0_fp)
-	VISExitHalf
-	retl
-	 add		%g3, %o2, %o0
-ENDPROC(U1_g3_0_fp)
 ENTRY(U1_g3_8_fp)
 	VISExitHalf
 	add		%g3, 8, %g3
 	retl
 	 add		%g3, %o2, %o0
 ENDPROC(U1_g3_8_fp)
+ENTRY(U1_g3_16_fp)
+	VISExitHalf
+	add		%g3, 16, %g3
+	retl
+	 add		%g3, %o2, %o0
+ENDPROC(U1_g3_16_fp)
 ENTRY(U1_o2_0_fp)
 	VISExitHalf
 	retl
@@ -547,18 +548,18 @@ FUNC_NAME:		/* %o0=dst, %o1=src, %o2=len */
 62:	FINISH_VISCHUNK(o0, f44, f46)
 63:	UNEVEN_VISCHUNK_LAST(o0, f46, f0)
 
-93:	EX_LD_FP(LOAD(ldd, %o1, %f2), U1_g3_0_fp)
+93:	EX_LD_FP(LOAD(ldd, %o1, %f2), U1_g3_8_fp)
 	add		%o1, 8, %o1
 	subcc		%g3, 8, %g3
 	faligndata	%f0, %f2, %f8
-	EX_ST_FP(STORE(std, %f8, %o0), U1_g3_8_fp)
+	EX_ST_FP(STORE(std, %f8, %o0), U1_g3_16_fp)
 	bl,pn		%xcc, 95f
 	 add		%o0, 8, %o0
-	EX_LD_FP(LOAD(ldd, %o1, %f0), U1_g3_0_fp)
+	EX_LD_FP(LOAD(ldd, %o1, %f0), U1_g3_8_fp)
 	add		%o1, 8, %o1
 	subcc		%g3, 8, %g3
 	faligndata	%f2, %f0, %f8
-	EX_ST_FP(STORE(std, %f8, %o0), U1_g3_8_fp)
+	EX_ST_FP(STORE(std, %f8, %o0), U1_g3_16_fp)
 	bge,pt		%xcc, 93b
 	 add		%o0, 8, %o0
 
arch/sparc/lib/U3memcpy.S +1 -1
index 9248d59c734c..bace3a18f836 100644
@@ -267,6 +267,7 @@ FUNC_NAME:	/* %o0=dst, %o1=src, %o2=len */
 	faligndata	%f10, %f12, %f26
 	EX_LD_FP(LOAD(ldd, %o1 + 0x040, %f0), U3_retl_o2)
 
+	and		%o2, 0x3f, %o2
 	subcc		GLOBAL_SPARE, 0x80, GLOBAL_SPARE
 	add		%o1, 0x40, %o1
 	bgu,pt		%XCC, 1f
@@ -336,7 +337,6 @@ FUNC_NAME:	/* %o0=dst, %o1=src, %o2=len */
 	 * Also notice how this code is careful not to perform a
 	 * load past the end of the src buffer.
 	 */
-	and		%o2, 0x3f, %o2
 	andcc		%o2, 0x38, %g2
 	be,pn		%XCC, 2f
 	 subcc		%g2, 0x8, %g2
arch/sparc/mm/hugetlbpage.c +20 -0
index 0f49fada2093..7ec6e7bc374a 100644
@@ -133,6 +133,26 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
 
 static pte_t sun4u_hugepage_shift_to_tte(pte_t entry, unsigned int shift)
 {
+	unsigned long hugepage_size = _PAGE_SZ4MB_4U;
+
+	pte_val(entry) = pte_val(entry) & ~_PAGE_SZALL_4U;
+
+	switch (shift) {
+	case HPAGE_256MB_SHIFT:
+		hugepage_size = _PAGE_SZ256MB_4U;
+		pte_val(entry) |= _PAGE_PMD_HUGE;
+		break;
+	case HPAGE_SHIFT:
+		pte_val(entry) |= _PAGE_PMD_HUGE;
+		break;
+	case HPAGE_64K_SHIFT:
+		hugepage_size = _PAGE_SZ64K_4U;
+		break;
+	default:
+		WARN_ONCE(1, "unsupported hugepage shift=%u\n", shift);
+	}
+
+	pte_val(entry) = pte_val(entry) | hugepage_size;
 	return entry;
 }
 
arch/um/drivers/mconsole_user.c +2 -0
index e24298a734be..a04cd13c6315 100644
@@ -71,7 +71,9 @@ static struct mconsole_command *mconsole_parse(struct mc_request *req)
 	return NULL;
 }
 
+#ifndef MIN
 #define MIN(a,b) ((a)<(b) ? (a):(b))
+#endif
 
 #define STRINGX(x) #x
 #define STRING(x) STRINGX(x)
arch/x86/include/asm/segment.h +4 -4
index 8dd8e8ec9fa5..879be4ffa06c 100644
@@ -242,7 +242,7 @@ static inline unsigned long vdso_encode_cpunode(int cpu, unsigned long node)
 
 static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node)
 {
-	unsigned int p;
+	unsigned long p;
 
 	/*
 	 * Load CPU and node number from the GDT.  LSL is faster than RDTSCP
@@ -252,10 +252,10 @@ static inline void vdso_read_cpunode(unsigned *cpu, unsigned *node)
 	 *
 	 * If RDPID is available, use it.
 	 */
-	alternative_io ("lsl %[seg],%[p]",
-			".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */
+	alternative_io ("lsl %[seg],%k[p]",
+			"rdpid %[p]",
 			X86_FEATURE_RDPID,
-			[p] "=a" (p), [seg] "r" (__CPUNODE_SEG));
+			[p] "=r" (p), [seg] "r" (__CPUNODE_SEG));
 
 	if (cpu)
 		*cpu = (p & VDSO_CPUNODE_MASK);
arch/x86/kernel/umip.c +13 -2
index 576b47e7523d..5f6e0d3cfbc4 100644
@@ -156,15 +156,26 @@ static int identify_insn(struct insn *insn)
 	if (!insn->modrm.nbytes)
 		return -EINVAL;
 
-	/* All the instructions of interest start with 0x0f. */
-	if (insn->opcode.bytes[0] != 0xf)
+	/* The instructions of interest have 2-byte opcodes: 0F 00 or 0F 01. */
+	if (insn->opcode.nbytes < 2 || insn->opcode.bytes[0] != 0xf)
 		return -EINVAL;
 
 	if (insn->opcode.bytes[1] == 0x1) {
 		switch (X86_MODRM_REG(insn->modrm.value)) {
 		case 0:
+			/* The reg form of 0F 01 /0 encodes VMX instructions. */
+			if (X86_MODRM_MOD(insn->modrm.value) == 3)
+				return -EINVAL;
+
 			return UMIP_INST_SGDT;
 		case 1:
+			/*
+			 * The reg form of 0F 01 /1 encodes MONITOR/MWAIT,
+			 * STAC/CLAC, and ENCLS.
+			 */
+			if (X86_MODRM_MOD(insn->modrm.value) == 3)
+				return -EINVAL;
+
 			return UMIP_INST_SIDT;
 		case 4:
 			return UMIP_INST_SMSW;
arch/x86/kvm/emulate.c +4 -7
index 98b25a7af8ce..dae68691f424 100644
@@ -5452,12 +5452,11 @@ void init_decode_cache(struct x86_emulate_ctxt *ctxt)
 	ctxt->mem_read.end = 0;
 }
 
-int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
+int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, bool check_intercepts)
 {
 	const struct x86_emulate_ops *ops = ctxt->ops;
 	int rc = X86EMUL_CONTINUE;
 	int saved_dst_type = ctxt->dst.type;
-	unsigned emul_flags;
 
 	ctxt->mem_read.pos = 0;
 
@@ -5471,8 +5470,6 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
 		rc = emulate_ud(ctxt);
 		goto done;
 	}
-
-	emul_flags = ctxt->ops->get_hflags(ctxt);
 	if (unlikely(ctxt->d &
 		     (No64|Undefined|Sse|Mmx|Intercept|CheckPerm|Priv|Prot|String))) {
 		if ((ctxt->mode == X86EMUL_MODE_PROT64 && (ctxt->d & No64)) ||
@@ -5506,7 +5503,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
 				fetch_possible_mmx_operand(&ctxt->dst);
 		}
 
-		if (unlikely(emul_flags & X86EMUL_GUEST_MASK) && ctxt->intercept) {
+		if (unlikely(check_intercepts) && ctxt->intercept) {
 			rc = emulator_check_intercept(ctxt, ctxt->intercept,
 						      X86_ICPT_PRE_EXCEPT);
 			if (rc != X86EMUL_CONTINUE)
@@ -5535,7 +5532,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
 				goto done;
 		}
 
-		if (unlikely(emul_flags & X86EMUL_GUEST_MASK) && (ctxt->d & Intercept)) {
+		if (unlikely(check_intercepts) && (ctxt->d & Intercept)) {
 			rc = emulator_check_intercept(ctxt, ctxt->intercept,
 						      X86_ICPT_POST_EXCEPT);
 			if (rc != X86EMUL_CONTINUE)
@@ -5589,7 +5586,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
 
 special_insn:
 
-	if (unlikely(emul_flags & X86EMUL_GUEST_MASK) && (ctxt->d & Intercept)) {
+	if (unlikely(check_intercepts) && (ctxt->d & Intercept)) {
 		rc = emulator_check_intercept(ctxt, ctxt->intercept,
 					      X86_ICPT_POST_MEMACCESS);
 		if (rc != X86EMUL_CONTINUE)
arch/x86/kvm/kvm_emulate.h +1 -1
index fb09cd22cb7f..6507340513cd 100644
@@ -496,7 +496,7 @@ bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt);
 #define EMULATION_RESTART 1
 #define EMULATION_INTERCEPTED 2
 void init_decode_cache(struct x86_emulate_ctxt *ctxt);
-int x86_emulate_insn(struct x86_emulate_ctxt *ctxt);
+int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, bool check_intercepts);
 int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
 			 u16 tss_selector, int idt_index, int reason,
 			 bool has_error_code, u32 error_code);
arch/x86/kvm/x86.c +8 -1
index 2ba297da7bde..648f80f73e66 100644
@@ -8209,7 +8209,14 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
 		ctxt->exception.address = 0;
 	}
 
-	r = x86_emulate_insn(ctxt);
+	/*
+	 * Check L1's instruction intercepts when emulating instructions for
+	 * L2, unless KVM is re-emulating a previously decoded instruction,
+	 * e.g. to complete userspace I/O, in which case KVM has already
+	 * checked the intercepts.
+	 */
+	r = x86_emulate_insn(ctxt, is_guest_mode(vcpu) &&
+				   !(emulation_type & EMULTYPE_NO_DECODE));
 
 	if (r == EMULATION_INTERCEPTED)
 		return 1;
arch/x86/mm/pgtable.c +1 -1
index 3481b35cb4ec..e649161eb6fc 100644
@@ -107,7 +107,7 @@ static inline void pgd_list_del(pgd_t *pgd)
 #define UNSHARED_PTRS_PER_PGD				\
 	(SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)
 #define MAX_UNSHARED_PTRS_PER_PGD			\
-	max_t(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD)
+	MAX_T(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD)
 
 
 static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
block/blk-mq-sysfs.c +4 -2
index 7074ce8d2d03..09f4faca338a 100644
@@ -178,9 +178,11 @@ static void blk_mq_unregister_hctx(struct blk_mq_hw_ctx *hctx)
 		return;
 
 	hctx_for_each_ctx(hctx, ctx, i)
-		kobject_del(&ctx->kobj);
+		if (ctx->kobj.state_in_sysfs)
+			kobject_del(&ctx->kobj);
 
-	kobject_del(&hctx->kobj);
+	if (hctx->kobj.state_in_sysfs)
+		kobject_del(&hctx->kobj);
 }
 
 static int blk_mq_register_hctx(struct blk_mq_hw_ctx *hctx)
block/blk-settings.c +2 -1
index d501084bab4a..85346a6f1c77 100644
@@ -514,7 +514,8 @@ static unsigned int blk_round_down_sectors(unsigned int sectors, unsigned int lb
 int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
 		     sector_t start)
 {
-	unsigned int top, bottom, alignment, ret = 0;
+	unsigned int top, bottom, alignment;
+	int ret = 0;
 
 	t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
 	t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
crypto/essiv.c +6 -8
index 3505b071e647..365f3082ea04 100644
@@ -186,9 +186,14 @@ static int essiv_aead_crypt(struct aead_request *req, bool enc)
 	const struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm);
 	struct essiv_aead_request_ctx *rctx = aead_request_ctx(req);
 	struct aead_request *subreq = &rctx->aead_req;
+	int ivsize = crypto_aead_ivsize(tfm);
+	int ssize = req->assoclen - ivsize;
 	struct scatterlist *src = req->src;
 	int err;
 
+	if (ssize < 0)
+		return -EINVAL;
+
 	crypto_cipher_encrypt_one(tctx->essiv_cipher, req->iv, req->iv);
 
 	/*
@@ -198,19 +203,12 @@ static int essiv_aead_crypt(struct aead_request *req, bool enc)
 	 */
 	rctx->assoc = NULL;
 	if (req->src == req->dst || !enc) {
-		scatterwalk_map_and_copy(req->iv, req->dst,
-					 req->assoclen - crypto_aead_ivsize(tfm),
-					 crypto_aead_ivsize(tfm), 1);
+		scatterwalk_map_and_copy(req->iv, req->dst, ssize, ivsize, 1);
 	} else {
 		u8 *iv = (u8 *)aead_request_ctx(req) + tctx->ivoffset;
-		int ivsize = crypto_aead_ivsize(tfm);
-		int ssize = req->assoclen - ivsize;
 		struct scatterlist *sg;
 		int nents;
 
-		if (ssize < 0)
-			return -EINVAL;
-
 		nents = sg_nents_for_len(req->src, ssize);
 		if (nents < 0)
 			return -EINVAL;
crypto/rng.c +8 -0
index fea082b25fe4..a2bf2efb7937 100644
@@ -174,6 +174,11 @@ int crypto_del_default_rng(void)
 EXPORT_SYMBOL_GPL(crypto_del_default_rng);
 #endif
 
+static void rng_default_set_ent(struct crypto_rng *tfm, const u8 *data,
+				unsigned int len)
+{
+}
+
 int crypto_register_rng(struct rng_alg *alg)
 {
 	struct crypto_alg *base = &alg->base;
@@ -185,6 +190,9 @@ int crypto_register_rng(struct rng_alg *alg)
 	base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK;
 	base->cra_flags |= CRYPTO_ALG_TYPE_RNG;
 
+	if (!alg->set_ent)
+		alg->set_ent = rng_default_set_ent;
+
 	return crypto_register_alg(base);
 }
 EXPORT_SYMBOL_GPL(crypto_register_rng);
drivers/acpi/acpi_dbg.c +13 -13
index d50261d05f3a..515b20d0b698 100644
@@ -569,11 +569,11 @@ static int acpi_aml_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static int acpi_aml_read_user(char __user *buf, int len)
+static ssize_t acpi_aml_read_user(char __user *buf, size_t len)
 {
-	int ret;
 	struct circ_buf *crc = &acpi_aml_io.out_crc;
-	int n;
+	ssize_t ret;
+	size_t n;
 	char *p;
 
 	ret = acpi_aml_lock_read(crc, ACPI_AML_OUT_USER);
@@ -582,7 +582,7 @@ static int acpi_aml_read_user(char __user *buf, int len)
 	/* sync head before removing logs */
 	smp_rmb();
 	p = &crc->buf[crc->tail];
-	n = min(len, circ_count_to_end(crc));
+	n = min_t(size_t, len, circ_count_to_end(crc));
 	if (copy_to_user(buf, p, n)) {
 		ret = -EFAULT;
 		goto out;
@@ -599,8 +599,8 @@ static int acpi_aml_read_user(char __user *buf, int len)
 static ssize_t acpi_aml_read(struct file *file, char __user *buf,
 			     size_t count, loff_t *ppos)
 {
-	int ret = 0;
-	int size = 0;
+	ssize_t ret = 0;
+	ssize_t size = 0;
 
 	if (!count)
 		return 0;
@@ -639,11 +639,11 @@ static ssize_t acpi_aml_read(struct file *file, char __user *buf,
 	return size > 0 ? size : ret;
 }
 
-static int acpi_aml_write_user(const char __user *buf, int len)
+static ssize_t acpi_aml_write_user(const char __user *buf, size_t len)
 {
-	int ret;
 	struct circ_buf *crc = &acpi_aml_io.in_crc;
-	int n;
+	ssize_t ret;
+	size_t n;
 	char *p;
 
 	ret = acpi_aml_lock_write(crc, ACPI_AML_IN_USER);
@@ -652,7 +652,7 @@ static int acpi_aml_write_user(const char __user *buf, int len)
 	/* sync tail before inserting cmds */
 	smp_mb();
 	p = &crc->buf[crc->head];
-	n = min(len, circ_space_to_end(crc));
+	n = min_t(size_t, len, circ_space_to_end(crc));
 	if (copy_from_user(p, buf, n)) {
 		ret = -EFAULT;
 		goto out;
@@ -663,14 +663,14 @@ static int acpi_aml_write_user(const char __user *buf, int len)
 	ret = n;
 out:
 	acpi_aml_unlock_fifo(ACPI_AML_IN_USER, ret >= 0);
-	return n;
+	return ret;
 }
 
 static ssize_t acpi_aml_write(struct file *file, const char __user *buf,
 			      size_t count, loff_t *ppos)
 {
-	int ret = 0;
-	int size = 0;
+	ssize_t ret = 0;
+	ssize_t size = 0;
 
 	if (!count)
 		return 0;
drivers/acpi/acpi_tad.c +3 -0
index e9b8e8305e23..8383d6329c64 100644
@@ -563,6 +563,9 @@ static int acpi_tad_remove(struct platform_device *pdev)
 
 	pm_runtime_get_sync(dev);
 
+	if (dd->capabilities & ACPI_TAD_RT)
+		sysfs_remove_group(&dev->kobj, &acpi_tad_time_attr_group);
+
 	if (dd->capabilities & ACPI_TAD_DC_WAKE)
 		sysfs_remove_group(&dev->kobj, &acpi_tad_dc_attr_group);
 
drivers/acpi/nfit/core.c +1 -1
index 2a6fdce3c2e6..e420f773d674 100644
@@ -3021,7 +3021,7 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
 	if (ndr_desc->target_node == NUMA_NO_NODE) {
 		ndr_desc->target_node = phys_to_target_node(spa->address);
 		dev_info(acpi_desc->dev, "changing target node from %d to %d for nfit region [%pa-%pa]",
-			NUMA_NO_NODE, ndr_desc->numa_node, &res.start, &res.end);
+			NUMA_NO_NODE, ndr_desc->target_node, &res.start, &res.end);
 	}
 
 	/*
drivers/acpi/processor_idle.c +3 -0
index 74459ac13f4b..6b71082d474f 100644
@@ -1403,6 +1403,9 @@ int acpi_processor_power_init(struct acpi_processor *pr)
 		if (retval) {
 			if (acpi_processor_registered == 0)
 				cpuidle_unregister_driver(&acpi_idle_driver);
+
+			per_cpu(acpi_cpuidle_device, pr->id) = NULL;
+			kfree(dev);
 			return retval;
 		}
 		acpi_processor_registered++;
drivers/base/node.c +4 -0
index 5366d1b5359c..dd8c8fdfd158 100644
@@ -983,6 +983,10 @@ int __register_one_node(int nid)
 		return -ENOMEM;
 
 	error = register_node(node_devices[nid], nid);
+	if (error) {
+		node_devices[nid] = NULL;
+		return error;
+	}
 
 	/* link cpu under this node */
 	for_each_present_cpu(cpu) {
drivers/base/power/main.c +13 -1
index c784de10b494..9cd0a837af42 100644
@@ -601,8 +601,20 @@ static void __device_resume_noirq(struct device *dev, pm_message_t state, bool a
 	if (dev->power.syscore || dev->power.direct_complete)
 		goto Out;
 
-	if (!dev->power.is_noirq_suspended)
+	if (!dev->power.is_noirq_suspended) {
+		/*
+		 * This means that system suspend has been aborted in the noirq
+		 * phase before invoking the noirq suspend callback for the
+		 * device, so if device_suspend_late() has left it in suspend,
+		 * device_resume_early() should leave it in suspend either in
+		 * case the early resume of it depends on the noirq resume that
+		 * has not run.
+		 */
+		if (dev_pm_skip_suspend(dev))
+			dev->power.must_resume = false;
+
 		goto Out;
+	}
 
 	if (!dpm_wait_for_superior(dev, async))
 		goto Out;
drivers/base/regmap/regmap.c +1 -1
index ebddc69bc969..35cfbec6bf9a 100644
@@ -888,7 +888,7 @@ struct regmap *__regmap_init(struct device *dev,
 		map->read_flag_mask = bus->read_flag_mask;
 	}
 
-	if (config && config->read && config->write) {
+	if (config->read && config->write) {
 		map->reg_read  = _regmap_bus_read;
 
 		/* Bulk read/write */
drivers/bus/fsl-mc/fsl-mc-bus.c +3 -0
index a5d54dd94eed..40d5249ec55c 100644
@@ -1169,6 +1169,9 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
 	 * Get physical address of MC portal for the root DPRC:
 	 */
 	plat_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!plat_res)
+		return -EINVAL;
+
 	mc_portal_phys_addr = plat_res->start;
 	mc_portal_size = resource_size(plat_res);
 	mc_portal_base_phys_addr = mc_portal_phys_addr & ~0x3ffffff;
drivers/bus/mhi/host/init.c +2 -3
index 7ccc5cd27fd0..c192b3d83bd7 100644
@@ -161,7 +161,6 @@ void mhi_deinit_free_irq(struct mhi_controller *mhi_cntrl)
 int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
 {
 	struct mhi_event *mhi_event = mhi_cntrl->mhi_event;
-	struct device *dev = &mhi_cntrl->mhi_dev->dev;
 	unsigned long irq_flags = IRQF_SHARED | IRQF_NO_SUSPEND;
 	int i, ret;
 
@@ -182,7 +181,7 @@ int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
 			continue;
 
 		if (mhi_event->irq >= mhi_cntrl->nr_irqs) {
-			dev_err(dev, "irq %d not available for event ring\n",
+			dev_err(mhi_cntrl->cntrl_dev, "irq %d not available for event ring\n",
 				mhi_event->irq);
 			ret = -EINVAL;
 			goto error_request;
@@ -193,7 +192,7 @@ int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
 				  irq_flags,
 				  "mhi", mhi_event);
 		if (ret) {
-			dev_err(dev, "Error requesting irq:%d for ev:%d\n",
+			dev_err(mhi_cntrl->cntrl_dev, "Error requesting irq:%d for ev:%d\n",
 				mhi_cntrl->irq[mhi_event->irq], i);
 			goto error_request;
 		}
drivers/char/hw_random/ks-sa-rng.c +4 -0
index 2f2f21f1b659..d7b42888f25c 100644
@@ -240,6 +240,10 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	ks_sa_rng->clk = devm_clk_get_enabled(dev, NULL);
+	if (IS_ERR(ks_sa_rng->clk))
+		return dev_err_probe(dev, PTR_ERR(ks_sa_rng->clk), "Failed to get clock\n");
+
 	pm_runtime_enable(dev);
 	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0) {
drivers/char/tpm/tpm_tis_core.c +2 -2
index b3452259d6e0..c8c68301543b 100644
@@ -831,8 +831,8 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
 	 * will call disable_irq which undoes all of the above.
 	 */
 	if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
-		tpm_tis_write8(priv, original_int_vec,
-			       TPM_INT_VECTOR(priv->locality));
+		tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality),
+			       original_int_vec);
 		rc = -1;
 	}
 
drivers/clk/at91/clk-peripheral.c +5 -2
index 7a27ba8e0577..7605ab23dc8e 100644
@@ -268,8 +268,11 @@ static int clk_sam9x5_peripheral_determine_rate(struct clk_hw *hw,
 	long best_diff = LONG_MIN;
 	u32 shift;
 
-	if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max)
-		return parent_rate;
+	if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) {
+		req->rate = parent_rate;
+
+		return 0;
+	}
 
 	/* Fist step: check the available dividers. */
 	for (shift = 0; shift <= PERIPHERAL_MAX_SHIFT; shift++) {
drivers/clk/nxp/clk-lpc18xx-cgu.c +11 -9
index 8b686da5577b..ab8741fe57c9 100644
@@ -374,23 +374,25 @@ static unsigned long lpc18xx_pll0_recalc_rate(struct clk_hw *hw,
 	return 0;
 }
 
-static long lpc18xx_pll0_round_rate(struct clk_hw *hw, unsigned long rate,
-				    unsigned long *prate)
+static int lpc18xx_pll0_determine_rate(struct clk_hw *hw,
+				       struct clk_rate_request *req)
 {
 	unsigned long m;
 
-	if (*prate < rate) {
+	if (req->best_parent_rate < req->rate) {
 		pr_warn("%s: pll dividers not supported\n", __func__);
 		return -EINVAL;
 	}
 
-	m = DIV_ROUND_UP_ULL(*prate, rate * 2);
-	if (m <= 0 && m > LPC18XX_PLL0_MSEL_MAX) {
-		pr_warn("%s: unable to support rate %lu\n", __func__, rate);
+	m = DIV_ROUND_UP_ULL(req->best_parent_rate, req->rate * 2);
+	if (m == 0 || m > LPC18XX_PLL0_MSEL_MAX) {
+		pr_warn("%s: unable to support rate %lu\n", __func__, req->rate);
 		return -EINVAL;
 	}
 
-	return 2 * *prate * m;
+	req->rate = 2 * req->best_parent_rate * m;
+
+	return 0;
 }
 
 static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -406,7 +408,7 @@ static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
 	}
 
 	m = DIV_ROUND_UP_ULL(parent_rate, rate * 2);
-	if (m <= 0 && m > LPC18XX_PLL0_MSEL_MAX) {
+	if (m == 0 || m > LPC18XX_PLL0_MSEL_MAX) {
 		pr_warn("%s: unable to support rate %lu\n", __func__, rate);
 		return -EINVAL;
 	}
@@ -447,7 +449,7 @@ static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
 
 static const struct clk_ops lpc18xx_pll0_ops = {
 	.recalc_rate	= lpc18xx_pll0_recalc_rate,
-	.round_rate	= lpc18xx_pll0_round_rate,
+	.determine_rate = lpc18xx_pll0_determine_rate,
 	.set_rate	= lpc18xx_pll0_set_rate,
 };
 
drivers/clocksource/clps711x-timer.c +16 -7
index e95fdc49c226..bbceb0289d45 100644
@@ -78,24 +78,33 @@ static int __init clps711x_timer_init(struct device_node *np)
 	unsigned int irq = irq_of_parse_and_map(np, 0);
 	struct clk *clock = of_clk_get(np, 0);
 	void __iomem *base = of_iomap(np, 0);
+	int ret = 0;
 
 	if (!base)
 		return -ENOMEM;
-	if (!irq)
-		return -EINVAL;
-	if (IS_ERR(clock))
-		return PTR_ERR(clock);
+	if (!irq) {
+		ret = -EINVAL;
+		goto unmap_io;
+	}
+	if (IS_ERR(clock)) {
+		ret = PTR_ERR(clock);
+		goto unmap_io;
+	}
 
 	switch (of_alias_get_id(np, "timer")) {
 	case CLPS711X_CLKSRC_CLOCKSOURCE:
 		clps711x_clksrc_init(clock, base);
 		break;
 	case CLPS711X_CLKSRC_CLOCKEVENT:
-		return _clps711x_clkevt_init(clock, base, irq);
+		ret =  _clps711x_clkevt_init(clock, base, irq);
+		break;
 	default:
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
 	}
 
-	return 0;
+unmap_io:
+	iounmap(base);
+	return ret;
 }
 TIMER_OF_DECLARE(clps711x, "cirrus,ep7209-timer", clps711x_timer_init);
drivers/cpufreq/intel_pstate.c +5 -3
index 9d7a4ef21077..afe99812574a 100644
@@ -1307,10 +1307,10 @@ static void update_qos_request(enum freq_qos_req_type type)
 			continue;
 
 		req = policy->driver_data;
-		cpufreq_cpu_put(policy);
-
-		if (!req)
+		if (!req) {
+			cpufreq_cpu_put(policy);
 			continue;
+		}
 
 		if (hwp_active)
 			intel_pstate_get_hwp_cap(cpu);
@@ -1326,6 +1326,8 @@ static void update_qos_request(enum freq_qos_req_type type)
 
 		if (freq_qos_update_request(req, freq) < 0)
 			pr_warn("Failed to update freq constraint: CPU%d\n", i);
+
+		cpufreq_cpu_put(policy);
 	}
 }
 
drivers/cpufreq/scmi-cpufreq.c +10 -0
index 1f12109526fa..35287ab0148a 100644
@@ -15,6 +15,7 @@
 #include <linux/energy_model.h>
 #include <linux/export.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/pm_opp.h>
 #include <linux/slab.h>
 #include <linux/scmi_protocol.h>
@@ -319,6 +320,15 @@ static bool scmi_dev_used_by_cpus(struct device *scmi_dev)
 			return true;
 	}
 
+	/*
+	 * Older Broadcom STB chips had a "clocks" property for CPU node(s)
+	 * that did not match the SCMI performance protocol node, if we got
+	 * there, it means we had such an older Device Tree, therefore return
+	 * true to preserve backwards compatibility.
+	 */
+	if (of_machine_is_compatible("brcm,brcmstb"))
+		return true;
+
 	return false;
 }
 
drivers/cpufreq/tegra186-cpufreq.c +6 -2
index 5d1943e787b0..af7edddaa84e 100644
@@ -86,10 +86,14 @@ static int tegra186_cpufreq_set_target(struct cpufreq_policy *policy,
 {
 	struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
 	struct cpufreq_frequency_table *tbl = policy->freq_table + index;
-	unsigned int edvd_offset = data->cpus[policy->cpu].edvd_offset;
+	unsigned int edvd_offset;
 	u32 edvd_val = tbl->driver_data;
+	u32 cpu;
 
-	writel(edvd_val, data->regs + edvd_offset);
+	for_each_cpu(cpu, policy->cpus) {
+		edvd_offset = data->cpus[cpu].edvd_offset;
+		writel(edvd_val, data->regs + edvd_offset);
+	}
 
 	return 0;
 }
drivers/crypto/atmel-tdes.c +1 -1
index e30786ec9f2d..22277b5b5868 100644
@@ -548,7 +548,7 @@ static int atmel_tdes_crypt_start(struct atmel_tdes_dev *dd)
 
 	if (err && (dd->flags & TDES_FLAGS_FAST)) {
 		dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE);
-		dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_TO_DEVICE);
+		dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE);
 	}
 
 	return err;
drivers/dma/ioat/dma.c +6 -6
index e2070df6cad2..0b846c605d4b 100644
@@ -584,11 +584,11 @@ desc_get_errstat(struct ioatdma_chan *ioat_chan, struct ioat_ring_ent *desc)
 }
 
 /**
- * __cleanup - reclaim used descriptors
+ * __ioat_cleanup - reclaim used descriptors
  * @ioat_chan: channel (ring) to clean
  * @phys_complete: zeroed (or not) completion address (from status)
  */
-static void __cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete)
+static void __ioat_cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete)
 {
 	struct ioatdma_device *ioat_dma = ioat_chan->ioat_dma;
 	struct ioat_ring_ent *desc;
@@ -675,7 +675,7 @@ static void ioat_cleanup(struct ioatdma_chan *ioat_chan)
 	spin_lock_bh(&ioat_chan->cleanup_lock);
 
 	if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
-		__cleanup(ioat_chan, phys_complete);
+		__ioat_cleanup(ioat_chan, phys_complete);
 
 	if (is_ioat_halted(*ioat_chan->completion)) {
 		u32 chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
@@ -712,7 +712,7 @@ static void ioat_restart_channel(struct ioatdma_chan *ioat_chan)
 
 	ioat_quiesce(ioat_chan, 0);
 	if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
-		__cleanup(ioat_chan, phys_complete);
+		__ioat_cleanup(ioat_chan, phys_complete);
 
 	__ioat_restart_chan(ioat_chan);
 }
@@ -786,7 +786,7 @@ static void ioat_eh(struct ioatdma_chan *ioat_chan)
 
 	/* cleanup so tail points to descriptor that caused the error */
 	if (ioat_cleanup_preamble(ioat_chan, &phys_complete))
-		__cleanup(ioat_chan, phys_complete);
+		__ioat_cleanup(ioat_chan, phys_complete);
 
 	chanerr = readl(ioat_chan->reg_base + IOAT_CHANERR_OFFSET);
 	pci_read_config_dword(pdev, IOAT_PCI_CHANERR_INT_OFFSET, &chanerr_int);
@@ -943,7 +943,7 @@ void ioat_timer_event(struct timer_list *t)
 		/* timer restarted in ioat_cleanup_preamble
 		 * and IOAT_COMPLETION_ACK cleared
 		 */
-		__cleanup(ioat_chan, phys_complete);
+		__ioat_cleanup(ioat_chan, phys_complete);
 		goto unlock_out;
 	}
 
drivers/edac/sb_edac.c +2 -2
index 1522d4aa2ca6..714020e7405a 100644
@@ -109,8 +109,8 @@ static const u32 knl_interleave_list[] = {
 	0x104, 0x10c, 0x114, 0x11c,   /* 20-23 */
 };
 #define MAX_INTERLEAVE							\
-	(max_t(unsigned int, ARRAY_SIZE(sbridge_interleave_list),	\
-	       max_t(unsigned int, ARRAY_SIZE(ibridge_interleave_list),	\
+	(MAX_T(unsigned int, ARRAY_SIZE(sbridge_interleave_list),	\
+	       MAX_T(unsigned int, ARRAY_SIZE(ibridge_interleave_list),	\
 		     ARRAY_SIZE(knl_interleave_list))))
 
 struct interleave_pkg {
drivers/edac/skx_common.h +0 -1
index 13f761930b4f..1a78f18cf7fe 100644
@@ -44,7 +44,6 @@
 #define I10NM_NUM_CHANNELS	MAX(I10NM_NUM_DDR_CHANNELS, I10NM_NUM_HBM_CHANNELS)
 #define I10NM_NUM_DIMMS		MAX(I10NM_NUM_DDR_DIMMS, I10NM_NUM_HBM_DIMMS)
 
-#define MAX(a, b)	((a) > (b) ? (a) : (b))
 #define NUM_IMC		MAX(SKX_NUM_IMC, I10NM_NUM_IMC)
 #define NUM_CHANNELS	MAX(SKX_NUM_CHANNELS, I10NM_NUM_CHANNELS)
 #define NUM_DIMMS	MAX(SKX_NUM_DIMMS, I10NM_NUM_DIMMS)
drivers/firmware/meson/Kconfig +1 -1
index f2fdd3756648..179f5d46d8dd 100644
@@ -5,7 +5,7 @@
 config MESON_SM
 	tristate "Amlogic Secure Monitor driver"
 	depends on ARCH_MESON || COMPILE_TEST
-	default y
+	default ARCH_MESON
 	depends on ARM64_4K_PAGES
 	help
 	  Say y here to enable the Amlogic secure monitor driver
drivers/firmware/meson/meson_sm.c +6 -1
index bf19dd66c213..6a0a5b16663e 100644
@@ -225,11 +225,16 @@ EXPORT_SYMBOL(meson_sm_call_write);
 struct meson_sm_firmware *meson_sm_get(struct device_node *sm_node)
 {
 	struct platform_device *pdev = of_find_device_by_node(sm_node);
+	struct meson_sm_firmware *fw;
 
 	if (!pdev)
 		return NULL;
 
-	return platform_get_drvdata(pdev);
+	fw = platform_get_drvdata(pdev);
+
+	put_device(&pdev->dev);
+
+	return fw;
 }
 EXPORT_SYMBOL_GPL(meson_sm_get);
 
drivers/gpio/gpio-wcd934x.c +1 -2
index c00968ce7a56..26d70ac90933 100644
@@ -101,8 +101,7 @@ static int wcd_gpio_probe(struct platform_device *pdev)
 	chip->base = -1;
 	chip->ngpio = WCD934X_NPINS;
 	chip->label = dev_name(dev);
-	chip->of_gpio_n_cells = 2;
-	chip->can_sleep = false;
+	chip->can_sleep = true;
 
 	return devm_gpiochip_add_data(dev, chip, data);
 }
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -0
index dbef22f56482..1ee8663fd866 100644
@@ -1277,7 +1277,9 @@ int emu_soc_asic_init(struct amdgpu_device *adev);
 
 #define amdgpu_inc_vram_lost(adev) atomic_inc(&((adev)->vram_lost_counter));
 
+#ifndef MIN
 #define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
+#endif
 
 /* Common functions */
 bool amdgpu_device_has_job_running(struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +25 -4
index 0fef925b6602..e458e0d5801b 100644
@@ -625,7 +625,22 @@ static void uvd_v3_1_enable_mgcg(struct amdgpu_device *adev,
  *
  * @handle: handle used to pass amdgpu_device pointer
  *
- * Initialize the hardware, boot up the VCPU and do some testing
+ * Initialize the hardware, boot up the VCPU and do some testing.
+ *
+ * On SI, the UVD is meant to be used in a specific power state,
+ * or alternatively the driver can manually enable its clock.
+ * In amdgpu we use the dedicated UVD power state when DPM is enabled.
+ * Calling amdgpu_dpm_enable_uvd makes DPM select the UVD power state
+ * for the SMU and afterwards enables the UVD clock.
+ * This is automatically done by amdgpu_uvd_ring_begin_use when work
+ * is submitted to the UVD ring. Here, we have to call it manually
+ * in order to power up UVD before firmware validation.
+ *
+ * Note that we must not disable the UVD clock here, as that would
+ * cause the ring test to fail. However, UVD is powered off
+ * automatically after the ring test: amdgpu_uvd_ring_end_use calls
+ * the UVD idle work handler which will disable the UVD clock when
+ * all fences are signalled.
  */
 static int uvd_v3_1_hw_init(void *handle)
 {
@@ -635,6 +650,15 @@ static int uvd_v3_1_hw_init(void *handle)
 	int r;
 
 	uvd_v3_1_mc_resume(adev);
+	uvd_v3_1_enable_mgcg(adev, true);
+
+	/* Make sure UVD is powered during FW validation.
+	 * It's going to be automatically powered off after the ring test.
+	 */
+	if (adev->pm.dpm_enabled)
+		amdgpu_dpm_enable_uvd(adev, true);
+	else
+		amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
 
 	r = uvd_v3_1_fw_validate(adev);
 	if (r) {
@@ -642,9 +666,6 @@ static int uvd_v3_1_hw_init(void *handle)
 		return r;
 	}
 
-	uvd_v3_1_enable_mgcg(adev, true);
-	amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-
 	uvd_v3_1_start(adev);
 
 	r = amdgpu_ring_test_helper(ring);
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +1 -1
index 7f55decc5f37..d21bebfa884e 100644
@@ -3228,7 +3228,7 @@ svm_ioctl(struct kfd_process *p, enum kfd_ioctl_svm_op op, uint64_t start,
 		r = svm_range_get_attr(p, start, size, nattrs, attrs);
 		break;
 	default:
-		r = EINVAL;
+		r = -EINVAL;
 		break;
 	}
 
drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +13 -8
index 670d5ab9d998..f97c18267708 100644
@@ -154,10 +154,13 @@ static bool dce60_setup_scaling_configuration(
 	REG_SET(SCL_BYPASS_CONTROL, 0, SCL_BYPASS_MODE, 0);
 
 	if (data->taps.h_taps + data->taps.v_taps <= 2) {
-		/* Set bypass */
-
-		/* DCE6 has no SCL_MODE register, skip scale mode programming */
+		/* Disable scaler functionality */
+		REG_WRITE(SCL_SCALER_ENABLE, 0);
 
+		/* Clear registers that can cause glitches even when the scaler is off */
+		REG_WRITE(SCL_TAP_CONTROL, 0);
+		REG_WRITE(SCL_AUTOMATIC_MODE_CONTROL, 0);
+		REG_WRITE(SCL_F_SHARP_CONTROL, 0);
 		return false;
 	}
 
@@ -165,7 +168,7 @@ static bool dce60_setup_scaling_configuration(
 			SCL_H_NUM_OF_TAPS, data->taps.h_taps - 1,
 			SCL_V_NUM_OF_TAPS, data->taps.v_taps - 1);
 
-	/* DCE6 has no SCL_MODE register, skip scale mode programming */
+	REG_WRITE(SCL_SCALER_ENABLE, 1);
 
 	/* DCE6 has no SCL_BOUNDARY_MODE bit, skip replace out of bound pixels */
 
@@ -502,6 +505,8 @@ static void dce60_transform_set_scaler(
 	REG_SET(DC_LB_MEM_SIZE, 0,
 		DC_LB_MEM_SIZE, xfm_dce->lb_memory_size);
 
+	REG_WRITE(SCL_UPDATE, 0x00010000);
+
 	/* Clear SCL_F_SHARP_CONTROL value to 0 */
 	REG_WRITE(SCL_F_SHARP_CONTROL, 0);
 
@@ -527,8 +532,7 @@ static void dce60_transform_set_scaler(
 		if (coeffs_v != xfm_dce->filter_v || coeffs_h != xfm_dce->filter_h) {
 			/* 4. Program vertical filters */
 			if (xfm_dce->filter_v == NULL)
-				REG_SET(SCL_VERT_FILTER_CONTROL, 0,
-						SCL_V_2TAP_HARDCODE_COEF_EN, 0);
+				REG_WRITE(SCL_VERT_FILTER_CONTROL, 0);
 			program_multi_taps_filter(
 					xfm_dce,
 					data->taps.v_taps,
@@ -542,8 +546,7 @@ static void dce60_transform_set_scaler(
 
 			/* 5. Program horizontal filters */
 			if (xfm_dce->filter_h == NULL)
-				REG_SET(SCL_HORZ_FILTER_CONTROL, 0,
-						SCL_H_2TAP_HARDCODE_COEF_EN, 0);
+				REG_WRITE(SCL_HORZ_FILTER_CONTROL, 0);
 			program_multi_taps_filter(
 					xfm_dce,
 					data->taps.h_taps,
@@ -566,6 +569,8 @@ static void dce60_transform_set_scaler(
 	/* DCE6 has no SCL_COEF_UPDATE_COMPLETE bit to flip to new coefficient memory */
 
 	/* DCE6 DATA_FORMAT register does not support ALPHA_EN */
+
+	REG_WRITE(SCL_UPDATE, 0);
 }
 #endif
 
drivers/gpu/drm/amd/display/dc/dce/dce_transform.h +4 -0
index cbce194ec7b8..eb716e8337e2 100644
@@ -155,6 +155,9 @@
 	SRI(SCL_COEF_RAM_TAP_DATA, SCL, id), \
 	SRI(VIEWPORT_START, SCL, id), \
 	SRI(VIEWPORT_SIZE, SCL, id), \
+	SRI(SCL_SCALER_ENABLE, SCL, id), \
+	SRI(SCL_HORZ_FILTER_INIT_RGB_LUMA, SCL, id), \
+	SRI(SCL_HORZ_FILTER_INIT_CHROMA, SCL, id), \
 	SRI(SCL_HORZ_FILTER_SCALE_RATIO, SCL, id), \
 	SRI(SCL_VERT_FILTER_SCALE_RATIO, SCL, id), \
 	SRI(SCL_VERT_FILTER_INIT, SCL, id), \
@@ -590,6 +593,7 @@ struct dce_transform_registers {
 	uint32_t SCL_VERT_FILTER_SCALE_RATIO;
 	uint32_t SCL_HORZ_FILTER_INIT;
 #if defined(CONFIG_DRM_AMD_DC_SI)
+	uint32_t SCL_SCALER_ENABLE;
 	uint32_t SCL_HORZ_FILTER_INIT_RGB_LUMA;
 	uint32_t SCL_HORZ_FILTER_INIT_CHROMA;
 #endif
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c +2 -0
index 1b2df97226a3..40286e8dd4e1 100644
@@ -25,7 +25,9 @@
 
 #include "hdcp.h"
 
+#ifndef MIN
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
 #define HDCP_I2C_ADDR 0x3a	/* 0x74 >> 1*/
 #define KSV_READ_SIZE 0xf	/* 0x6803b - 0x6802c */
 #define HDCP_MAX_AUX_TRANSACTION_SIZE 16
drivers/gpu/drm/amd/include/asic_reg/dce/dce_6_0_d.h +7 -0
index 9de01ae574c0..067eddd9c62d 100644
@@ -4115,6 +4115,7 @@
 #define mmSCL0_SCL_COEF_RAM_CONFLICT_STATUS 0x1B55
 #define mmSCL0_SCL_COEF_RAM_SELECT 0x1B40
 #define mmSCL0_SCL_COEF_RAM_TAP_DATA 0x1B41
+#define mmSCL0_SCL_SCALER_ENABLE 0x1B42
 #define mmSCL0_SCL_CONTROL 0x1B44
 #define mmSCL0_SCL_DEBUG 0x1B6A
 #define mmSCL0_SCL_DEBUG2 0x1B69
@@ -4144,6 +4145,7 @@
 #define mmSCL1_SCL_COEF_RAM_CONFLICT_STATUS 0x1E55
 #define mmSCL1_SCL_COEF_RAM_SELECT 0x1E40
 #define mmSCL1_SCL_COEF_RAM_TAP_DATA 0x1E41
+#define mmSCL1_SCL_SCALER_ENABLE 0x1E42
 #define mmSCL1_SCL_CONTROL 0x1E44
 #define mmSCL1_SCL_DEBUG 0x1E6A
 #define mmSCL1_SCL_DEBUG2 0x1E69
@@ -4173,6 +4175,7 @@
 #define mmSCL2_SCL_COEF_RAM_CONFLICT_STATUS 0x4155
 #define mmSCL2_SCL_COEF_RAM_SELECT 0x4140
 #define mmSCL2_SCL_COEF_RAM_TAP_DATA 0x4141
+#define mmSCL2_SCL_SCALER_ENABLE 0x4142
 #define mmSCL2_SCL_CONTROL 0x4144
 #define mmSCL2_SCL_DEBUG 0x416A
 #define mmSCL2_SCL_DEBUG2 0x4169
@@ -4202,6 +4205,7 @@
 #define mmSCL3_SCL_COEF_RAM_CONFLICT_STATUS 0x4455
 #define mmSCL3_SCL_COEF_RAM_SELECT 0x4440
 #define mmSCL3_SCL_COEF_RAM_TAP_DATA 0x4441
+#define mmSCL3_SCL_SCALER_ENABLE 0x4442
 #define mmSCL3_SCL_CONTROL 0x4444
 #define mmSCL3_SCL_DEBUG 0x446A
 #define mmSCL3_SCL_DEBUG2 0x4469
@@ -4231,6 +4235,7 @@
 #define mmSCL4_SCL_COEF_RAM_CONFLICT_STATUS 0x4755
 #define mmSCL4_SCL_COEF_RAM_SELECT 0x4740
 #define mmSCL4_SCL_COEF_RAM_TAP_DATA 0x4741
+#define mmSCL4_SCL_SCALER_ENABLE 0x4742
 #define mmSCL4_SCL_CONTROL 0x4744
 #define mmSCL4_SCL_DEBUG 0x476A
 #define mmSCL4_SCL_DEBUG2 0x4769
@@ -4260,6 +4265,7 @@
 #define mmSCL5_SCL_COEF_RAM_CONFLICT_STATUS 0x4A55
 #define mmSCL5_SCL_COEF_RAM_SELECT 0x4A40
 #define mmSCL5_SCL_COEF_RAM_TAP_DATA 0x4A41
+#define mmSCL5_SCL_SCALER_ENABLE 0x4A42
 #define mmSCL5_SCL_CONTROL 0x4A44
 #define mmSCL5_SCL_DEBUG 0x4A6A
 #define mmSCL5_SCL_DEBUG2 0x4A69
@@ -4287,6 +4293,7 @@
 #define mmSCL_COEF_RAM_CONFLICT_STATUS 0x1B55
 #define mmSCL_COEF_RAM_SELECT 0x1B40
 #define mmSCL_COEF_RAM_TAP_DATA 0x1B41
+#define mmSCL_SCALER_ENABLE 0x1B42
 #define mmSCL_CONTROL 0x1B44
 #define mmSCL_DEBUG 0x1B6A
 #define mmSCL_DEBUG2 0x1B69
drivers/gpu/drm/amd/include/asic_reg/dce/dce_6_0_sh_mask.h +2 -0
index 41c4a46ce357..afe7303802c6 100644
@@ -8646,6 +8646,8 @@
 #define REGAMMA_LUT_INDEX__REGAMMA_LUT_INDEX__SHIFT 0x00000000
 #define REGAMMA_LUT_WRITE_EN_MASK__REGAMMA_LUT_WRITE_EN_MASK_MASK 0x00000007L
 #define REGAMMA_LUT_WRITE_EN_MASK__REGAMMA_LUT_WRITE_EN_MASK__SHIFT 0x00000000
+#define SCL_SCALER_ENABLE__SCL_SCALE_EN_MASK 0x00000001L
+#define SCL_SCALER_ENABLE__SCL_SCALE_EN__SHIFT 0x00000000
 #define SCL_ALU_CONTROL__SCL_ALU_DISABLE_MASK 0x00000001L
 #define SCL_ALU_CONTROL__SCL_ALU_DISABLE__SHIFT 0x00000000
 #define SCL_BYPASS_CONTROL__SCL_BYPASS_MODE_MASK 0x00000003L
drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h +10 -4
index dac29fe6cfc6..abbdb7731996 100644
@@ -22,12 +22,18 @@
  */
 #include <asm/div64.h>
 
-#define SHIFT_AMOUNT 16 /* We multiply all original integers with 2^SHIFT_AMOUNT to get the fInt representation */
+enum ppevvmath_constants {
+	/* We multiply all original integers with 2^SHIFT_AMOUNT to get the fInt representation */
+	SHIFT_AMOUNT	= 16,
 
-#define PRECISION 5 /* Change this value to change the number of decimal places in the final output - 5 is a good default */
+	/* Change this value to change the number of decimal places in the final output - 5 is a good default */
+	PRECISION	=  5,
 
-#define SHIFTED_2 (2 << SHIFT_AMOUNT)
-#define MAX (1 << (SHIFT_AMOUNT - 1)) - 1 /* 32767 - Might change in the future */
+	SHIFTED_2	= (2 << SHIFT_AMOUNT),
+
+	/* 32767 - Might change in the future */
+	MAX		= (1 << (SHIFT_AMOUNT - 1)) - 1,
+};
 
 /* -------------------------------------------------------------------------------
  * NEW TYPE - fINT
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +2 -0
index d4fde146bd4c..95894c25881a 100644
@@ -1964,7 +1964,9 @@ static void sienna_cichlid_get_override_pcie_settings(struct smu_context *smu,
 	}
 }
 
+#ifndef MAX
 #define MAX(a, b)	((a) > (b) ? (a) : (b))
+#endif
 
 static int sienna_cichlid_update_pcie_parameters(struct smu_context *smu,
 					 uint32_t pcie_gen_cap,
drivers/gpu/drm/arm/display/include/malidp_utils.h +1 -1
index 49a1d7f3539c..9f83baac6ed8 100644
@@ -35,7 +35,7 @@ static inline void set_range(struct malidp_range *rg, u32 start, u32 end)
 	rg->end   = end;
 }
 
-static inline bool in_range(struct malidp_range *rg, u32 v)
+static inline bool malidp_in_range(struct malidp_range *rg, u32 v)
 {
 	return (v >= rg->start) && (v <= rg->end);
 }
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c +12 -12
index c956fda918be..4aa527ca765b 100644
@@ -305,12 +305,12 @@ komeda_layer_check_cfg(struct komeda_layer *layer,
 	if (komeda_fb_check_src_coords(kfb, src_x, src_y, src_w, src_h))
 		return -EINVAL;
 
-	if (!in_range(&layer->hsize_in, src_w)) {
+	if (!malidp_in_range(&layer->hsize_in, src_w)) {
 		DRM_DEBUG_ATOMIC("invalidate src_w %d.\n", src_w);
 		return -EINVAL;
 	}
 
-	if (!in_range(&layer->vsize_in, src_h)) {
+	if (!malidp_in_range(&layer->vsize_in, src_h)) {
 		DRM_DEBUG_ATOMIC("invalidate src_h %d.\n", src_h);
 		return -EINVAL;
 	}
@@ -452,14 +452,14 @@ komeda_scaler_check_cfg(struct komeda_scaler *scaler,
 	hsize_out = dflow->out_w;
 	vsize_out = dflow->out_h;
 
-	if (!in_range(&scaler->hsize, hsize_in) ||
-	    !in_range(&scaler->hsize, hsize_out)) {
+	if (!malidp_in_range(&scaler->hsize, hsize_in) ||
+	    !malidp_in_range(&scaler->hsize, hsize_out)) {
 		DRM_DEBUG_ATOMIC("Invalid horizontal sizes");
 		return -EINVAL;
 	}
 
-	if (!in_range(&scaler->vsize, vsize_in) ||
-	    !in_range(&scaler->vsize, vsize_out)) {
+	if (!malidp_in_range(&scaler->vsize, vsize_in) ||
+	    !malidp_in_range(&scaler->vsize, vsize_out)) {
 		DRM_DEBUG_ATOMIC("Invalid vertical sizes");
 		return -EINVAL;
 	}
@@ -574,13 +574,13 @@ komeda_splitter_validate(struct komeda_splitter *splitter,
 		return -EINVAL;
 	}
 
-	if (!in_range(&splitter->hsize, dflow->in_w)) {
+	if (!malidp_in_range(&splitter->hsize, dflow->in_w)) {
 		DRM_DEBUG_ATOMIC("split in_w:%d is out of the acceptable range.\n",
 				 dflow->in_w);
 		return -EINVAL;
 	}
 
-	if (!in_range(&splitter->vsize, dflow->in_h)) {
+	if (!malidp_in_range(&splitter->vsize, dflow->in_h)) {
 		DRM_DEBUG_ATOMIC("split in_h: %d exceeds the acceptable range.\n",
 				 dflow->in_h);
 		return -EINVAL;
@@ -624,13 +624,13 @@ komeda_merger_validate(struct komeda_merger *merger,
 		return -EINVAL;
 	}
 
-	if (!in_range(&merger->hsize_merged, output->out_w)) {
+	if (!malidp_in_range(&merger->hsize_merged, output->out_w)) {
 		DRM_DEBUG_ATOMIC("merged_w: %d is out of the accepted range.\n",
 				 output->out_w);
 		return -EINVAL;
 	}
 
-	if (!in_range(&merger->vsize_merged, output->out_h)) {
+	if (!malidp_in_range(&merger->vsize_merged, output->out_h)) {
 		DRM_DEBUG_ATOMIC("merged_h: %d is out of the accepted range.\n",
 				 output->out_h);
 		return -EINVAL;
@@ -866,8 +866,8 @@ void komeda_complete_data_flow_cfg(struct komeda_layer *layer,
 	 * input/output range.
 	 */
 	if (dflow->en_scaling && scaler)
-		dflow->en_split = !in_range(&scaler->hsize, dflow->in_w) ||
-				  !in_range(&scaler->hsize, dflow->out_w);
+		dflow->en_split = !malidp_in_range(&scaler->hsize, dflow->in_w) ||
+				  !malidp_in_range(&scaler->hsize, dflow->out_w);
 }
 
 static bool merger_is_available(struct komeda_pipeline *pipe,
drivers/gpu/drm/drm_color_mgmt.c +1 -1
index bb14f488c8f6..1ff572d8744e 100644
@@ -528,7 +528,7 @@ int drm_plane_create_color_properties(struct drm_plane *plane,
 {
 	struct drm_device *dev = plane->dev;
 	struct drm_property *prop;
-	struct drm_prop_enum_list enum_list[max_t(int, DRM_COLOR_ENCODING_MAX,
+	struct drm_prop_enum_list enum_list[MAX_T(int, DRM_COLOR_ENCODING_MAX,
 						       DRM_COLOR_RANGE_MAX)];
 	int i, len;
 
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +0 -6
index f1daa923f346..9215322fc915 100644
@@ -676,12 +676,6 @@ struct block_header {
 	u32 data[];
 };
 
-/* this should be a general kernel helper */
-static int in_range(u32 addr, u32 start, u32 size)
-{
-	return addr >= start && addr < start + size;
-}
-
 static bool fw_block_mem(struct a6xx_gmu_bo *bo, const struct block_header *blk)
 {
 	if (!in_range(blk->addr, bo->iova, bo->size))
drivers/gpu/drm/nouveau/nouveau_bo.c +1 -1
index 4b16266ac76a..21e81546b157 100644
@@ -791,7 +791,7 @@ nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo,
 		nvif_vmm_put(vmm, &old_mem->vma[1]);
 		nvif_vmm_put(vmm, &old_mem->vma[0]);
 	}
-	return 0;
+	return ret;
 }
 
 static int
drivers/gpu/drm/radeon/evergreen_cs.c +2 -0
index 820c2c3641d3..1311f10fad66 100644
@@ -33,8 +33,10 @@
 #include "evergreen_reg_safe.h"
 #include "cayman_reg_safe.h"
 
+#ifndef MIN
 #define MAX(a,b)                   (((a)>(b))?(a):(b))
 #define MIN(a,b)                   (((a)<(b))?(a):(b))
+#endif
 
 #define REG_SAFE_BM_SIZE ARRAY_SIZE(evergreen_reg_safe_bm)
 
drivers/gpu/drm/radeon/r600_cs.c +2 -2
index 7fe2c4985498..d5e5f08deeec 100644
@@ -1410,7 +1410,7 @@ static void r600_texture_size(unsigned nfaces, unsigned blevel, unsigned llevel,
 			      unsigned block_align, unsigned height_align, unsigned base_align,
 			      unsigned *l0_size, unsigned *mipmap_size)
 {
-	unsigned offset, i, level;
+	unsigned offset, i;
 	unsigned width, height, depth, size;
 	unsigned blocksize;
 	unsigned nbx, nby;
@@ -1422,7 +1422,7 @@ static void r600_texture_size(unsigned nfaces, unsigned blevel, unsigned llevel,
 	w0 = r600_mip_minify(w0, 0);
 	h0 = r600_mip_minify(h0, 0);
 	d0 = r600_mip_minify(d0, 0);
-	for(i = 0, offset = 0, level = blevel; i < nlevels; i++, level++) {
+	for (i = 0, offset = 0; i < nlevels; i++) {
 		width = r600_mip_minify(w0, i);
 		nbx = r600_fmt_get_nblocksx(format, width);
 
drivers/gpu/drm/vmwgfx/Makefile +1 -1
index 18edc7ca5b45..59b0b77456dd 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
+vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_hashtab.o vmwgfx_kms.o vmwgfx_drv.o \
 	    vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \
 	    vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \
 	    vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \
drivers/gpu/drm/vmwgfx/ttm_object.c +26 -26

165 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/ttm_object.h +1 -2
index 49b064f0cb19..6885ccbeec7a 100644
@@ -42,9 +42,8 @@
 #include <linux/list.h>
 #include <linux/rcupdate.h>
 
-#include <drm/drm_hashtab.h>
-
 #include "ttm_memory.h"
+#include "vmwgfx_hashtab.h"
 
 /**
  * enum ttm_ref_type
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +12 -12
index 8381750db81b..494cb98061f2 100644
@@ -42,7 +42,7 @@
  */
 struct vmw_cmdbuf_res {
 	struct vmw_resource *res;
-	struct drm_hash_item hash;
+	struct vmwgfx_hash_item hash;
 	struct list_head head;
 	enum vmw_cmdbuf_res_state state;
 	struct vmw_cmdbuf_res_manager *man;
@@ -59,7 +59,7 @@ struct vmw_cmdbuf_res {
  * @resources and @list are protected by the cmdbuf mutex for now.
  */
 struct vmw_cmdbuf_res_manager {
-	struct drm_open_hash resources;
+	struct vmwgfx_open_hash resources;
 	struct list_head list;
 	struct vmw_private *dev_priv;
 };
@@ -81,11 +81,11 @@ vmw_cmdbuf_res_lookup(struct vmw_cmdbuf_res_manager *man,
 		      enum vmw_cmdbuf_res_type res_type,
 		      u32 user_key)
 {
-	struct drm_hash_item *hash;
+	struct vmwgfx_hash_item *hash;
 	int ret;
 	unsigned long key = user_key | (res_type << 24);
 
-	ret = drm_ht_find_item(&man->resources, key, &hash);
+	ret = vmwgfx_ht_find_item(&man->resources, key, &hash);
 	if (unlikely(ret != 0))
 		return ERR_PTR(ret);
 
@@ -105,7 +105,7 @@ static void vmw_cmdbuf_res_free(struct vmw_cmdbuf_res_manager *man,
 				struct vmw_cmdbuf_res *entry)
 {
 	list_del(&entry->head);
-	WARN_ON(drm_ht_remove_item(&man->resources, &entry->hash));
+	WARN_ON(vmwgfx_ht_remove_item(&man->resources, &entry->hash));
 	vmw_resource_unreference(&entry->res);
 	kfree(entry);
 }
@@ -167,7 +167,7 @@ void vmw_cmdbuf_res_revert(struct list_head *list)
 			vmw_cmdbuf_res_free(entry->man, entry);
 			break;
 		case VMW_CMDBUF_RES_DEL:
-			ret = drm_ht_insert_item(&entry->man->resources, &entry->hash);
+			ret = vmwgfx_ht_insert_item(&entry->man->resources, &entry->hash);
 			BUG_ON(ret);
 			list_move_tail(&entry->head, &entry->man->list);
 			entry->state = VMW_CMDBUF_RES_COMMITTED;
@@ -206,7 +206,7 @@ int vmw_cmdbuf_res_add(struct vmw_cmdbuf_res_manager *man,
 		return -ENOMEM;
 
 	cres->hash.key = user_key | (res_type << 24);
-	ret = drm_ht_insert_item(&man->resources, &cres->hash);
+	ret = vmwgfx_ht_insert_item(&man->resources, &cres->hash);
 	if (unlikely(ret != 0)) {
 		kfree(cres);
 		goto out_invalid_key;
@@ -244,10 +244,10 @@ int vmw_cmdbuf_res_remove(struct vmw_cmdbuf_res_manager *man,
 			  struct vmw_resource **res_p)
 {
 	struct vmw_cmdbuf_res *entry;
-	struct drm_hash_item *hash;
+	struct vmwgfx_hash_item *hash;
 	int ret;
 
-	ret = drm_ht_find_item(&man->resources, user_key | (res_type << 24),
+	ret = vmwgfx_ht_find_item(&man->resources, user_key | (res_type << 24),
 			       &hash);
 	if (likely(ret != 0))
 		return -EINVAL;
@@ -260,7 +260,7 @@ int vmw_cmdbuf_res_remove(struct vmw_cmdbuf_res_manager *man,
 		*res_p = NULL;
 		break;
 	case VMW_CMDBUF_RES_COMMITTED:
-		(void) drm_ht_remove_item(&man->resources, &entry->hash);
+		(void) vmwgfx_ht_remove_item(&man->resources, &entry->hash);
 		list_del(&entry->head);
 		entry->state = VMW_CMDBUF_RES_DEL;
 		list_add_tail(&entry->head, list);
@@ -295,7 +295,7 @@ vmw_cmdbuf_res_man_create(struct vmw_private *dev_priv)
 
 	man->dev_priv = dev_priv;
 	INIT_LIST_HEAD(&man->list);
-	ret = drm_ht_create(&man->resources, VMW_CMDBUF_RES_MAN_HT_ORDER);
+	ret = vmwgfx_ht_create(&man->resources, VMW_CMDBUF_RES_MAN_HT_ORDER);
 	if (ret == 0)
 		return man;
 
@@ -320,7 +320,7 @@ void vmw_cmdbuf_res_man_destroy(struct vmw_cmdbuf_res_manager *man)
 	list_for_each_entry_safe(entry, next, &man->list, head)
 		vmw_cmdbuf_res_free(man, entry);
 
-	drm_ht_remove(&man->resources);
+	vmwgfx_ht_remove(&man->resources);
 	kfree(man);
 }
 
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 -1
index 0f09a9116b05..4fea95a65041 100644
@@ -1149,7 +1149,7 @@ static void vmw_driver_unload(struct drm_device *dev)
 	unregister_pm_notifier(&dev_priv->pm_nb);
 
 	if (dev_priv->ctx.res_ht_initialized)
-		drm_ht_remove(&dev_priv->ctx.res_ht);
+		vmwgfx_ht_remove(&dev_priv->ctx.res_ht);
 	vfree(dev_priv->ctx.cmd_bounce);
 	if (dev_priv->enable_fb) {
 		vmw_fb_off(dev_priv);
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +3 -3
index 9c60bb2aefe1..1099cb5e2500 100644
@@ -34,7 +34,6 @@
 #include <drm/drm_auth.h>
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
-#include <drm/drm_hashtab.h>
 #include <drm/drm_rect.h>
 
 #include <drm/ttm/ttm_bo_driver.h>
@@ -43,6 +42,7 @@
 #include "ttm_object.h"
 
 #include "vmwgfx_fence.h"
+#include "vmwgfx_hashtab.h"
 #include "vmwgfx_reg.h"
 #include "vmwgfx_validation.h"
 
@@ -131,7 +131,7 @@ struct vmw_buffer_object {
  */
 struct vmw_validate_buffer {
 	struct ttm_validate_buffer base;
-	struct drm_hash_item hash;
+	struct vmwgfx_hash_item hash;
 	bool validate_as_mob;
 };
 
@@ -404,7 +404,7 @@ struct vmw_ctx_validation_info;
  * @ctx: The validation context
  */
 struct vmw_sw_context{
-	struct drm_open_hash res_ht;
+	struct vmwgfx_open_hash res_ht;
 	bool res_ht_initialized;
 	bool kernel;
 	struct vmw_fpriv *fp;
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
index 21134c7f1838..7dd42c5a7fd6 100644
@@ -4112,7 +4112,7 @@ int vmw_execbuf_process(struct drm_file *file_priv,
 		vmw_binding_state_reset(sw_context->staged_bindings);
 
 	if (!sw_context->res_ht_initialized) {
-		ret = drm_ht_create(&sw_context->res_ht, VMW_RES_HT_ORDER);
+		ret = vmwgfx_ht_create(&sw_context->res_ht, VMW_RES_HT_ORDER);
 		if (unlikely(ret != 0))
 			goto out_unlock;
 
drivers/gpu/drm/vmwgfx/vmwgfx_hashtab.c new file +199 -0

199 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/vmwgfx_hashtab.h new file +83 -0

83 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/vmwgfx_validation.c +14 -12
index b09094b50c5d..4633bd308185 100644
@@ -43,7 +43,7 @@
  */
 struct vmw_validation_bo_node {
 	struct ttm_validate_buffer base;
-	struct drm_hash_item hash;
+	struct vmwgfx_hash_item hash;
 	unsigned int coherent_count;
 	u32 as_mob : 1;
 	u32 cpu_blit : 1;
@@ -72,7 +72,7 @@ struct vmw_validation_bo_node {
  */
 struct vmw_validation_res_node {
 	struct list_head head;
-	struct drm_hash_item hash;
+	struct vmwgfx_hash_item hash;
 	struct vmw_resource *res;
 	struct vmw_buffer_object *new_backup;
 	unsigned long new_backup_offset;
@@ -184,9 +184,9 @@ vmw_validation_find_bo_dup(struct vmw_validation_context *ctx,
 		return NULL;
 
 	if (ctx->ht) {
-		struct drm_hash_item *hash;
+		struct vmwgfx_hash_item *hash;
 
-		if (!drm_ht_find_item(ctx->ht, (unsigned long) vbo, &hash))
+		if (!vmwgfx_ht_find_item(ctx->ht, (unsigned long) vbo, &hash))
 			bo_node = container_of(hash, typeof(*bo_node), hash);
 	} else {
 		struct  vmw_validation_bo_node *entry;
@@ -221,9 +221,9 @@ vmw_validation_find_res_dup(struct vmw_validation_context *ctx,
 		return NULL;
 
 	if (ctx->ht) {
-		struct drm_hash_item *hash;
+		struct vmwgfx_hash_item *hash;
 
-		if (!drm_ht_find_item(ctx->ht, (unsigned long) res, &hash))
+		if (!vmwgfx_ht_find_item(ctx->ht, (unsigned long) res, &hash))
 			res_node = container_of(hash, typeof(*res_node), hash);
 	} else {
 		struct  vmw_validation_res_node *entry;
@@ -280,7 +280,7 @@ int vmw_validation_add_bo(struct vmw_validation_context *ctx,
 
 		if (ctx->ht) {
 			bo_node->hash.key = (unsigned long) vbo;
-			ret = drm_ht_insert_item(ctx->ht, &bo_node->hash);
+			ret = vmwgfx_ht_insert_item(ctx->ht, &bo_node->hash);
 			if (ret) {
 				DRM_ERROR("Failed to initialize a buffer "
 					  "validation entry.\n");
@@ -335,7 +335,7 @@ int vmw_validation_add_resource(struct vmw_validation_context *ctx,
 
 	if (ctx->ht) {
 		node->hash.key = (unsigned long) res;
-		ret = drm_ht_insert_item(ctx->ht, &node->hash);
+		ret = vmwgfx_ht_insert_item(ctx->ht, &node->hash);
 		if (ret) {
 			DRM_ERROR("Failed to initialize a resource validation "
 				  "entry.\n");
@@ -343,8 +343,10 @@ int vmw_validation_add_resource(struct vmw_validation_context *ctx,
 		}
 	}
 	node->res = vmw_resource_reference_unless_doomed(res);
-	if (!node->res)
+	if (!node->res) {
+		hash_del_rcu(&node->hash.head);
 		return -ESRCH;
+	}
 
 	node->first_usage = 1;
 	if (!res->dev_priv->has_mob) {
@@ -688,13 +690,13 @@ void vmw_validation_drop_ht(struct vmw_validation_context *ctx)
 		return;
 
 	list_for_each_entry(entry, &ctx->bo_list, base.head)
-		(void) drm_ht_remove_item(ctx->ht, &entry->hash);
+		(void) vmwgfx_ht_remove_item(ctx->ht, &entry->hash);
 
 	list_for_each_entry(val, &ctx->resource_list, head)
-		(void) drm_ht_remove_item(ctx->ht, &val->hash);
+		(void) vmwgfx_ht_remove_item(ctx->ht, &val->hash);
 
 	list_for_each_entry(val, &ctx->resource_ctx_list, head)
-		(void) drm_ht_remove_item(ctx->ht, &val->hash);
+		(void) vmwgfx_ht_remove_item(ctx->ht, &val->hash);
 
 	ctx->ht = NULL;
 }
drivers/gpu/drm/vmwgfx/vmwgfx_validation.h +4 -3
index 739906d1b3eb..495fd504b8c6 100644
@@ -31,9 +31,10 @@
 #include <linux/list.h>
 #include <linux/ww_mutex.h>
 
-#include <drm/drm_hashtab.h>
 #include <drm/ttm/ttm_execbuf_util.h>
 
+#include "vmwgfx_hashtab.h"
+
 #define VMW_RES_DIRTY_NONE 0
 #define VMW_RES_DIRTY_SET BIT(0)
 #define VMW_RES_DIRTY_CLEAR BIT(1)
@@ -73,7 +74,7 @@ struct vmw_validation_mem {
  * @total_mem: Amount of reserved memory.
  */
 struct vmw_validation_context {
-	struct drm_open_hash *ht;
+	struct vmwgfx_open_hash *ht;
 	struct list_head resource_list;
 	struct list_head resource_ctx_list;
 	struct list_head bo_list;
@@ -151,7 +152,7 @@ vmw_validation_set_val_mem(struct vmw_validation_context *ctx,
  * available at validation context declaration time
  */
 static inline void vmw_validation_set_ht(struct vmw_validation_context *ctx,
-					 struct drm_open_hash *ht)
+					 struct vmwgfx_open_hash *ht)
 {
 	ctx->ht = ht;
 }
drivers/hid/hid-mcp2221.c +4 -0
index 69076d52dccf..589f13ff0b60 100644
@@ -791,6 +791,10 @@ static int mcp2221_raw_event(struct hid_device *hdev,
 			}
 			if (data[2] == MCP2221_I2C_READ_COMPL ||
 			    data[2] == MCP2221_I2C_READ_PARTIAL) {
+				if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
+					mcp->status = -EINVAL;
+					break;
+				}
 				buf = mcp->rxbuf;
 				memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
 				mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
drivers/hwmon/adt7475.c +12 -12
index b4c0f01f52c4..1e0678eb0077 100644
@@ -23,23 +23,23 @@
 #include <linux/util_macros.h>
 
 /* Indexes for the sysfs hooks */
-
-#define INPUT		0
-#define MIN		1
-#define MAX		2
-#define CONTROL		3
-#define OFFSET		3
-#define AUTOMIN		4
-#define THERM		5
-#define HYSTERSIS	6
-
+enum adt_sysfs_id {
+	INPUT		= 0,
+	MIN		= 1,
+	MAX		= 2,
+	CONTROL		= 3,
+	OFFSET		= 3,	// Dup
+	AUTOMIN		= 4,
+	THERM		= 5,
+	HYSTERSIS	= 6,
 /*
  * These are unique identifiers for the sysfs functions - unlike the
  * numbers above, these are not also indexes into an array
  */
+	ALARM		= 9,
+	FAULT		= 10,
+};
 
-#define ALARM		9
-#define FAULT		10
 
 /* 7475 Common Registers */
 
drivers/hwtracing/coresight/coresight-trbe.c +5 -4
index fac63d092c7b..dfdb5d426325 100644
@@ -18,7 +18,8 @@
 #include <asm/barrier.h>
 #include "coresight-trbe.h"
 
-#define PERF_IDX2OFF(idx, buf) ((idx) % ((buf)->nr_pages << PAGE_SHIFT))
+#define PERF_IDX2OFF(idx, buf) \
+	((idx) % ((unsigned long)(buf)->nr_pages << PAGE_SHIFT))
 
 /*
  * A padding packet that will help the user space tools
@@ -502,12 +503,12 @@ static void *arm_trbe_alloc_buffer(struct coresight_device *csdev,
 
 	buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, trbe_alloc_node(event));
 	if (!buf)
-		return ERR_PTR(-ENOMEM);
+		return NULL;
 
 	pglist = kcalloc(nr_pages, sizeof(*pglist), GFP_KERNEL);
 	if (!pglist) {
 		kfree(buf);
-		return ERR_PTR(-ENOMEM);
+		return NULL;
 	}
 
 	for (i = 0; i < nr_pages; i++)
@@ -517,7 +518,7 @@ static void *arm_trbe_alloc_buffer(struct coresight_device *csdev,
 	if (!buf->trbe_base) {
 		kfree(pglist);
 		kfree(buf);
-		return ERR_PTR(-ENOMEM);
+		return NULL;
 	}
 	buf->trbe_limit = buf->trbe_base + nr_pages * PAGE_SIZE;
 	buf->trbe_write = buf->trbe_base;
drivers/i2c/busses/i2c-designware-platdrv.c +1 -0
index 718bebe4fb87..09fcd155c641 100644
@@ -322,6 +322,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
 
 exit_probe:
 	dw_i2c_plat_pm_cleanup(dev);
+	i2c_dw_prepare_clk(dev, false);
 exit_reset:
 	reset_control_assert(dev->rst);
 	return ret;
drivers/i2c/busses/i2c-mt65xx.c +10 -7
index 72acda59eb39..03e5d488f874 100644
@@ -1067,6 +1067,7 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
 {
 	int ret;
 	int left_num = num;
+	bool write_then_read_en = false;
 	struct mtk_i2c *i2c = i2c_get_adapdata(adap);
 
 	ret = mtk_i2c_clock_enable(i2c);
@@ -1080,6 +1081,7 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
 		if (!(msgs[0].flags & I2C_M_RD) && (msgs[1].flags & I2C_M_RD) &&
 		    msgs[0].addr == msgs[1].addr) {
 			i2c->auto_restart = 0;
+			write_then_read_en = true;
 		}
 	}
 
@@ -1104,12 +1106,10 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
 		else
 			i2c->op = I2C_MASTER_WR;
 
-		if (!i2c->auto_restart) {
-			if (num > 1) {
-				/* combined two messages into one transaction */
-				i2c->op = I2C_MASTER_WRRD;
-				left_num--;
-			}
+		if (write_then_read_en) {
+			/* combined two messages into one transaction */
+			i2c->op = I2C_MASTER_WRRD;
+			left_num--;
 		}
 
 		/* always use DMA mode. */
@@ -1117,7 +1117,10 @@ static int mtk_i2c_transfer(struct i2c_adapter *adap,
 		if (ret < 0)
 			goto err_exit;
 
-		msgs++;
+		if (i2c->op == I2C_MASTER_WRRD)
+			msgs += 2;
+		else
+			msgs++;
 	}
 	/* the return value is number of executed messages */
 	ret = num;
drivers/i3c/master/svc-i3c-master.c +1 -0
index 62a4d06bcfb5..27f55b5e388d 100644
@@ -308,6 +308,7 @@ static int svc_i3c_master_handle_ibi(struct svc_i3c_master *master,
 						SVC_I3C_MSTATUS_COMPLETE(val), 0, 1000);
 	if (ret) {
 		dev_err(master->dev, "Timeout when polling for COMPLETE\n");
+		i3c_generic_ibi_recycle_slot(data->ibi_pool, slot);
 		return ret;
 	}
 
drivers/iio/dac/ad5360.c +1 -1
index 2d3b14c407d8..819ec9a0a7f1 100644
@@ -262,7 +262,7 @@ static int ad5360_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
 	unsigned int clr)
 {
 	struct ad5360_state *st = iio_priv(indio_dev);
-	unsigned int ret;
+	int ret;
 
 	mutex_lock(&st->lock);
 
drivers/iio/dac/ad5421.c +1 -1
index eedf661d32b2..a7d6900e6540 100644
@@ -186,7 +186,7 @@ static int ad5421_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
 	unsigned int clr)
 {
 	struct ad5421_state *st = iio_priv(indio_dev);
-	unsigned int ret;
+	int ret;
 
 	mutex_lock(&st->lock);
 
drivers/iio/frequency/adf4350.c +13 -7
index 3d9eba716b69..43c667d88c3f 100644
@@ -143,6 +143,19 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
 	if (freq > ADF4350_MAX_OUT_FREQ || freq < st->min_out_freq)
 		return -EINVAL;
 
+	st->r4_rf_div_sel = 0;
+
+	/*
+	 * !\TODO: The below computation is making sure we get a power of 2
+	 * shift (st->r4_rf_div_sel) so that freq becomes higher or equal to
+	 * ADF4350_MIN_VCO_FREQ. This might be simplified with fls()/fls_long()
+	 * and friends.
+	 */
+	while (freq < ADF4350_MIN_VCO_FREQ) {
+		freq <<= 1;
+		st->r4_rf_div_sel++;
+	}
+
 	if (freq > ADF4350_MAX_FREQ_45_PRESC) {
 		prescaler = ADF4350_REG1_PRESCALER;
 		mdiv = 75;
@@ -151,13 +164,6 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
 		mdiv = 23;
 	}
 
-	st->r4_rf_div_sel = 0;
-
-	while (freq < ADF4350_MIN_VCO_FREQ) {
-		freq <<= 1;
-		st->r4_rf_div_sel++;
-	}
-
 	/*
 	 * Allow a predefined reference division factor
 	 * if not set, compute our own
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +0 -4
index 9dec4ad38c0d..f955c3d01fef 100644
@@ -730,10 +730,6 @@ static int __maybe_unused inv_icm42600_resume(struct device *dev)
 	if (ret)
 		goto out_unlock;
 
-	pm_runtime_disable(dev);
-	pm_runtime_set_active(dev);
-	pm_runtime_enable(dev);
-
 	/* restore sensors state */
 	ret = inv_icm42600_set_pwr_mgmt0(st, st->suspended.gyro,
 					 st->suspended.accel,
drivers/iio/inkern.c +1 -1
index 5eabb54c1fc7..8815747e67be 100644
@@ -619,7 +619,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
 		 * If no channel scaling is available apply consumer scale to
 		 * raw value and return.
 		 */
-		*processed = raw * scale;
+		*processed = raw64 * scale;
 		return 0;
 	}
 
drivers/infiniband/core/addr.c +3 -7
index 65e3e7df8a4b..779e9af479fd 100644
@@ -461,14 +461,10 @@ static int addr_resolve_neigh(const struct dst_entry *dst,
 {
 	int ret = 0;
 
-	if (ndev_flags & IFF_LOOPBACK) {
+	if (ndev_flags & IFF_LOOPBACK)
 		memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN);
-	} else {
-		if (!(ndev_flags & IFF_NOARP)) {
-			/* If the device doesn't do ARP internally */
-			ret = fetch_ha(dst, addr, dst_in, seq);
-		}
-	}
+	else
+		ret = fetch_ha(dst, addr, dst_in, seq);
 	return ret;
 }
 
drivers/infiniband/core/cm.c +2 -2
index 96e00e86ebbf..5dc864cec9f8 100644
@@ -1039,8 +1039,8 @@ static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id,
 	struct cm_id_private *cm_id_priv;
 
 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
-	pr_err("%s: cm_id=%p timed out. state %d -> %d, refcnt=%d\n", __func__,
-	       cm_id, old_state, cm_id->state, refcount_read(&cm_id_priv->refcount));
+	pr_err_ratelimited("%s: cm_id=%p timed out. state %d -> %d, refcnt=%d\n", __func__,
+			   cm_id, old_state, cm_id->state, refcount_read(&cm_id_priv->refcount));
 }
 
 static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
drivers/infiniband/core/sa_query.c +4 -2
index 1557c71dd152..2b13cf6e827c 100644
@@ -982,6 +982,8 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
 	if (timeout > IB_SA_LOCAL_SVC_TIMEOUT_MAX)
 		timeout = IB_SA_LOCAL_SVC_TIMEOUT_MAX;
 
+	spin_lock_irqsave(&ib_nl_request_lock, flags);
+
 	delta = timeout - sa_local_svc_timeout_ms;
 	if (delta < 0)
 		abs_delta = -delta;
@@ -989,7 +991,6 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
 		abs_delta = delta;
 
 	if (delta != 0) {
-		spin_lock_irqsave(&ib_nl_request_lock, flags);
 		sa_local_svc_timeout_ms = timeout;
 		list_for_each_entry(query, &ib_nl_request_list, list) {
 			if (delta < 0 && abs_delta > query->timeout)
@@ -1007,9 +1008,10 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
 		if (delay)
 			mod_delayed_work(ib_nl_wq, &ib_nl_timed_work,
 					 (unsigned long)delay);
-		spin_unlock_irqrestore(&ib_nl_request_lock, flags);
 	}
 
+	spin_unlock_irqrestore(&ib_nl_request_lock, flags);
+
 settimeout_out:
 	return 0;
 }
drivers/infiniband/sw/siw/siw_verbs.c +14 -11
index 124242e387a5..c83701d04c95 100644
@@ -759,7 +759,7 @@ int siw_post_send(struct ib_qp *base_qp, const struct ib_send_wr *wr,
 	struct siw_wqe *wqe = tx_wqe(qp);
 
 	unsigned long flags;
-	int rv = 0;
+	int rv = 0, imm_err = 0;
 
 	if (wr && !rdma_is_kernel_res(&qp->base_qp.res)) {
 		siw_dbg_qp(qp, "wr must be empty for user mapped sq\n");
@@ -945,9 +945,17 @@ int siw_post_send(struct ib_qp *base_qp, const struct ib_send_wr *wr,
 	 * Send directly if SQ processing is not in progress.
 	 * Eventual immediate errors (rv < 0) do not affect the involved
 	 * RI resources (Verbs, 8.3.1) and thus do not prevent from SQ
-	 * processing, if new work is already pending. But rv must be passed
-	 * to caller.
+	 * processing, if new work is already pending. But rv and pointer
+	 * to failed work request must be passed to caller.
 	 */
+	if (unlikely(rv < 0)) {
+		/*
+		 * Immediate error
+		 */
+		siw_dbg_qp(qp, "Immediate error %d\n", rv);
+		imm_err = rv;
+		*bad_wr = wr;
+	}
 	if (wqe->wr_status != SIW_WR_IDLE) {
 		spin_unlock_irqrestore(&qp->sq_lock, flags);
 		goto skip_direct_sending;
@@ -972,15 +980,10 @@ int siw_post_send(struct ib_qp *base_qp, const struct ib_send_wr *wr,
 
 	up_read(&qp->state_lock);
 
-	if (rv >= 0)
-		return 0;
-	/*
-	 * Immediate error
-	 */
-	siw_dbg_qp(qp, "error %d\n", rv);
+	if (unlikely(imm_err))
+		return imm_err;
 
-	*bad_wr = wr;
-	return rv;
+	return (rv >= 0) ? 0 : rv;
 }
 
 /*
drivers/input/misc/uinput.c +1 -0
index 790db3ceb208..faed4590a8a9 100644
@@ -741,6 +741,7 @@ static int uinput_ff_upload_to_user(char __user *buffer,
 	if (in_compat_syscall()) {
 		struct uinput_ff_upload_compat ff_up_compat;
 
+		memset(&ff_up_compat, 0, sizeof(ff_up_compat));
 		ff_up_compat.request_id = ff_up->request_id;
 		ff_up_compat.retval = ff_up->retval;
 		/*
drivers/input/touchscreen/atmel_mxt_ts.c +1 -1
index eb66cd2689b7..cbff90382ad7 100644
@@ -3239,7 +3239,7 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	if (data->reset_gpio) {
 		/* Wait a while and then de-assert the RESET GPIO line */
 		msleep(MXT_RESET_GPIO_TIME);
-		gpiod_set_value(data->reset_gpio, 0);
+		gpiod_set_value_cansleep(data->reset_gpio, 0);
 		msleep(MXT_RESET_INVALID_CHG);
 	}
 
drivers/input/touchscreen/cyttsp4_core.c +1 -1
index dccbcb942fe5..936d69da3bda 100644
@@ -871,7 +871,7 @@ static void cyttsp4_get_mt_touches(struct cyttsp4_mt_data *md, int num_cur_tch)
 	struct cyttsp4_touch tch;
 	int sig;
 	int i, j, t = 0;
-	int ids[max(CY_TMA1036_MAX_TCH, CY_TMA4XX_MAX_TCH)];
+	int ids[MAX(CY_TMA1036_MAX_TCH, CY_TMA4XX_MAX_TCH)];
 
 	memset(ids, 0, si->si_ofs.tch_abs[CY_TCH_T].max * sizeof(int));
 	for (i = 0; i < num_cur_tch; i++) {
drivers/iommu/amd/iommu.c +2 -1
index 714c78bf69db..d3a11be8d1dd 100644
@@ -2121,7 +2121,8 @@ static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova,
 
 	r = (ops->unmap) ? ops->unmap(ops, iova, page_size, gather) : 0;
 
-	amd_iommu_iotlb_gather_add_page(dom, gather, iova, page_size);
+	if (r)
+		amd_iommu_iotlb_gather_add_page(dom, gather, iova, r);
 
 	return r;
 }
drivers/iommu/intel/iommu.c +1 -1
index 14a83b564db4..5cd1ac09e581 100644
@@ -2659,7 +2659,7 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
 			}
 
 			if (info->ats_supported && ecap_prs(iommu->ecap) &&
-			    pci_pri_supported(pdev))
+			    ecap_pds(iommu->ecap) && pci_pri_supported(pdev))
 				info->pri_supported = 1;
 		}
 	}
drivers/irqchip/irq-sun6i-r.c +1 -1
index 4cd3e533740b..74b1bd331425 100644
@@ -268,7 +268,7 @@ static const struct irq_domain_ops sun6i_r_intc_domain_ops = {
 
 static int sun6i_r_intc_suspend(void)
 {
-	u32 buf[BITS_TO_U32(max(SUN6I_NR_TOP_LEVEL_IRQS, SUN6I_NR_MUX_BITS))];
+	u32 buf[BITS_TO_U32(MAX(SUN6I_NR_TOP_LEVEL_IRQS, SUN6I_NR_MUX_BITS))];
 	int i;
 
 	/* Wake IRQs are enabled during system sleep and shutdown. */
drivers/mailbox/zynqmp-ipi-mailbox.c +2 -5
index be06de791c54..e64f7157f065 100644
@@ -618,11 +618,8 @@ static void zynqmp_ipi_free_mboxes(struct zynqmp_ipi_pdata *pdata)
 	i = pdata->num_mboxes;
 	for (; i >= 0; i--) {
 		ipi_mbox = &pdata->ipi_mboxes[i];
-		if (ipi_mbox->dev.parent) {
-			mbox_controller_unregister(&ipi_mbox->mbox);
-			if (device_is_registered(&ipi_mbox->dev))
-				device_unregister(&ipi_mbox->dev);
-		}
+		if (device_is_registered(&ipi_mbox->dev))
+			device_unregister(&ipi_mbox->dev);
 	}
 }
 
drivers/md/dm-integrity.c +3 -3
index e9d553eea9cd..43d47ba8dabc 100644
@@ -124,7 +124,7 @@ struct journal_sector {
 	commit_id_t commit_id;
 };
 
-#define MAX_TAG_SIZE			(JOURNAL_SECTOR_DATA - JOURNAL_MAC_PER_SECTOR - offsetof(struct journal_entry, last_bytes[MAX_SECTORS_PER_BLOCK]))
+#define MAX_TAG_SIZE			255
 
 #define METADATA_PADDING_SECTORS	8
 
@@ -1705,7 +1705,7 @@ static void integrity_metadata(struct work_struct *w)
 		struct bio *bio = dm_bio_from_per_bio_data(dio, sizeof(struct dm_integrity_io));
 		char *checksums;
 		unsigned extra_space = unlikely(digest_size > ic->tag_size) ? digest_size - ic->tag_size : 0;
-		char checksums_onstack[max((size_t)HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
+		char checksums_onstack[MAX(HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
 		sector_t sector;
 		unsigned sectors_to_process;
 
@@ -2536,7 +2536,7 @@ static void do_journal_write(struct dm_integrity_c *ic, unsigned write_start,
 				    unlikely(from_replay) &&
 #endif
 				    ic->internal_hash) {
-					char test_tag[max_t(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
+					char test_tag[MAX_T(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
 
 					integrity_sector_checksum(ic, sec + ((l - j) << ic->sb->log2_sectors_per_block),
 								  (char *)access_journal_data(ic, i, l), test_tag);
drivers/md/dm.c +4 -3
index 8b192fc1f798..26bc77d20586 100644
@@ -2406,7 +2406,7 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
 {
 	bool do_lockfs = suspend_flags & DM_SUSPEND_LOCKFS_FLAG;
 	bool noflush = suspend_flags & DM_SUSPEND_NOFLUSH_FLAG;
-	int r;
+	int r = 0;
 
 	lockdep_assert_held(&md->suspend_lock);
 
@@ -2458,7 +2458,7 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
 	 * Stop md->queue before flushing md->wq in case request-based
 	 * dm defers requests to md->wq from md->queue.
 	 */
-	if (dm_request_based(md))
+	if (map && dm_request_based(md))
 		dm_stop_queue(md->queue);
 
 	flush_workqueue(md->wq);
@@ -2468,7 +2468,8 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
 	 * We call dm_wait_for_completion to wait for all existing requests
 	 * to finish.
 	 */
-	r = dm_wait_for_completion(md, task_state);
+	if (map)
+		r = dm_wait_for_completion(md, task_state);
 	if (!r)
 		set_bit(dmf_suspended_flag, &md->flags);
 
drivers/media/dvb-frontends/stv0367_priv.h +3 -0
index 617f605947b2..7f056d1cce82 100644
@@ -25,8 +25,11 @@
 #endif
 
 /* MACRO definitions */
+#ifndef MIN
 #define MAX(X, Y) ((X) >= (Y) ? (X) : (Y))
 #define MIN(X, Y) ((X) <= (Y) ? (X) : (Y))
+#endif
+
 #define INRANGE(X, Y, Z) \
 	((((X) <= (Y)) && ((Y) <= (Z))) || \
 	(((Z) <= (Y)) && ((Y) <= (X))) ? 1 : 0)
drivers/media/i2c/mt9v111.c +1 -1
index 2dc4a0f24ce8..e955b01a8eb8 100644
@@ -534,8 +534,8 @@ static int mt9v111_calc_frame_rate(struct mt9v111_dev *mt9v111,
 static int mt9v111_hw_config(struct mt9v111_dev *mt9v111)
 {
 	struct i2c_client *c = mt9v111->client;
-	unsigned int ret;
 	u16 outfmtctrl2;
+	int ret;
 
 	/* Force device reset. */
 	ret = __mt9v111_hw_reset(mt9v111);
drivers/media/i2c/rj54n1cb0c.c +6 -3
index 2e4018c26912..f1953c819666 100644
@@ -1332,10 +1332,13 @@ static int rj54n1_probe(struct i2c_client *client,
 			V4L2_CID_GAIN, 0, 127, 1, 66);
 	v4l2_ctrl_new_std(&rj54n1->hdl, &rj54n1_ctrl_ops,
 			V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 1);
-	rj54n1->subdev.ctrl_handler = &rj54n1->hdl;
-	if (rj54n1->hdl.error)
-		return rj54n1->hdl.error;
 
+	if (rj54n1->hdl.error) {
+		ret = rj54n1->hdl.error;
+		goto err_free_ctrl;
+	}
+
+	rj54n1->subdev.ctrl_handler = &rj54n1->hdl;
 	rj54n1->clk_div		= clk_div;
 	rj54n1->rect.left	= RJ54N1_COLUMN_SKIP;
 	rj54n1->rect.top	= RJ54N1_ROW_SKIP;
drivers/media/i2c/tc358743.c +2 -2
index 3167beca4056..48f6fe8f1cc9 100644
@@ -2201,10 +2201,10 @@ static int tc358743_probe(struct i2c_client *client)
 err_work_queues:
 	cec_unregister_adapter(state->cec_adap);
 	if (!state->i2c_client->irq) {
-		del_timer(&state->timer);
+		timer_delete_sync(&state->timer);
 		flush_work(&state->work_i2c_poll);
 	}
-	cancel_delayed_work(&state->delayed_work_enable_hotplug);
+	cancel_delayed_work_sync(&state->delayed_work_enable_hotplug);
 	mutex_destroy(&state->confctl_mutex);
 err_hdl:
 	media_entity_cleanup(&sd->entity);
drivers/media/mc/mc-devnode.c +1 -5
index f249199dc616..f8257aa5fc58 100644
@@ -50,11 +50,6 @@ static void media_devnode_release(struct device *cd)
 {
 	struct media_devnode *devnode = to_media_devnode(cd);
 
-	mutex_lock(&media_devnode_lock);
-	/* Mark device node number as free */
-	clear_bit(devnode->minor, media_devnode_nums);
-	mutex_unlock(&media_devnode_lock);
-
 	/* Release media_devnode and perform other cleanups as needed. */
 	if (devnode->release)
 		devnode->release(devnode);
@@ -283,6 +278,7 @@ void media_devnode_unregister(struct media_devnode *devnode)
 	/* Delete the cdev on this minor as well */
 	cdev_device_del(&devnode->cdev, &devnode->dev);
 	devnode->media_dev = NULL;
+	clear_bit(devnode->minor, media_devnode_nums);
 	mutex_unlock(&media_devnode_lock);
 
 	put_device(&devnode->dev);
drivers/media/pci/b2c2/flexcop-pci.c +1 -1
index 486c8ec0fa60..ab53c5b02c48 100644
@@ -411,7 +411,7 @@ static void flexcop_pci_remove(struct pci_dev *pdev)
 	struct flexcop_pci *fc_pci = pci_get_drvdata(pdev);
 
 	if (irq_chk_intv > 0)
-		cancel_delayed_work(&fc_pci->irq_check_work);
+		cancel_delayed_work_sync(&fc_pci->irq_check_work);
 
 	flexcop_pci_dma_exit(fc_pci);
 	flexcop_device_exit(fc_pci->fc_dev);
drivers/media/pci/cobalt/cobalt-driver.c +2 -2
index f9cee061517b..6e1a0614e6d0 100644
@@ -333,8 +333,8 @@ static int cobalt_setup_pci(struct cobalt *cobalt, struct pci_dev *pci_dev,
 		}
 	}
 
-	if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64))) {
-		ret = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
+	if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(64))) {
+		ret = dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32));
 		if (ret) {
 			cobalt_err("no suitable DMA available\n");
 			goto err_disable;
drivers/media/pci/cx18/cx18-driver.c +1 -1
index f2440eb38820..59497ba6bf1f 100644
@@ -804,7 +804,7 @@ static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev,
 		CX18_ERR("Can't enable device %d!\n", cx->instance);
 		return -EIO;
 	}
-	if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) {
+	if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) {
 		CX18_ERR("No suitable DMA available, card %d\n", cx->instance);
 		return -EIO;
 	}
drivers/media/pci/cx18/cx18-queue.c +14 -6
index 2f5df471dada..7cbb2d586932 100644
@@ -325,8 +325,8 @@ void _cx18_mdl_sync_for_device(struct cx18_stream *s, struct cx18_mdl *mdl)
 	struct cx18_buffer *buf;
 
 	list_for_each_entry(buf, &mdl->buf_list, list)
-		pci_dma_sync_single_for_device(pci_dev, buf->dma_handle,
-					       buf_size, dma);
+		dma_sync_single_for_device(&pci_dev->dev, buf->dma_handle,
+					   buf_size, dma);
 }
 
 int cx18_stream_alloc(struct cx18_stream *s)
@@ -379,14 +379,22 @@ int cx18_stream_alloc(struct cx18_stream *s)
 			break;
 		}
 
+		buf->dma_handle = dma_map_single(&s->cx->pci_dev->dev,
+						 buf->buf, s->buf_size,
+						 s->dma);
+		if (dma_mapping_error(&s->cx->pci_dev->dev, buf->dma_handle)) {
+			kfree(buf->buf);
+			kfree(mdl);
+			kfree(buf);
+			break;
+		}
+
 		INIT_LIST_HEAD(&mdl->list);
 		INIT_LIST_HEAD(&mdl->buf_list);
 		mdl->id = s->mdl_base_idx; /* a somewhat safe value */
 		cx18_enqueue(s, mdl, &s->q_idle);
 
 		INIT_LIST_HEAD(&buf->list);
-		buf->dma_handle = pci_map_single(s->cx->pci_dev,
-				buf->buf, s->buf_size, s->dma);
 		cx18_buf_sync_for_cpu(s, buf);
 		list_add_tail(&buf->list, &s->buf_pool);
 	}
@@ -419,8 +427,8 @@ void cx18_stream_free(struct cx18_stream *s)
 		buf = list_first_entry(&s->buf_pool, struct cx18_buffer, list);
 		list_del_init(&buf->list);
 
-		pci_unmap_single(s->cx->pci_dev, buf->dma_handle,
-				s->buf_size, s->dma);
+		dma_unmap_single(&s->cx->pci_dev->dev, buf->dma_handle,
+				 s->buf_size, s->dma);
 		kfree(buf->buf);
 		kfree(buf);
 	}
drivers/media/pci/cx18/cx18-streams.c +8 -8
index c41bae118415..8537bcae524f 100644
@@ -49,44 +49,44 @@ static struct {
 	{	/* CX18_ENC_STREAM_TYPE_MPG */
 		"encoder MPEG",
 		VFL_TYPE_VIDEO, 0,
-		PCI_DMA_FROMDEVICE,
+		DMA_FROM_DEVICE,
 		V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
 		V4L2_CAP_AUDIO | V4L2_CAP_TUNER
 	},
 	{	/* CX18_ENC_STREAM_TYPE_TS */
 		"TS",
 		VFL_TYPE_VIDEO, -1,
-		PCI_DMA_FROMDEVICE,
+		DMA_FROM_DEVICE,
 	},
 	{	/* CX18_ENC_STREAM_TYPE_YUV */
 		"encoder YUV",
 		VFL_TYPE_VIDEO, CX18_V4L2_ENC_YUV_OFFSET,
-		PCI_DMA_FROMDEVICE,
+		DMA_FROM_DEVICE,
 		V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
 		V4L2_CAP_STREAMING | V4L2_CAP_AUDIO | V4L2_CAP_TUNER
 	},
 	{	/* CX18_ENC_STREAM_TYPE_VBI */
 		"encoder VBI",
 		VFL_TYPE_VBI, 0,
-		PCI_DMA_FROMDEVICE,
+		DMA_FROM_DEVICE,
 		V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE |
 		V4L2_CAP_READWRITE | V4L2_CAP_TUNER
 	},
 	{	/* CX18_ENC_STREAM_TYPE_PCM */
 		"encoder PCM audio",
 		VFL_TYPE_VIDEO, CX18_V4L2_ENC_PCM_OFFSET,
-		PCI_DMA_FROMDEVICE,
+		DMA_FROM_DEVICE,
 		V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 	},
 	{	/* CX18_ENC_STREAM_TYPE_IDX */
 		"encoder IDX",
 		VFL_TYPE_VIDEO, -1,
-		PCI_DMA_FROMDEVICE,
+		DMA_FROM_DEVICE,
 	},
 	{	/* CX18_ENC_STREAM_TYPE_RAD */
 		"encoder radio",
 		VFL_TYPE_RADIO, 0,
-		PCI_DMA_NONE,
+		DMA_NONE,
 		V4L2_CAP_RADIO | V4L2_CAP_TUNER
 	},
 };
@@ -324,7 +324,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
 
 	/* User explicitly selected 0 buffers for these streams, so don't
 	   create them. */
-	if (cx18_stream_info[type].dma != PCI_DMA_NONE &&
+	if (cx18_stream_info[type].dma != DMA_NONE &&
 	    cx->stream_buffers[type] == 0) {
 		CX18_INFO("Disabled %s device\n", cx18_stream_info[type].name);
 		return 0;
drivers/media/pci/ddbridge/ddbridge-main.c +2 -2
index bb7fb6402d6e..5d9f861b9ede 100644
@@ -180,8 +180,8 @@ static int ddb_probe(struct pci_dev *pdev,
 
 	pci_set_master(pdev);
 
-	if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
-		if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
+	if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)))
+		if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)))
 			return -ENODEV;
 
 	dev = vzalloc(sizeof(*dev));
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c +1 -1
index dfb2be0b9625..5a8778030d19 100644
@@ -1760,7 +1760,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
 
 	pci_set_master(pci_dev);
 
-	r = pci_set_dma_mask(pci_dev, CIO2_DMA_MASK);
+	r = dma_set_mask(&pci_dev->dev, CIO2_DMA_MASK);
 	if (r) {
 		dev_err(dev, "failed to set DMA mask (%d)\n", r);
 		return -ENODEV;
drivers/media/pci/ivtv/ivtv-driver.c +1 -1
index 8ebc97ebf1a2..57d4d5485d7a 100644
@@ -837,7 +837,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev,
 		IVTV_ERR("Can't enable device!\n");
 		return -EIO;
 	}
-	if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
+	if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
 		IVTV_ERR("No suitable DMA available.\n");
 		return -EIO;
 	}
drivers/media/pci/ivtv/ivtv-irq.c +1 -1
index b7aaa8b4a784..e39bf64c5c71 100644
@@ -351,7 +351,7 @@ void ivtv_dma_stream_dec_prepare(struct ivtv_stream *s, u32 offset, int lock)
 
 	/* Insert buffer block for YUV if needed */
 	if (s->type == IVTV_DEC_STREAM_TYPE_YUV && f->offset_y) {
-		if (yi->blanking_dmaptr) {
+		if (yi->blanking_ptr) {
 			s->sg_pending[idx].src = yi->blanking_dmaptr;
 			s->sg_pending[idx].dst = offset;
 			s->sg_pending[idx].size = 720 * 16;
drivers/media/pci/ivtv/ivtv-queue.c +10 -8
index 7ac4615e92ea..f9b192ab7e7c 100644
@@ -188,7 +188,7 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
 		return 0;
 
 	IVTV_DEBUG_INFO("Allocate %s%s stream: %d x %d buffers (%dkB total)\n",
-		s->dma != PCI_DMA_NONE ? "DMA " : "",
+		s->dma != DMA_NONE ? "DMA " : "",
 		s->name, s->buffers, s->buf_size, s->buffers * s->buf_size / 1024);
 
 	s->sg_pending = kzalloc(SGsize, GFP_KERNEL|__GFP_NOWARN);
@@ -218,8 +218,9 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
 		return -ENOMEM;
 	}
 	if (ivtv_might_use_dma(s)) {
-		s->sg_handle = pci_map_single(itv->pdev, s->sg_dma,
-				sizeof(struct ivtv_sg_element), PCI_DMA_TODEVICE);
+		s->sg_handle = dma_map_single(&itv->pdev->dev, s->sg_dma,
+					      sizeof(struct ivtv_sg_element),
+					      DMA_TO_DEVICE);
 		ivtv_stream_sync_for_cpu(s);
 	}
 
@@ -237,7 +238,7 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
 		}
 		INIT_LIST_HEAD(&buf->list);
 		if (ivtv_might_use_dma(s)) {
-			buf->dma_handle = pci_map_single(s->itv->pdev,
+			buf->dma_handle = dma_map_single(&s->itv->pdev->dev,
 				buf->buf, s->buf_size + 256, s->dma);
 			ivtv_buf_sync_for_cpu(s, buf);
 		}
@@ -260,8 +261,8 @@ void ivtv_stream_free(struct ivtv_stream *s)
 	/* empty q_free */
 	while ((buf = ivtv_dequeue(s, &s->q_free))) {
 		if (ivtv_might_use_dma(s))
-			pci_unmap_single(s->itv->pdev, buf->dma_handle,
-				s->buf_size + 256, s->dma);
+			dma_unmap_single(&s->itv->pdev->dev, buf->dma_handle,
+					 s->buf_size + 256, s->dma);
 		kfree(buf->buf);
 		kfree(buf);
 	}
@@ -269,8 +270,9 @@ void ivtv_stream_free(struct ivtv_stream *s)
 	/* Free SG Array/Lists */
 	if (s->sg_dma != NULL) {
 		if (s->sg_handle != IVTV_DMA_UNMAPPED) {
-			pci_unmap_single(s->itv->pdev, s->sg_handle,
-				 sizeof(struct ivtv_sg_element), PCI_DMA_TODEVICE);
+			dma_unmap_single(&s->itv->pdev->dev, s->sg_handle,
+					 sizeof(struct ivtv_sg_element),
+					 DMA_TO_DEVICE);
 			s->sg_handle = IVTV_DMA_UNMAPPED;
 		}
 		kfree(s->sg_pending);
drivers/media/pci/ivtv/ivtv-streams.c +11 -11
index f9de5d1605fe..13d7d55e6594 100644
@@ -100,7 +100,7 @@ static struct {
 	{	/* IVTV_ENC_STREAM_TYPE_MPG */
 		"encoder MPG",
 		VFL_TYPE_VIDEO, 0,
-		PCI_DMA_FROMDEVICE, 0,
+		DMA_FROM_DEVICE, 0,
 		V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
 			V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_enc_fops
@@ -108,7 +108,7 @@ static struct {
 	{	/* IVTV_ENC_STREAM_TYPE_YUV */
 		"encoder YUV",
 		VFL_TYPE_VIDEO, IVTV_V4L2_ENC_YUV_OFFSET,
-		PCI_DMA_FROMDEVICE, 0,
+		DMA_FROM_DEVICE, 0,
 		V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
 			V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_enc_fops
@@ -116,7 +116,7 @@ static struct {
 	{	/* IVTV_ENC_STREAM_TYPE_VBI */
 		"encoder VBI",
 		VFL_TYPE_VBI, 0,
-		PCI_DMA_FROMDEVICE, 0,
+		DMA_FROM_DEVICE, 0,
 		V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE | V4L2_CAP_TUNER |
 			V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_enc_fops
@@ -124,42 +124,42 @@ static struct {
 	{	/* IVTV_ENC_STREAM_TYPE_PCM */
 		"encoder PCM",
 		VFL_TYPE_VIDEO, IVTV_V4L2_ENC_PCM_OFFSET,
-		PCI_DMA_FROMDEVICE, 0,
+		DMA_FROM_DEVICE, 0,
 		V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_enc_fops
 	},
 	{	/* IVTV_ENC_STREAM_TYPE_RAD */
 		"encoder radio",
 		VFL_TYPE_RADIO, 0,
-		PCI_DMA_NONE, 1,
+		DMA_NONE, 1,
 		V4L2_CAP_RADIO | V4L2_CAP_TUNER,
 		&ivtv_v4l2_radio_fops
 	},
 	{	/* IVTV_DEC_STREAM_TYPE_MPG */
 		"decoder MPG",
 		VFL_TYPE_VIDEO, IVTV_V4L2_DEC_MPG_OFFSET,
-		PCI_DMA_TODEVICE, 0,
+		DMA_TO_DEVICE, 0,
 		V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_dec_fops
 	},
 	{	/* IVTV_DEC_STREAM_TYPE_VBI */
 		"decoder VBI",
 		VFL_TYPE_VBI, IVTV_V4L2_DEC_VBI_OFFSET,
-		PCI_DMA_NONE, 1,
+		DMA_NONE, 1,
 		V4L2_CAP_SLICED_VBI_CAPTURE | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_enc_fops
 	},
 	{	/* IVTV_DEC_STREAM_TYPE_VOUT */
 		"decoder VOUT",
 		VFL_TYPE_VBI, IVTV_V4L2_DEC_VOUT_OFFSET,
-		PCI_DMA_NONE, 1,
+		DMA_NONE, 1,
 		V4L2_CAP_SLICED_VBI_OUTPUT | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_dec_fops
 	},
 	{	/* IVTV_DEC_STREAM_TYPE_YUV */
 		"decoder YUV",
 		VFL_TYPE_VIDEO, IVTV_V4L2_DEC_YUV_OFFSET,
-		PCI_DMA_TODEVICE, 0,
+		DMA_TO_DEVICE, 0,
 		V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
 		&ivtv_v4l2_dec_fops
 	}
@@ -179,7 +179,7 @@ static void ivtv_stream_init(struct ivtv *itv, int type)
 	s->vdev.device_caps = ivtv_stream_info[type].v4l2_caps;
 
 	if (ivtv_stream_info[type].pio)
-		s->dma = PCI_DMA_NONE;
+		s->dma = DMA_NONE;
 	else
 		s->dma = ivtv_stream_info[type].dma;
 	s->buf_size = itv->stream_buf_size[type];
@@ -217,7 +217,7 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
 
 	/* User explicitly selected 0 buffers for these streams, so don't
 	   create them. */
-	if (ivtv_stream_info[type].dma != PCI_DMA_NONE &&
+	if (ivtv_stream_info[type].dma != DMA_NONE &&
 	    itv->options.kilobytes[type] == 0) {
 		IVTV_INFO("Disabled %s device\n", ivtv_stream_info[type].name);
 		return 0;
drivers/media/pci/ivtv/ivtv-udma.c +20 -7
index 0d8372cc364a..fd76f88975ae 100644
@@ -81,8 +81,10 @@ void ivtv_udma_alloc(struct ivtv *itv)
 {
 	if (itv->udma.SG_handle == 0) {
 		/* Map DMA Page Array Buffer */
-		itv->udma.SG_handle = pci_map_single(itv->pdev, itv->udma.SGarray,
-			   sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE);
+		itv->udma.SG_handle = dma_map_single(&itv->pdev->dev,
+						     itv->udma.SGarray,
+						     sizeof(itv->udma.SGarray),
+						     DMA_TO_DEVICE);
 		ivtv_udma_sync_for_cpu(itv);
 	}
 }
@@ -129,13 +131,22 @@ int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
 
 	/* Fill SG List with new values */
 	if (ivtv_udma_fill_sg_list(dma, &user_dma, 0) < 0) {
+		IVTV_DEBUG_WARN("%s: could not allocate bounce buffers for highmem userspace buffers\n",
+				__func__);
 		unpin_user_pages(dma->map, dma->page_count);
 		dma->page_count = 0;
 		return -ENOMEM;
 	}
 
 	/* Map SG List */
-	dma->SG_length = pci_map_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE);
+	dma->SG_length = dma_map_sg(&itv->pdev->dev, dma->SGlist,
+				    dma->page_count, DMA_TO_DEVICE);
+	if (!dma->SG_length) {
+		IVTV_DEBUG_WARN("%s: DMA map error, SG_length is 0\n", __func__);
+		unpin_user_pages(dma->map, dma->page_count);
+		dma->page_count = 0;
+		return -EINVAL;
+	}
 
 	/* Fill SG Array with new values */
 	ivtv_udma_fill_sg_array (dma, ivtv_dest_addr, 0, -1);
@@ -159,7 +170,8 @@ void ivtv_udma_unmap(struct ivtv *itv)
 
 	/* Unmap Scatterlist */
 	if (dma->SG_length) {
-		pci_unmap_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE);
+		dma_unmap_sg(&itv->pdev->dev, dma->SGlist, dma->page_count,
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/media/pci/ivtv/ivtv-yuv.c +20 -4
index 5f7dc9771f8d..c6573859843e 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ivtv/ivtvfb.c +3 -3
index 5ad03b2a50bd..1f8b8caa69bd 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/netup_unidvb/netup_unidvb_core.c +1 -1
index 7c5061953ee8..d85bfbb77a25 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/pluto2/pluto2.c +10 -10
index f1f4793a4452..6ac9b9bd7435 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/pt1/pt1.c +1 -1
index f2aa36814fba..121a4a92ea10 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/tw5864/tw5864-core.c +1 -1
index 282f7dfb7aaf..23d3cae54a5d 100644

Lines of this file are not shown. View the raw message.

drivers/media/rc/imon.c +20 -7
index 9faf8365afa7..0257a4f293ec 100644

Lines of this file are not shown. View the raw message.

drivers/media/tuners/xc5000.c +18 -23

41 lines not on this page · raw message

drivers/memory/samsung/exynos-srom.c +4 -6
index e73dd330af47..d913fb901973 100644

Lines of this file are not shown. View the raw message.

drivers/mfd/intel_soc_pmic_chtdc_ti.c +3 -2
index 1c7577b881ff..5eb790047a4e 100644

Lines of this file are not shown. View the raw message.

drivers/mfd/vexpress-sysreg.c +5 -1
index aaf24af287dd..5e2be5a9fe4a 100644

Lines of this file are not shown. View the raw message.

drivers/misc/genwqe/card_ddcb.c +1 -1
index 500b1feaf1f6..fd7d5cd50d39 100644

Lines of this file are not shown. View the raw message.

drivers/mmc/core/sdio.c +5 -1
index a0cac8c87ef2..cbc9ca0dd56e 100644

Lines of this file are not shown. View the raw message.

drivers/mtd/nand/raw/fsmc_nand.c +5 -1
index 5ea362ec3955..0b013a7b9035 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/amazon/ena/ena_ethtool.c +4 -1
index 413082f10dc1..31f05356a7c0 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +9 -9
index 07568aa15873..3c3d8ffc3c8b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/dlink/dl2k.c +5 -2
index 81395852b4d4..ca8bfd1b8278 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/freescale/fsl_pq_mdio.c +2 -0
index 9d58d8334467..ea49b0df397e 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/en_netdev.c +1 -1
index 3bd3603873e3..efbb01460f4b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.h +0 -12
index a23e3d810f3e..80af7a5ac604 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1 -16
index bb7e3c80ad74..321441e6ad32 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +1 -1
index d295942968f3..160f853e93ad 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -1
index 2478caeec763..21cc8cd9e023 100644

Lines of this file are not shown. View the raw message.

drivers/net/fjes/fjes_main.c +1 -3
index 1d1808afd529..792c22ba5b00 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/asix_devices.c +34 -1
index 97d2037e7fee..2e22be26921b 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/rtl8150.c +0 -2
index d5aa92660217..324bec0c22fb 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ath/ath10k/wmi.c +19 -20
index 572aabc0541c..5817501b0c3f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/cfg80211.c +3 -4
index d76a8523ef1d..8978f18d98de 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/mediatek/mt76/mt7603/soc.c +1 -1
index ba927033bbe8..1206769cdc7f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c +0 -1
index b53daf1b29f7..cd3e92440f6a 100644

Lines of this file are not shown. View the raw message.

drivers/nfc/pn544/i2c.c +0 -2
index 37d26f01986b..fd7026206f58 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/pci.c +2 -0
index 5f60a6ca247f..740709ee0852 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/target/fc.c +9 -10
index 812d085d49c9..4c4b528b89eb 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/dwc/pci-keystone.c +2 -2
index d96f89a68b6f..c277f76276ab 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/dwc/pcie-tegra194.c +2 -2
index 3703ea0d90c2..0046983e5ab8 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/pci-tegra.c +1 -1
index cb0aa65d6934..30d63ae20d8b 100644

Lines of this file are not shown. View the raw message.

drivers/pci/iov.c +5 -0
index ef71c1a20400..1175c0e08108 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pci-driver.c +1 -0
index 46b82bacaff6..1330a29e5747 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pci-sysfs.c +19 -1
index 075c32b91fc4..5f86f49ad3c8 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pcie/aer.c +6 -6
index 2908bfda8880..81ea196ce843 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pcie/err.c +7 -1
index 410fc44d79ee..3eedf51d5b9f 100644

Lines of this file are not shown. View the raw message.

drivers/perf/arm_spe_pmu.c +2 -1
index cd5945e17fdf..5ba677353d04 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/meson/pinctrl-meson-gxl.c +10 -0
index 51408996255b..e2601e45935e 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/pinmux.c +1 -1
index 6cdbd9ccf2f0..050908aec443 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/renesas/pinctrl.c +2 -1
index f3eecb20c086..37f8d51046b8 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel/int3472/discrete.c +3 -0
index 401fa8f223d6..31494f424786 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel/int3472/tps68470.c +3 -0
index fd3bef449137..b3faae7b2373 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/sony-laptop.c +0 -1
index 336dee9485d4..3c27d6b66bb4 100644

Lines of this file are not shown. View the raw message.

drivers/pps/kapi.c +1 -4
index 92d1b62ea239..e9389876229e 100644

Lines of this file are not shown. View the raw message.

drivers/pps/pps.c +2 -3
index ea966fc67d28..dbeb67ffebf3 100644

Lines of this file are not shown. View the raw message.

drivers/pwm/pwm-berlin.c +2 -2
index e157273fd2f7..c8a586e02cc6 100644

Lines of this file are not shown. View the raw message.

drivers/pwm/pwm-tiehrpwm.c +2 -2
index 5b723a48c5f1..3fef7d798773 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/scmi-regulator.c +2 -1
index 41ae7ac27ff6..7c0d29c7856b 100644

Lines of this file are not shown. View the raw message.

drivers/remoteproc/qcom_q6v5.c +0 -3
index 7e9244c748da..515c6d68e47c 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/interface.c +27 -0
index 7c62b1307762..e91ab1df4c6b 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-x1205.c +1 -1
index d1d5a44d9122..3b3aaa7d8283 100644

Lines of this file are not shown. View the raw message.

drivers/s390/cio/device.c +2 -0
index c2ed91b69f07..70c5b85d2dfc 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/hpsa.c +12 -9
index b54c8aa8e803..6a58f775198e 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/isci/init.c +1 -5
index bd73f6925a9d..73144b2966ba 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mpt3sas/mpt3sas_transport.c +3 -5
index e8a4750f6ec4..7d6e4fe31cee 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mvsas/mv_defs.h +1 -0
index 7123a2efbf58..8ef174cd4d37 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mvsas/mv_init.c +6 -7
index 1c98662db080..d348350c1509 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mvsas/mv_sas.c +22 -20

42 lines not on this page · raw message

drivers/scsi/mvsas/mv_sas.h +1 -7
index fa654c73beee..cba6e7667a7b 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/myrs.c +4 -4
index 3f05f13fb107..ec834b5951e7 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/pm8001/pm8001_sas.c +8 -1
index 0c79f2a9eba7..c4f5a2a17bd6 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla2xxx/qla_edif.c +2 -2
index ac702f74dd98..dfc7bff420cd 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla2xxx/qla_init.c +2 -2
index 2053c560b580..5f3593680c95 100644

Lines of this file are not shown. View the raw message.

drivers/soc/qcom/rpmh-rsc.c +2 -5
index 4c9400cf6686..5dc60ee0b07a 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-cadence-quadspi.c +5 -0
index a60399417a28..91fdc9132b96 100644

Lines of this file are not shown. View the raw message.

drivers/staging/axis-fifo/axis-fifo.c +21 -11
index 46b79c945079..a365243ebab6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/media/atomisp/pci/hive_isp_css_include/math_support.h +0 -5
index a444ec14ff9d..1c17a87a8572 100644

Lines of this file are not shown. View the raw message.

drivers/target/target_core_configfs.c +1 -1
index 30ce3451bc6b..73a9e7b0ecbc 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/qcom/Kconfig +2 -1
index bfd889422dd3..22cd3d538491 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/qcom/lmh.c +2 -0
index 9006e01e18c2..62c20d5c2a66 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/Kconfig +1 -1
index 131a6a587acd..4fc5c043adf6 100644

Lines of this file are not shown. View the raw message.

drivers/uio/uio_hv_generic.c +1 -6
index 865a5b289e0a..137109f5f69b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/cdns3/cdnsp-pci.c +1 -4
index b7a1f28faa1f..d177dc6dd441 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/configfs.c +2 -0
index 6423930b0e72..9a3de907de69 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/max3421-hcd.c +1 -1
index 37a5914f7987..b2641009519b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-ring.c +4 -7
index ddb7c88d5365..0ff63e9d815a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/phy/phy-twl6030-usb.c +1 -2
index ab3c38a7d8ac..a73604af8960 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/option.c +6 -0
index 7e58be8e1566..6f32842e24d5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/usbip/vhci_hcd.c +22 -0
index 6b98f5ab6dfe..e3c8483d7ba4 100644

Lines of this file are not shown. View the raw message.

drivers/virt/acrn/ioreq.c +2 -2
index 80b2e3f0e276..5446e5bbbff8 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/mpc8xxx_wdt.c +2 -0
index 1c569be72ea2..15644ae2387f 100644

Lines of this file are not shown. View the raw message.

drivers/xen/events/events_base.c +16 -4
index 04ff194fecf4..3c0ee857a86f 100644

Lines of this file are not shown. View the raw message.

drivers/xen/manage.c +2 -1
index 374d36de7f5a..f3e7874a94a9 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/export.c +7 -1
index 58b0f04d7123..6f81708658ae 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/extent_io.c +11 -3
index 39619fd6d6aa..3b671e9bf684 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/misc.h +0 -2
index 340f995652f2..5269923c8a7d 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/tree-checker.c +1 -1
index 51e04efe3e20..8f96ddaceb9a 100644

Lines of this file are not shown. View the raw message.

fs/cramfs/inode.c +10 -1
index 2be65269a987..c893066e77ab 100644

Lines of this file are not shown. View the raw message.

fs/erofs/zdata.h +1 -1
index 3a008f1b9f78..43876fd8a2cb 100644

Lines of this file are not shown. View the raw message.

fs/ext2/balloc.c +0 -2
index 9bf086821eb3..1d9380c5523b 100644

Lines of this file are not shown. View the raw message.

fs/ext4/ext4.h +10 -2
index ed477af15b6b..14dc0a3160fd 100644

Lines of this file are not shown. View the raw message.

fs/ext4/file.c +1 -1
index 6465fe1546d9..c025e8994d19 100644

Lines of this file are not shown. View the raw message.

fs/ext4/fsmap.c +9 -5
index 1b68586f73f3..c970f41c5048 100644

Lines of this file are not shown. View the raw message.

fs/ext4/inode.c +9 -3
index aefc138262f7..179ebee9d9a1 100644

Lines of this file are not shown. View the raw message.

fs/ext4/orphan.c +15 -8
index 72316515a6b0..836db28c4cd2 100644

Lines of this file are not shown. View the raw message.

fs/ext4/super.c +2 -2
index 3734ed76cac5..b677b7d14bc2 100644

Lines of this file are not shown. View the raw message.

fs/ext4/xattr.c +8 -7
index d9f57a60f7b9..115c6ddccd7c 100644

Lines of this file are not shown. View the raw message.

fs/file.c +4 -1
index 8f013aaf351f..ff8ec0dbe015 100644

Lines of this file are not shown. View the raw message.

fs/fs-writeback.c +21 -11
index cb3f1790a296..095eaa896cbe 100644

Lines of this file are not shown. View the raw message.

fs/fsopen.c +38 -32

70 lines not on this page · raw message

fs/ksmbd/smb2pdu.c +2 -1
index 3439dbad9389..c0b5985701bf 100644

Lines of this file are not shown. View the raw message.

fs/minix/inode.c +7 -1
index d4bd94234ef7..807ae40b64b0 100644

Lines of this file are not shown. View the raw message.

fs/namei.c +8 -0
index c188d525300d..5cc5b3e98462 100644

Lines of this file are not shown. View the raw message.

fs/namespace.c +10 -1
index 35d63bb3b22d..ae1b8530eb93 100644

Lines of this file are not shown. View the raw message.

fs/nfs/nfs4proc.c +1 -1
index 3d854e2537bc..a98b10c85b70 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/lockd.c +15 -0
index 46a7f9b813e5..b02886f38925 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4proc.c +1 -1
index 21c4fc5a61b6..a976f67194e8 100644

Lines of this file are not shown. View the raw message.

fs/ntfs3/bitmap.c +1 -0
index 2c29a3b386ba..fb4d20d30838 100644

Lines of this file are not shown. View the raw message.

fs/ntfs3/run.c +9 -3
index 6940ee5432ba..52ce16218b29 100644

Lines of this file are not shown. View the raw message.

fs/ocfs2/stack_user.c +1 -0
index 85a47621e0c0..f9ecabe3c09e 100644

Lines of this file are not shown. View the raw message.

fs/squashfs/inode.c +29 -2
index 95a9ff9e2399..42c97c68db63 100644

Lines of this file are not shown. View the raw message.

fs/squashfs/squashfs_fs_i.h +1 -1
index 2c82d6f2a456..8e497ac07b9a 100644

Lines of this file are not shown. View the raw message.

fs/udf/inode.c +3 -0
index 4983abca7397..d36e6a56c34a 100644

Lines of this file are not shown. View the raw message.

fs/ufs/util.h +0 -6
index 4931bec1a01c..89247193d96d 100644

Lines of this file are not shown. View the raw message.

include/linux/cleanup.h new file +171 -0

171 lines not on this page · raw message

include/linux/compiler-clang.h +9 -0
index cc3b972f8a27..29be8ad71549 100644

Lines of this file are not shown. View the raw message.

include/linux/compiler.h +9 -0
index 4f03dfb6de0d..ee9e39d315c8 100644

Lines of this file are not shown. View the raw message.

include/linux/compiler_attributes.h +6 -0
index 932b8fd6f36f..5ee9e2aeab63 100644

Lines of this file are not shown. View the raw message.

include/linux/device.h +10 -0
index 440c9f1a3f35..89864b918546 100644

Lines of this file are not shown. View the raw message.

include/linux/file.h +6 -0
index 51e830b4fe3a..6726240b9279 100644

Lines of this file are not shown. View the raw message.

include/linux/iio/frequency/adf4350.h +1 -1
index de45cf2ee1e4..ce2086f97e3f 100644

Lines of this file are not shown. View the raw message.

include/linux/irqflags.h +7 -0
index 37738ec87de3..c4288c7ae613 100644

Lines of this file are not shown. View the raw message.

include/linux/minmax.h +190 -74

264 lines not on this page · raw message

include/linux/mutex.h +4 -0
index 9ef01b9d2456..5b5630e58407 100644

Lines of this file are not shown. View the raw message.

include/linux/percpu.h +4 -0
index 5e76af742c80..c9a84532bb79 100644

Lines of this file are not shown. View the raw message.

include/linux/preempt.h +47 -0

47 lines not on this page · raw message

include/linux/rcupdate.h +3 -0
index 978769e545b5..552216218d73 100644

Lines of this file are not shown. View the raw message.

include/linux/rwsem.h +8 -0
index 352c6127cb90..458a0c92cc68 100644

Lines of this file are not shown. View the raw message.

include/linux/sched/task.h +2 -0
index f254a7d851fe..ff5aaed60969 100644

Lines of this file are not shown. View the raw message.

include/linux/slab.h +3 -0
index 3482c2ced139..c13f785c62da 100644

Lines of this file are not shown. View the raw message.

include/linux/spinlock.h +32 -0
index 45310ea1b1d7..6c02b2c3974f 100644

Lines of this file are not shown. View the raw message.

include/linux/srcu.h +5 -0
index e6011a9975af..e94687215fbe 100644

Lines of this file are not shown. View the raw message.

include/scsi/libsas.h +18 -0
index 306005b3b60f..97e99385f70c 100644

Lines of this file are not shown. View the raw message.

include/trace/events/filelock.h +2 -1
index 1646dadd7f37..3b1c8d93b265 100644

Lines of this file are not shown. View the raw message.

init/main.c +14 -0
index 3f3dc2a8bd86..0b6071b26ccb 100644

Lines of this file are not shown. View the raw message.

kernel/bpf/inode.c +2 -2
index 5a8d9f7467bf..849df8268af5 100644

Lines of this file are not shown. View the raw message.

kernel/fork.c +1 -1
index 2fd9c431bf45..2c99d39e2bc0 100644

Lines of this file are not shown. View the raw message.

kernel/pid.c +1 -1
index efe87db44683..61f6649568b2 100644

Lines of this file are not shown. View the raw message.

kernel/smp.c +5 -6
index b60525b34ab0..387df30ca560 100644

Lines of this file are not shown. View the raw message.

kernel/trace/preemptirq_delay_test.c +0 -2
index 8af92dbe98f0..acb0c971a408 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_kprobe.c +7 -4
index e062f4efec8d..03d4ac41d903 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_probe.h +7 -2
index 82e1df8aefcb..b08aa3946868 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_uprobe.c +8 -4
index 322d56661d04..707c5373476a 100644

Lines of this file are not shown. View the raw message.

lib/btree.c +0 -1
index b4cf08a5c267..b12f99d4c45c 100644

Lines of this file are not shown. View the raw message.

lib/crypto/Makefile +4 -0
index ed43a41f2dcc..a45b7cf6d6c5 100644

Lines of this file are not shown. View the raw message.

lib/decompress_unlzma.c +2 -0
index 20a858031f12..9d34d35908da 100644

Lines of this file are not shown. View the raw message.

lib/genalloc.c +4 -1
index 9a57257988c7..bed308b4493f 100644

Lines of this file are not shown. View the raw message.

lib/logic_pio.c +0 -3
index 07b4b9a1f54b..2ea564a40064 100644

Lines of this file are not shown. View the raw message.

lib/vsprintf.c +1 -1
index d86abdc77c26..e46eb93c115d 100644

Lines of this file are not shown. View the raw message.

lib/zstd/zstd_internal.h +0 -2
index dac753397f86..927ed4e8c11c 100644

Lines of this file are not shown. View the raw message.

mm/hugetlb.c +2 -0
index bca110617f51..70ceac102a8d 100644

Lines of this file are not shown. View the raw message.

mm/page_alloc.c +1 -1
index 4279ece7eade..63e131dc2b43 100644

Lines of this file are not shown. View the raw message.

mm/zsmalloc.c +0 -1
index 79f389d620c9..fd01f6922874 100644

Lines of this file are not shown. View the raw message.

net/9p/trans_fd.c +4 -4
index b44b77d3b35d..6b4a984eb989 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/mgmt.c +4 -6
index a54eb754e9a7..1d04fb42f13f 100644

Lines of this file are not shown. View the raw message.

net/bridge/br_vlan.c +1 -1
index 86441ff78a0f..055d988d280c 100644

Lines of this file are not shown. View the raw message.

net/core/filter.c +12 -6
index f346f19cf468..1403829b96db 100644

Lines of this file are not shown. View the raw message.

net/ipv4/proc.c +1 -1
index 4b9280a3b673..d849f61b7519 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp.c +5 -4
index 9508e2c90b84..b3d373372e84 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_input.c +0 -1
index fea019cc92d3..15548dc3cc5c 100644

Lines of this file are not shown. View the raw message.

net/ipv4/udp.c +7 -9
index 51a12fa486b6..3ebd5765fb9f 100644

Lines of this file are not shown. View the raw message.

net/ipv6/proc.c +1 -1
index d6306aa46bb1..e07c43bd5cb0 100644

Lines of this file are not shown. View the raw message.

net/mptcp/pm.c +5 -2
index 4fa31301fe84..737643e84ed1 100644

Lines of this file are not shown. View the raw message.

net/mptcp/pm_netlink.c +48 -1

49 lines not on this page · raw message

net/mptcp/protocol.h +8 -0
index 8d05fb205a31..c93399d11650 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipset/ip_set_hash_gen.h +4 -4
index 0bd6bf46f05f..1f9ca5040982 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_ftp.c +3 -1
index ef1f45e43b63..61d3797fb799 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nf_nat_core.c +3 -3
index b776b3af78ca..1dd160b84d05 100644

Lines of this file are not shown. View the raw message.

net/nfc/nci/ntf.c +99 -36

135 lines not on this page · raw message

net/sctp/sm_make_chunk.c +2 -1
index c7503fd64915..088764ba47a1 100644

Lines of this file are not shown. View the raw message.

net/sctp/sm_statefuns.c +4 -2
index b5f5ee233b59..f9882e0e67b1 100644

Lines of this file are not shown. View the raw message.

net/tipc/core.h +1 -1
index 0a3f7a70a50a..7eccd97e0609 100644

Lines of this file are not shown. View the raw message.

net/tipc/link.c +5 -5
index b098b74516d1..c8433ec7661d 100644

Lines of this file are not shown. View the raw message.

scripts/checkpatch.pl +1 -1
index 88cb294dc447..b4fe18228805 100755

Lines of this file are not shown. View the raw message.

security/keys/trusted-keys/trusted_tpm1.c +4 -3
index aa108bea6739..4863ee08b7b1 100644

Lines of this file are not shown. View the raw message.

sound/pci/lx6464es/lx_core.c +2 -2
index b5b0d43bb8dc..c3f2717aebf2 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/wcd934x.c +19 -11
index 765ac2a3e963..440b6a40ba60 100644

Lines of this file are not shown. View the raw message.

sound/soc/intel/boards/bytcht_es8316.c +17 -3
index b5c97d35864a..923e69c7695c 100644

Lines of this file are not shown. View the raw message.

sound/soc/intel/boards/bytcr_rt5640.c +5 -2
index 4954e8c494c6..0c7da72a7b84 100644

Lines of this file are not shown. View the raw message.

sound/soc/intel/boards/bytcr_rt5651.c +21 -5
index 93cec4d91627..b0b41a03c083 100644

Lines of this file are not shown. View the raw message.

tools/build/feature/Makefile +2 -2
index aa3b0d75e44b..37aa85a81e0a 100644

Lines of this file are not shown. View the raw message.

tools/include/nolibc/std.h +1 -1
index a0ea830e1ba1..f9eccd40c221 100644

Lines of this file are not shown. View the raw message.

tools/lib/bpf/libbpf.c +10 -0
index 13dea519e59f..d9589c92e05d 100644

Lines of this file are not shown. View the raw message.

tools/lib/perf/include/perf/event.h +1 -0
index 4d0c02ba3f7d..1187415e2699 100644

Lines of this file are not shown. View the raw message.

tools/lib/subcmd/help.c +3 -0
index 42f57b640f11..687307f2fe0f 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/perf-record.c +4 -0
index 0df471bf1590..b215e89b65f7 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/evsel.c +2 -0
index f14c83e6829a..a9cb1aede476 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/lzma.c +1 -1
index 51424cdc3b68..aa9a0ebc1f93 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/session.c +1 -1
index 562e9b808027..0ecfda9d9f8b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/zlib.c +1 -1
index 78d2297c1b67..1f7c06523059 100644

Lines of this file are not shown. View the raw message.

tools/testing/nvdimm/test/ndtest.c +12 -1
index 6862915f1fb0..d60c305c7ebd 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/arm64/pauth/exec_target.c +6 -1
index 4435600ca400..e597861b26d6 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/mptcp/mptcp_join.sh +10 -0
index 06634417e3c4..2cf9bb39b22b 100755

Lines of this file are not shown. View the raw message.

tools/testing/selftests/rseq/rseq.c +4 -4
index e20191fb40d4..036b03aaedc3 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/vm/mremap_test.c +2 -0
index 58775dab3cc6..92fb74865f26 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/watchdog/watchdog-test.c +6 -0
index 09773695d219..4056706d63f7 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.