From 999127ef20fd7f9732cb47152aa865977a1f0684 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 16 Nov 2022 07:53:30 -0500 Subject: [PATCH] Fixes for 4.9 Signed-off-by: Sasha Levin --- ...h-l2cap-fix-l2cap_global_chan_by_psm.patch | 35 ++++++++++++ ...fix-return-type-of-imx_tve_connector.patch | 53 +++++++++++++++++++ ...cmos-fix-build-on-non-acpi-platforms.patch | 37 +++++++++++++ queue-4.9/series | 3 ++ 4 files changed, 128 insertions(+) create mode 100644 queue-4.9/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch create mode 100644 queue-4.9/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch create mode 100644 queue-4.9/rtc-cmos-fix-build-on-non-acpi-platforms.patch diff --git a/queue-4.9/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch b/queue-4.9/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch new file mode 100644 index 00000000000..7df8b1f8671 --- /dev/null +++ b/queue-4.9/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch @@ -0,0 +1,35 @@ +From 62783a553dc6158c8fdcf4b1921f1dbd7cc8d0c9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 31 Oct 2022 16:10:33 -0700 +Subject: Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm + +From: Luiz Augusto von Dentz + +[ Upstream commit f937b758a188d6fd328a81367087eddbb2fce50f ] + +l2cap_global_chan_by_psm shall not return fixed channels as they are not +meant to be connected by (S)PSM. + +Signed-off-by: Luiz Augusto von Dentz +Reviewed-by: Tedd Ho-Jeong An +Signed-off-by: Sasha Levin +--- + net/bluetooth/l2cap_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c +index 693344984035..c230f89e7238 100644 +--- a/net/bluetooth/l2cap_core.c ++++ b/net/bluetooth/l2cap_core.c +@@ -1824,7 +1824,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, + if (link_type == LE_LINK && c->src_type == BDADDR_BREDR) + continue; + +- if (c->psm == psm) { ++ if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) { + int src_match, dst_match; + int src_any, dst_any; + +-- +2.35.1 + diff --git a/queue-4.9/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch b/queue-4.9/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch new file mode 100644 index 00000000000..bc0f73eeb75 --- /dev/null +++ b/queue-4.9/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch @@ -0,0 +1,53 @@ +From 47adff8c8b48ea644ddcadb85ce6eaa20199f149 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 13 Sep 2022 13:55:44 -0700 +Subject: drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid + +From: Nathan Huckleberry + +[ Upstream commit fc007fb815ab5395c3962c09b79a1630b0fbed9c ] + +The mode_valid field in drm_connector_helper_funcs is expected to be of +type: +enum drm_mode_status (* mode_valid) (struct drm_connector *connector, + struct drm_display_mode *mode); + +The mismatched return type breaks forward edge kCFI since the underlying +function definition does not match the function hook definition. + +The return type of imx_tve_connector_mode_valid should be changed from +int to enum drm_mode_status. + +Reported-by: Dan Carpenter +Link: https://github.com/ClangBuiltLinux/linux/issues/1703 +Cc: llvm@lists.linux.dev +Signed-off-by: Nathan Huckleberry +Reviewed-by: Nathan Chancellor +Reviewed-by: Fabio Estevam +Reviewed-by: Philipp Zabel +Signed-off-by: Philipp Zabel +Link: https://patchwork.freedesktop.org/patch/msgid/20220913205544.155106-1-nhuck@google.com +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/imx/imx-tve.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c +index 9ae515f3171e..372582df6008 100644 +--- a/drivers/gpu/drm/imx/imx-tve.c ++++ b/drivers/gpu/drm/imx/imx-tve.c +@@ -254,8 +254,9 @@ static int imx_tve_connector_get_modes(struct drm_connector *connector) + return ret; + } + +-static int imx_tve_connector_mode_valid(struct drm_connector *connector, +- struct drm_display_mode *mode) ++static enum drm_mode_status ++imx_tve_connector_mode_valid(struct drm_connector *connector, ++ struct drm_display_mode *mode) + { + struct imx_tve *tve = con_to_tve(connector); + unsigned long rate; +-- +2.35.1 + diff --git a/queue-4.9/rtc-cmos-fix-build-on-non-acpi-platforms.patch b/queue-4.9/rtc-cmos-fix-build-on-non-acpi-platforms.patch new file mode 100644 index 00000000000..b7a3d73d54b --- /dev/null +++ b/queue-4.9/rtc-cmos-fix-build-on-non-acpi-platforms.patch @@ -0,0 +1,37 @@ +From ba5fc62647ab86e71ef1a796970f8df7a3a04975 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 18 Oct 2022 22:35:11 +0200 +Subject: rtc: cmos: fix build on non-ACPI platforms + +From: Alexandre Belloni + +[ Upstream commit db4e955ae333567dea02822624106c0b96a2f84f ] + +Now that rtc_wake_setup is called outside of cmos_wake_setup, it also need +to be defined on non-ACPI platforms. + +Reported-by: kernel test robot +Link: https://lore.kernel.org/r/20221018203512.2532407-1-alexandre.belloni@bootlin.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Sasha Levin +--- + drivers/rtc/rtc-cmos.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c +index 1dbd8419df7d..2c3881bdf9bb 100644 +--- a/drivers/rtc/rtc-cmos.c ++++ b/drivers/rtc/rtc-cmos.c +@@ -1113,6 +1113,9 @@ static void cmos_check_acpi_rtc_status(struct device *dev, + { + } + ++static void rtc_wake_setup(struct device *dev) ++{ ++} + #endif + + #ifdef CONFIG_PNP +-- +2.35.1 + diff --git a/queue-4.9/series b/queue-4.9/series index 07351bc56a0..6d813e9bb00 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -27,3 +27,6 @@ dmaengine-at_hdmac-don-t-allow-cpu-to-reorder-channel-enable.patch dmaengine-at_hdmac-fix-impossible-condition.patch dmaengine-at_hdmac-check-return-code-of-dma_async_device_register.patch x86-cpu-restore-amd-s-de_cfg-msr-after-resume.patch +rtc-cmos-fix-build-on-non-acpi-platforms.patch +drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch +bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch -- 2.47.3