]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2023 05:23:50 +0000 (07:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2023 05:23:50 +0000 (07:23 +0200)
added patches:
thunderbolt-use-correct-type-in-tb_port_is_clx_enabled-prototype.patch

queue-6.2/series
queue-6.2/thunderbolt-use-correct-type-in-tb_port_is_clx_enabled-prototype.patch [new file with mode: 0644]

index 9bbe292936039b3f63a35fbd1a91a18c4093773e..bc39bcea7301870ce7a282af85d8febf731a213c 100644 (file)
@@ -664,3 +664,4 @@ cifs-protect-session-status-check-in-smb2_reconnect.patch
 cifs-fix-sharing-of-dfs-connections.patch
 cifs-fix-potential-race-when-tree-connecting-ipc.patch
 cifs-protect-access-of-tcp_server_info-origin-leaf-_fullpath.patch
+thunderbolt-use-correct-type-in-tb_port_is_clx_enabled-prototype.patch
diff --git a/queue-6.2/thunderbolt-use-correct-type-in-tb_port_is_clx_enabled-prototype.patch b/queue-6.2/thunderbolt-use-correct-type-in-tb_port_is_clx_enabled-prototype.patch
new file mode 100644 (file)
index 0000000..7c69655
--- /dev/null
@@ -0,0 +1,36 @@
+From d31137619776f9c173a46a79bc7733a2b106061f Mon Sep 17 00:00:00 2001
+From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
+Date: Mon, 12 Dec 2022 11:29:36 +0100
+Subject: thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype
+
+From: Jiri Slaby (SUSE) <jirislaby@kernel.org>
+
+commit d31137619776f9c173a46a79bc7733a2b106061f upstream.
+
+tb_port_is_clx_enabled() generates a valid warning with gcc-13:
+  drivers/thunderbolt/switch.c:1286:6: error: conflicting types for 'tb_port_is_clx_enabled' due to enum/integer mismatch; have 'bool(struct tb_port *, unsigned int)' ...
+  drivers/thunderbolt/tb.h:1050:6: note: previous declaration of 'tb_port_is_clx_enabled' with type 'bool(struct tb_port *, enum tb_clx)' ...
+
+I.e. the type of the 2nd parameter of tb_port_is_clx_enabled() in the
+declaration is unsigned int, while the definition spells enum tb_clx.
+Synchronize them to the former as the parameter is in fact a mask of the
+enum values.
+
+Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
+Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/thunderbolt/tb.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/thunderbolt/tb.h
++++ b/drivers/thunderbolt/tb.h
+@@ -1058,7 +1058,7 @@ void tb_port_lane_bonding_disable(struct
+ int tb_port_wait_for_link_width(struct tb_port *port, int width,
+                               int timeout_msec);
+ int tb_port_update_credits(struct tb_port *port);
+-bool tb_port_is_clx_enabled(struct tb_port *port, enum tb_clx clx);
++bool tb_port_is_clx_enabled(struct tb_port *port, unsigned int clx);
+ int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
+ int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap);