Skip to content

Commit 1244445

Browse files
authored
Merge pull request #873 from nathanchance/update-patches-sep-04-2025
Update patches (September 4, 2025)
2 parents de2554b + 52976e9 commit 1244445

23 files changed

+701
-924
lines changed

patches/6.12/20250715_nathan_media_s5p_mfc_always_pass_null_to_s5p_mfc_cmd_host2risc_v6.patch

Lines changed: 0 additions & 129 deletions
This file was deleted.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
From 7fa37ba25a1dfc084e24ea9acc14bf1fad8af14c Mon Sep 17 00:00:00 2001
2+
From: Arnd Bergmann <[email protected]>
3+
Date: Thu, 7 Aug 2025 22:54:15 +0200
4+
Subject: media: s5p-mfc: remove an unused/uninitialized variable
5+
6+
The s5p_mfc_cmd_args structure in the v6 driver is never used, not
7+
initialized to anything other than zero, but as of clang-21 this
8+
causes a warning:
9+
10+
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c:45:7: error: variable 'h2r_args' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
11+
45 | &h2r_args);
12+
| ^~~~~~~~
13+
14+
Just remove this for simplicity. Since the function is also called
15+
through a callback, this does require adding a trivial wrapper with
16+
the correct prototype.
17+
18+
Fixes: f96f3cfa0bb8 ("[media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x")
19+
20+
Signed-off-by: Arnd Bergmann <[email protected]>
21+
Signed-off-by: Hans Verkuil <[email protected]>
22+
---
23+
Link: https://git.linuxtv.org/media.git/commit/?id=7fa37ba25a1dfc084e24ea9acc14bf1fad8af14c
24+
---
25+
.../platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c | 35 ++++++++--------------
26+
1 file changed, 13 insertions(+), 22 deletions(-)
27+
28+
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c
29+
index 47bc3014b5d8..f7c682fca645 100644
30+
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c
31+
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c
32+
@@ -14,8 +14,7 @@
33+
#include "s5p_mfc_opr.h"
34+
#include "s5p_mfc_cmd_v6.h"
35+
36+
-static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd,
37+
- const struct s5p_mfc_cmd_args *args)
38+
+static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd)
39+
{
40+
mfc_debug(2, "Issue the command: %d\n", cmd);
41+
42+
@@ -31,7 +30,6 @@ static int s5p_mfc_cmd_host2risc_v6(struct s5p_mfc_dev *dev, int cmd,
43+
44+
static int s5p_mfc_sys_init_cmd_v6(struct s5p_mfc_dev *dev)
45+
{
46+
- struct s5p_mfc_cmd_args h2r_args;
47+
const struct s5p_mfc_buf_size_v6 *buf_size = dev->variant->buf_size->priv;
48+
int ret;
49+
50+
@@ -41,33 +39,23 @@ static int s5p_mfc_sys_init_cmd_v6(struct s5p_mfc_dev *dev)
51+
52+
mfc_write(dev, dev->ctx_buf.dma, S5P_FIMV_CONTEXT_MEM_ADDR_V6);
53+
mfc_write(dev, buf_size->dev_ctx, S5P_FIMV_CONTEXT_MEM_SIZE_V6);
54+
- return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SYS_INIT_V6,
55+
- &h2r_args);
56+
+ return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SYS_INIT_V6);
57+
}
58+
59+
static int s5p_mfc_sleep_cmd_v6(struct s5p_mfc_dev *dev)
60+
{
61+
- struct s5p_mfc_cmd_args h2r_args;
62+
-
63+
- memset(&h2r_args, 0, sizeof(struct s5p_mfc_cmd_args));
64+
- return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SLEEP_V6,
65+
- &h2r_args);
66+
+ return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_SLEEP_V6);
67+
}
68+
69+
static int s5p_mfc_wakeup_cmd_v6(struct s5p_mfc_dev *dev)
70+
{
71+
- struct s5p_mfc_cmd_args h2r_args;
72+
-
73+
- memset(&h2r_args, 0, sizeof(struct s5p_mfc_cmd_args));
74+
- return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_WAKEUP_V6,
75+
- &h2r_args);
76+
+ return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_WAKEUP_V6);
77+
}
78+
79+
/* Open a new instance and get its number */
80+
static int s5p_mfc_open_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
81+
{
82+
struct s5p_mfc_dev *dev = ctx->dev;
83+
- struct s5p_mfc_cmd_args h2r_args;
84+
int codec_type;
85+
86+
mfc_debug(2, "Requested codec mode: %d\n", ctx->codec_mode);
87+
@@ -129,23 +117,20 @@ static int s5p_mfc_open_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
88+
mfc_write(dev, ctx->ctx.size, S5P_FIMV_CONTEXT_MEM_SIZE_V6);
89+
mfc_write(dev, 0, S5P_FIMV_D_CRC_CTRL_V6); /* no crc */
90+
91+
- return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6,
92+
- &h2r_args);
93+
+ return s5p_mfc_cmd_host2risc_v6(dev, S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6);
94+
}
95+
96+
/* Close instance */
97+
static int s5p_mfc_close_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
98+
{
99+
struct s5p_mfc_dev *dev = ctx->dev;
100+
- struct s5p_mfc_cmd_args h2r_args;
101+
int ret = 0;
102+
103+
dev->curr_ctx = ctx->num;
104+
if (ctx->state != MFCINST_FREE) {
105+
mfc_write(dev, ctx->inst_no, S5P_FIMV_INSTANCE_ID_V6);
106+
ret = s5p_mfc_cmd_host2risc_v6(dev,
107+
- S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6,
108+
- &h2r_args);
109+
+ S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6);
110+
} else {
111+
ret = -EINVAL;
112+
}
113+
@@ -153,9 +138,15 @@ static int s5p_mfc_close_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
114+
return ret;
115+
}
116+
117+
+static int s5p_mfc_cmd_host2risc_v6_args(struct s5p_mfc_dev *dev, int cmd,
118+
+ const struct s5p_mfc_cmd_args *ignored)
119+
+{
120+
+ return s5p_mfc_cmd_host2risc_v6(dev, cmd);
121+
+}
122+
+
123+
/* Initialize cmd function pointers for MFC v6 */
124+
static const struct s5p_mfc_hw_cmds s5p_mfc_cmds_v6 = {
125+
- .cmd_host2risc = s5p_mfc_cmd_host2risc_v6,
126+
+ .cmd_host2risc = s5p_mfc_cmd_host2risc_v6_args,
127+
.sys_init_cmd = s5p_mfc_sys_init_cmd_v6,
128+
.sleep_cmd = s5p_mfc_sleep_cmd_v6,
129+
.wakeup_cmd = s5p_mfc_wakeup_cmd_v6,
130+
--
131+
cgit v1.2.3
132+
Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH] wifi: mt76: mt7996: Initialize hdr before passing to
3-
skb_put_data()
1+
From 87b07a1fbc6b5c23d3b3584ab4288bc9106d3274 Mon Sep 17 00:00:00 2001
42
From: Nathan Chancellor <[email protected]>
53
Date: Tue, 15 Jul 2025 15:33:25 -0700
6-
Message-Id: <20250715-mt7996-fix-uninit-const-pointer-v1-1-b5d8d11d7b78@kernel.org>
7-
MIME-Version: 1.0
8-
Content-Type: text/plain; charset="utf-8"
9-
Content-Transfer-Encoding: 7bit
4+
Subject: wifi: mt76: mt7996: Initialize hdr before passing to skb_put_data()
105

116
A new warning in clang [1] points out a couple of places where a hdr
127
variable is not initialized then passed along to skb_put_data().
@@ -25,14 +20,15 @@ Cc: [email protected]
2520
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
2621
Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1]
2722
Closes: https://github.com/ClangBuiltLinux/linux/issues/2104
28-
Link: https://lore.kernel.org/r/20250715-mt7996-fix-uninit-const-pointer-v1-1-b5d8d11d7b78@kernel.org
2923
Signed-off-by: Nathan Chancellor <[email protected]>
24+
Link: https://patch.msgid.link/20250715-mt7996-fix-uninit-const-pointer-v1-1-b5d8d11d7b78@kernel.org
25+
Signed-off-by: Felix Fietkau <[email protected]>
3026
---
3127
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 4 ++--
3228
1 file changed, 2 insertions(+), 2 deletions(-)
3329

3430
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
35-
index 994526c65bfc..640abb4dce7f 100644
31+
index 3593fd40c51b6c..fe1b34386de232 100644
3632
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
3733
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
3834
@@ -1879,8 +1879,8 @@ mt7996_mcu_get_mmps_mode(enum ieee80211_smps_mode smps)
@@ -45,7 +41,7 @@ index 994526c65bfc..640abb4dce7f 100644
4541
struct sk_buff *skb;
4642
struct tlv *tlv;
4743
int len;
48-
@@ -3373,7 +3373,7 @@ int mt7996_mcu_set_hdr_trans(struct mt7996_dev *dev, bool hdr_trans)
44+
@@ -3372,7 +3372,7 @@ int mt7996_mcu_set_hdr_trans(struct mt7996_dev *dev, bool hdr_trans)
4945
{
5046
struct {
5147
u8 __rsv[4];
@@ -54,12 +50,6 @@ index 994526c65bfc..640abb4dce7f 100644
5450
struct hdr_trans_blacklist *req_blacklist;
5551
struct hdr_trans_en *req_en;
5652
struct sk_buff *skb;
57-
58-
---
59-
base-commit: eb8352ee2d1e70f916fac02094dca2b435076fa4
60-
change-id: 20250715-mt7996-fix-uninit-const-pointer-01e1dd03d444
61-
62-
Best regards,
63-
--
64-
Nathan Chancellor <[email protected]>
53+
--
54+
cgit 1.2.3-korg
6555

patches/6.12/series

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
0001-HACK-rtl8712-Zero-initialize-val-in-read_rfreg_hdl.patch
2-
20250715_nathan_media_s5p_mfc_always_pass_null_to_s5p_mfc_cmd_host2risc_v6.patch
3-
20250715_nathan_wifi_mt76_mt7996_initialize_hdr_before_passing_to_skb_put_data.patch
2+
7fa37ba25a1dfc084e24ea9acc14bf1fad8af14c.patch
3+
87b07a1fbc6b5c23d3b3584ab4288bc9106d3274.patch
Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
From git@z Thu Jan 1 00:00:00 1970
2-
Subject: [PATCH] wifi: mt76: mt7996: Initialize hdr before passing to
3-
skb_put_data()
1+
From 87b07a1fbc6b5c23d3b3584ab4288bc9106d3274 Mon Sep 17 00:00:00 2001
42
From: Nathan Chancellor <[email protected]>
53
Date: Tue, 15 Jul 2025 15:33:25 -0700
6-
Message-Id: <20250715-mt7996-fix-uninit-const-pointer-v1-1-b5d8d11d7b78@kernel.org>
7-
MIME-Version: 1.0
8-
Content-Type: text/plain; charset="utf-8"
9-
Content-Transfer-Encoding: 7bit
4+
Subject: wifi: mt76: mt7996: Initialize hdr before passing to skb_put_data()
105

116
A new warning in clang [1] points out a couple of places where a hdr
127
variable is not initialized then passed along to skb_put_data().
@@ -25,14 +20,15 @@ Cc: [email protected]
2520
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
2621
Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1]
2722
Closes: https://github.com/ClangBuiltLinux/linux/issues/2104
28-
Link: https://lore.kernel.org/r/20250715-mt7996-fix-uninit-const-pointer-v1-1-b5d8d11d7b78@kernel.org
2923
Signed-off-by: Nathan Chancellor <[email protected]>
24+
Link: https://patch.msgid.link/20250715-mt7996-fix-uninit-const-pointer-v1-1-b5d8d11d7b78@kernel.org
25+
Signed-off-by: Felix Fietkau <[email protected]>
3026
---
3127
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 4 ++--
3228
1 file changed, 2 insertions(+), 2 deletions(-)
3329

3430
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
35-
index 994526c65bfc..640abb4dce7f 100644
31+
index 3593fd40c51b6c..fe1b34386de232 100644
3632
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
3733
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
3834
@@ -1879,8 +1879,8 @@ mt7996_mcu_get_mmps_mode(enum ieee80211_smps_mode smps)
@@ -45,7 +41,7 @@ index 994526c65bfc..640abb4dce7f 100644
4541
struct sk_buff *skb;
4642
struct tlv *tlv;
4743
int len;
48-
@@ -3373,7 +3373,7 @@ int mt7996_mcu_set_hdr_trans(struct mt7996_dev *dev, bool hdr_trans)
44+
@@ -3372,7 +3372,7 @@ int mt7996_mcu_set_hdr_trans(struct mt7996_dev *dev, bool hdr_trans)
4945
{
5046
struct {
5147
u8 __rsv[4];
@@ -54,12 +50,6 @@ index 994526c65bfc..640abb4dce7f 100644
5450
struct hdr_trans_blacklist *req_blacklist;
5551
struct hdr_trans_en *req_en;
5652
struct sk_buff *skb;
57-
58-
---
59-
base-commit: eb8352ee2d1e70f916fac02094dca2b435076fa4
60-
change-id: 20250715-mt7996-fix-uninit-const-pointer-01e1dd03d444
61-
62-
Best regards,
63-
--
64-
Nathan Chancellor <[email protected]>
53+
--
54+
cgit 1.2.3-korg
6555

patches/6.6/series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
0001-HACK-rtl8712-Zero-initialize-val-in-read_rfreg_hdl.patch
2-
20250715_nathan_wifi_mt76_mt7996_initialize_hdr_before_passing_to_skb_put_data.patch
2+
87b07a1fbc6b5c23d3b3584ab4288bc9106d3274.patch
33
ccc35ff2fd2911986b716a87fe65e03fac2312c9.patch

0 commit comments

Comments
 (0)