* [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function
[not found] <20210909114106.141462-1-sashal@kernel.org>
@ 2021-09-09 11:37 ` Sasha Levin
2021-09-09 11:48 ` Greg Kroah-Hartman
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 045/252] staging: board: Fix uninitialized spinlock when attaching genpd Sasha Levin
` (8 subsequent siblings)
9 siblings, 1 reply; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Phillip Potter, kernel test robot, Greg Kroah-Hartman,
Sasha Levin, linux-staging
From: Phillip Potter <phil@philpotter.co.uk>
[ Upstream commit ac5951a6e3d50cfa861ea83baa2ec15d994389cb ]
Remove rtw_wx_set_rate handler function, which currently handles the
SIOCSIWRATE wext ioctl. This function (although containing a lot of
code) set nothing outside its own local variables, and did nothing other
than call a now removed debugging statement repeatedly. Removing it and
leaving its associated entry in rtw_handlers as NULL is therefore the
better option. Removing this function also fixes a kernel test robot
warning.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210625191658.1299-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../staging/rtl8188eu/os_dep/ioctl_linux.c | 75 -------------------
1 file changed, 75 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index b958a8d882b0..d4dce8ef0322 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -1262,80 +1262,6 @@ static int rtw_wx_get_essid(struct net_device *dev,
return 0;
}
-static int rtw_wx_set_rate(struct net_device *dev,
- struct iw_request_info *a,
- union iwreq_data *wrqu, char *extra)
-{
- int i;
- u8 datarates[NumRates];
- u32 target_rate = wrqu->bitrate.value;
- u32 fixed = wrqu->bitrate.fixed;
- u32 ratevalue = 0;
- u8 mpdatarate[NumRates] = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0xff};
-
- if (target_rate == -1) {
- ratevalue = 11;
- goto set_rate;
- }
- target_rate /= 100000;
-
- switch (target_rate) {
- case 10:
- ratevalue = 0;
- break;
- case 20:
- ratevalue = 1;
- break;
- case 55:
- ratevalue = 2;
- break;
- case 60:
- ratevalue = 3;
- break;
- case 90:
- ratevalue = 4;
- break;
- case 110:
- ratevalue = 5;
- break;
- case 120:
- ratevalue = 6;
- break;
- case 180:
- ratevalue = 7;
- break;
- case 240:
- ratevalue = 8;
- break;
- case 360:
- ratevalue = 9;
- break;
- case 480:
- ratevalue = 10;
- break;
- case 540:
- ratevalue = 11;
- break;
- default:
- ratevalue = 11;
- break;
- }
-
-set_rate:
-
- for (i = 0; i < NumRates; i++) {
- if (ratevalue == mpdatarate[i]) {
- datarates[i] = mpdatarate[i];
- if (fixed == 0)
- break;
- } else {
- datarates[i] = 0xff;
- }
- }
-
- return 0;
-}
-
static int rtw_wx_get_rate(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
@@ -2715,7 +2641,6 @@ static iw_handler rtw_handlers[] = {
IW_HANDLER(SIOCSIWESSID, rtw_wx_set_essid),
IW_HANDLER(SIOCGIWESSID, rtw_wx_get_essid),
IW_HANDLER(SIOCGIWNICKN, rtw_wx_get_nick),
- IW_HANDLER(SIOCSIWRATE, rtw_wx_set_rate),
IW_HANDLER(SIOCGIWRATE, rtw_wx_get_rate),
IW_HANDLER(SIOCSIWRTS, rtw_wx_set_rts),
IW_HANDLER(SIOCGIWRTS, rtw_wx_get_rts),
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 045/252] staging: board: Fix uninitialized spinlock when attaching genpd
[not found] <20210909114106.141462-1-sashal@kernel.org>
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function Sasha Levin
@ 2021-09-09 11:37 ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 046/252] staging: hisilicon,hi6421-spmi-pmic.yaml: fix patternProperties Sasha Levin
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Geert Uytterhoeven, Greg Kroah-Hartman, Sasha Levin,
linux-staging
From: Geert Uytterhoeven <geert+renesas@glider.be>
[ Upstream commit df00609821bf17f50a75a446266d19adb8339d84 ]
On Armadillo-800-EVA with CONFIG_DEBUG_SPINLOCK=y:
BUG: spinlock bad magic on CPU#0, swapper/1
lock: lcdc0_device+0x10c/0x308, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 PID: 1 Comm: swapper Not tainted 5.11.0-rc5-armadillo-00036-gbbca04be7a80-dirty #287
Hardware name: Generic R8A7740 (Flattened Device Tree)
[<c010c3c8>] (unwind_backtrace) from [<c010a49c>] (show_stack+0x10/0x14)
[<c010a49c>] (show_stack) from [<c0159534>] (do_raw_spin_lock+0x20/0x94)
[<c0159534>] (do_raw_spin_lock) from [<c040858c>] (dev_pm_get_subsys_data+0x8c/0x11c)
[<c040858c>] (dev_pm_get_subsys_data) from [<c05fbcac>] (genpd_add_device+0x78/0x2b8)
[<c05fbcac>] (genpd_add_device) from [<c0412db4>] (of_genpd_add_device+0x34/0x4c)
[<c0412db4>] (of_genpd_add_device) from [<c0a1ea74>] (board_staging_register_device+0x11c/0x148)
[<c0a1ea74>] (board_staging_register_device) from [<c0a1eac4>] (board_staging_register_devices+0x24/0x28)
of_genpd_add_device() is called before platform_device_register(), as it
needs to attach the genpd before the device is probed. But the spinlock
is only initialized when the device is registered.
Fix this by open-coding the spinlock initialization, cfr.
device_pm_init_common() in the internal drivers/base code, and in the
SuperH early platform code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/57783ece7ddae55f2bda2f59f452180bff744ea0.1626257398.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/board/board.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
index cb6feb34dd40..f980af037345 100644
--- a/drivers/staging/board/board.c
+++ b/drivers/staging/board/board.c
@@ -136,6 +136,7 @@ int __init board_staging_register_clock(const struct board_staging_clk *bsc)
static int board_staging_add_dev_domain(struct platform_device *pdev,
const char *domain)
{
+ struct device *dev = &pdev->dev;
struct of_phandle_args pd_args;
struct device_node *np;
@@ -148,7 +149,11 @@ static int board_staging_add_dev_domain(struct platform_device *pdev,
pd_args.np = np;
pd_args.args_count = 0;
- return of_genpd_add_device(&pd_args, &pdev->dev);
+ /* Initialization similar to device_pm_init_common() */
+ spin_lock_init(&dev->power.lock);
+ dev->power.early_init = true;
+
+ return of_genpd_add_device(&pd_args, dev);
}
#else
static inline int board_staging_add_dev_domain(struct platform_device *pdev,
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 046/252] staging: hisilicon,hi6421-spmi-pmic.yaml: fix patternProperties
[not found] <20210909114106.141462-1-sashal@kernel.org>
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 045/252] staging: board: Fix uninitialized spinlock when attaching genpd Sasha Levin
@ 2021-09-09 11:37 ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 053/252] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Sasha Levin
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Sasha Levin,
linux-staging
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[ Upstream commit 334201d503d5903f38f6e804263fc291ce8f451a ]
The regex at the patternProperties is wrong, although this was
not reported as the DT schema was not enforcing properties.
Fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/46b2f30df235481cb1404913380e45706dfd8253.1626515862.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml b/drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml
index 8e355cddd437..6c348578e4a2 100644
--- a/drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml
+++ b/drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml
@@ -41,6 +41,8 @@ properties:
regulators:
type: object
+ additionalProperties: false
+
properties:
'#address-cells':
const: 1
@@ -49,11 +51,13 @@ properties:
const: 0
patternProperties:
- '^ldo[0-9]+@[0-9a-f]$':
+ '^(ldo|LDO)[0-9]+$':
type: object
$ref: "/schemas/regulator/regulator.yaml#"
+ unevaluatedProperties: false
+
required:
- compatible
- reg
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 053/252] media: hantro: vp8: Move noisy WARN_ON to vpu_debug
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (2 preceding siblings ...)
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 046/252] staging: hisilicon,hi6421-spmi-pmic.yaml: fix patternProperties Sasha Levin
@ 2021-09-09 11:37 ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 055/252] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Sasha Levin
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ezequiel Garcia, Nicolas Dufresne, Alex Bee, Hans Verkuil,
Mauro Carvalho Chehab, Sasha Levin, linux-media, linux-rockchip,
linux-staging, linux-arm-kernel
From: Ezequiel Garcia <ezequiel@collabora.com>
[ Upstream commit 6ad61a7847da09b6261824accb539d05bcdfef65 ]
When the VP8 decoders can't find a reference frame,
the driver falls back to the current output frame.
This will probably produce some undesirable results,
leading to frame corruption, but shouldn't cause
noisy warnings.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Tested-by: Alex Bee <knaerzche@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/hantro/hantro_g1_vp8_dec.c | 13 ++++++++++---
.../staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c | 13 ++++++++++---
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
index 96622a7f8279..2afd5996d75f 100644
--- a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
@@ -376,12 +376,17 @@ static void cfg_ref(struct hantro_ctx *ctx,
vb2_dst = hantro_get_dst_buf(ctx);
ref = hantro_get_ref(ctx, hdr->last_frame_ts);
- if (!ref)
+ if (!ref) {
+ vpu_debug(0, "failed to find last frame ts=%llu\n",
+ hdr->last_frame_ts);
ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
+ }
vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0));
ref = hantro_get_ref(ctx, hdr->golden_frame_ts);
- WARN_ON(!ref && hdr->golden_frame_ts);
+ if (!ref && hdr->golden_frame_ts)
+ vpu_debug(0, "failed to find golden frame ts=%llu\n",
+ hdr->golden_frame_ts);
if (!ref)
ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN)
@@ -389,7 +394,9 @@ static void cfg_ref(struct hantro_ctx *ctx,
vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(4));
ref = hantro_get_ref(ctx, hdr->alt_frame_ts);
- WARN_ON(!ref && hdr->alt_frame_ts);
+ if (!ref && hdr->alt_frame_ts)
+ vpu_debug(0, "failed to find alt frame ts=%llu\n",
+ hdr->alt_frame_ts);
if (!ref)
ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT)
diff --git a/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c b/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c
index 951b55f58a61..704607511b57 100644
--- a/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c
+++ b/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c
@@ -453,12 +453,17 @@ static void cfg_ref(struct hantro_ctx *ctx,
vb2_dst = hantro_get_dst_buf(ctx);
ref = hantro_get_ref(ctx, hdr->last_frame_ts);
- if (!ref)
+ if (!ref) {
+ vpu_debug(0, "failed to find last frame ts=%llu\n",
+ hdr->last_frame_ts);
ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
+ }
vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF0);
ref = hantro_get_ref(ctx, hdr->golden_frame_ts);
- WARN_ON(!ref && hdr->golden_frame_ts);
+ if (!ref && hdr->golden_frame_ts)
+ vpu_debug(0, "failed to find golden frame ts=%llu\n",
+ hdr->golden_frame_ts);
if (!ref)
ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN)
@@ -466,7 +471,9 @@ static void cfg_ref(struct hantro_ctx *ctx,
vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF2_5(2));
ref = hantro_get_ref(ctx, hdr->alt_frame_ts);
- WARN_ON(!ref && hdr->alt_frame_ts);
+ if (!ref && hdr->alt_frame_ts)
+ vpu_debug(0, "failed to find alt frame ts=%llu\n",
+ hdr->alt_frame_ts);
if (!ref)
ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT)
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 055/252] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (3 preceding siblings ...)
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 053/252] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Sasha Levin
@ 2021-09-09 11:37 ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 056/252] media: atomisp: pci: fix error return code in atomisp_pci_probe() Sasha Levin
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Dinghao Liu, Andy Shevchenko, Mauro Carvalho Chehab, Sasha Levin,
linux-media, linux-staging
From: Dinghao Liu <dinghao.liu@zju.edu.cn>
[ Upstream commit 672fe1cf145ab9978c62eb827d6a16aa6b63994b ]
When hmm_pool_register() fails, a pairing PM usage counter
increment is needed to keep the counter balanced. It's the
same for the following error paths.
Link: https://lore.kernel.org/linux-media/20210408081850.24278-1-dinghao.liu@zju.edu.cn
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index 948769ca6539..af0d83eaa68c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -1815,6 +1815,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
hmm_cleanup();
hmm_pool_unregister(HMM_POOL_TYPE_RESERVED);
hmm_pool_fail:
+ pm_runtime_get_noresume(&pdev->dev);
destroy_workqueue(isp->wdt_work_queue);
wdt_work_queue_fail:
atomisp_acc_cleanup(isp);
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 056/252] media: atomisp: pci: fix error return code in atomisp_pci_probe()
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (4 preceding siblings ...)
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 055/252] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Sasha Levin
@ 2021-09-09 11:37 ` Sasha Levin
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 083/252] staging: ks7010: Fix the initialization of the 'sleep_status' structure Sasha Levin
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Yang Yingliang, Hulk Robot, Mauro Carvalho Chehab, Sasha Levin,
linux-media, linux-staging
From: Yang Yingliang <yangyingliang@huawei.com>
[ Upstream commit d14e272958bdfdc40dcafb827d24ba6fdafa9d52 ]
If init_atomisp_wdts() fails, atomisp_pci_probe() need return
error code.
Link: https://lore.kernel.org/linux-media/20210617072329.1233662-1-yangyingliang@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index af0d83eaa68c..1e324f1f656e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -1763,7 +1763,8 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
if (err < 0)
goto register_entities_fail;
/* init atomisp wdts */
- if (init_atomisp_wdts(isp) != 0)
+ err = init_atomisp_wdts(isp);
+ if (err != 0)
goto wdt_work_queue_fail;
/* save the iunit context only once after all the values are init'ed. */
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 083/252] staging: ks7010: Fix the initialization of the 'sleep_status' structure
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (5 preceding siblings ...)
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 056/252] media: atomisp: pci: fix error return code in atomisp_pci_probe() Sasha Levin
@ 2021-09-09 11:38 ` Sasha Levin
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 107/252] media: imx: imx7-media-csi: Fix buffer return upon stream start failure Sasha Levin
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:38 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Christophe JAILLET, Greg Kroah-Hartman, Sasha Levin,
linux-staging
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ Upstream commit 56315e55119c0ea57e142b6efb7c31208628ad86 ]
'sleep_status' has 3 atomic_t members. Initialize the 3 of them instead of
initializing only 2 of them and setting 0 twice to the same variable.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/d2e52a33a9beab41879551d0ae2fdfc99970adab.1626856991.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/ks7010/ks7010_sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index cbc0032c1604..98d759e7cc95 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -939,9 +939,9 @@ static void ks7010_private_init(struct ks_wlan_private *priv,
memset(&priv->wstats, 0, sizeof(priv->wstats));
/* sleep mode */
+ atomic_set(&priv->sleepstatus.status, 0);
atomic_set(&priv->sleepstatus.doze_request, 0);
atomic_set(&priv->sleepstatus.wakeup_request, 0);
- atomic_set(&priv->sleepstatus.wakeup_request, 0);
trx_device_init(priv);
hostif_init(priv);
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 107/252] media: imx: imx7-media-csi: Fix buffer return upon stream start failure
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (6 preceding siblings ...)
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 083/252] staging: ks7010: Fix the initialization of the 'sleep_status' structure Sasha Levin
@ 2021-09-09 11:38 ` Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 139/252] staging: rtl8723bs: fix right side of condition Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 173/252] staging: rts5208: Fix get_ms_information() heap buffer size Sasha Levin
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:38 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Laurent Pinchart, Martin Kepplinger, Rui Miguel Silva,
Mauro Carvalho Chehab, Sasha Levin, linux-media, linux-staging,
linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[ Upstream commit 0ada1697ed4256b38225319c9896661142a3572d ]
When the stream fails to start, the first two buffers in the queue have
been moved to the active_vb2_buf array and are returned to vb2 by
imx7_csi_dma_unsetup_vb2_buf(). The function is called with the buffer
state set to VB2_BUF_STATE_ERROR unconditionally, which is correct when
stopping the stream, but not when the start operation fails. In that
case, the state should be set to VB2_BUF_STATE_QUEUED. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/imx/imx7-media-csi.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
index 894c4de31790..2882964b8513 100644
--- a/drivers/staging/media/imx/imx7-media-csi.c
+++ b/drivers/staging/media/imx/imx7-media-csi.c
@@ -361,6 +361,7 @@ static void imx7_csi_dma_unsetup_vb2_buf(struct imx7_csi *csi,
vb->timestamp = ktime_get_ns();
vb2_buffer_done(vb, return_status);
+ csi->active_vb2_buf[i] = NULL;
}
}
}
@@ -386,9 +387,10 @@ static int imx7_csi_dma_setup(struct imx7_csi *csi)
return 0;
}
-static void imx7_csi_dma_cleanup(struct imx7_csi *csi)
+static void imx7_csi_dma_cleanup(struct imx7_csi *csi,
+ enum vb2_buffer_state return_status)
{
- imx7_csi_dma_unsetup_vb2_buf(csi, VB2_BUF_STATE_ERROR);
+ imx7_csi_dma_unsetup_vb2_buf(csi, return_status);
imx_media_free_dma_buf(csi->dev, &csi->underrun_buf);
}
@@ -537,9 +539,10 @@ static int imx7_csi_init(struct imx7_csi *csi)
return 0;
}
-static void imx7_csi_deinit(struct imx7_csi *csi)
+static void imx7_csi_deinit(struct imx7_csi *csi,
+ enum vb2_buffer_state return_status)
{
- imx7_csi_dma_cleanup(csi);
+ imx7_csi_dma_cleanup(csi, return_status);
imx7_csi_init_default(csi);
imx7_csi_dmareq_rff_disable(csi);
clk_disable_unprepare(csi->mclk);
@@ -702,7 +705,7 @@ static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable)
ret = v4l2_subdev_call(csi->src_sd, video, s_stream, 1);
if (ret < 0) {
- imx7_csi_deinit(csi);
+ imx7_csi_deinit(csi, VB2_BUF_STATE_QUEUED);
goto out_unlock;
}
@@ -712,7 +715,7 @@ static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable)
v4l2_subdev_call(csi->src_sd, video, s_stream, 0);
- imx7_csi_deinit(csi);
+ imx7_csi_deinit(csi, VB2_BUF_STATE_ERROR);
}
csi->is_streaming = !!enable;
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 139/252] staging: rtl8723bs: fix right side of condition
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (7 preceding siblings ...)
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 107/252] media: imx: imx7-media-csi: Fix buffer return upon stream start failure Sasha Levin
@ 2021-09-09 11:39 ` Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 173/252] staging: rts5208: Fix get_ms_information() heap buffer size Sasha Levin
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:39 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Fabio Aiuto, Greg Kroah-Hartman, Sasha Levin, linux-staging
From: Fabio Aiuto <fabioaiuto83@gmail.com>
[ Upstream commit e3678dc1ea40425b7218c20e2fe7b00a72f23a41 ]
TxNum value is compared against ODM_RF_PATH_D,
which is inconsistent. Compare it against
RF_MAX_TX_NUM, as in other places in the same file.
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/147631fe6f4f5de84cc54a62ba71d739b92697be.1628329348.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index bb7941aee0c4..fcf31f6d4b36 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -463,7 +463,7 @@ static void PHY_StoreTxPowerByRateNew(
if (RfPath > ODM_RF_PATH_D)
return;
- if (TxNum > ODM_RF_PATH_D)
+ if (TxNum > RF_MAX_TX_NUM)
return;
for (i = 0; i < rateNum; ++i) {
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH AUTOSEL 5.14 173/252] staging: rts5208: Fix get_ms_information() heap buffer size
[not found] <20210909114106.141462-1-sashal@kernel.org>
` (8 preceding siblings ...)
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 139/252] staging: rtl8723bs: fix right side of condition Sasha Levin
@ 2021-09-09 11:39 ` Sasha Levin
9 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:39 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Kees Cook, Greg Kroah-Hartman, linux-staging, Sasha Levin
From: Kees Cook <keescook@chromium.org>
[ Upstream commit cbe34165cc1b7d1110b268ba8b9f30843c941639 ]
Fix buf allocation size (it needs to be 2 bytes larger). Found when
__alloc_size() annotations were added to kmalloc() interfaces.
In file included from ./include/linux/string.h:253,
from ./include/linux/bitmap.h:10,
from ./include/linux/cpumask.h:12,
from ./arch/x86/include/asm/paravirt.h:17,
from ./arch/x86/include/asm/irqflags.h:63,
from ./include/linux/irqflags.h:16,
from ./include/linux/rcupdate.h:26,
from ./include/linux/rculist.h:11,
from ./include/linux/pid.h:5,
from ./include/linux/sched.h:14,
from ./include/linux/blkdev.h:5,
from drivers/staging/rts5208/rtsx_scsi.c:12:
In function 'get_ms_information',
inlined from 'ms_sp_cmnd' at drivers/staging/rts5208/rtsx_scsi.c:2877:12,
inlined from 'rtsx_scsi_handler' at drivers/staging/rts5208/rtsx_scsi.c:3247:12:
./include/linux/fortify-string.h:54:29: warning: '__builtin_memcpy' forming offset [106, 107] is out
of the bounds [0, 106] [-Warray-bounds]
54 | #define __underlying_memcpy __builtin_memcpy
| ^
./include/linux/fortify-string.h:417:2: note: in expansion of macro '__underlying_memcpy'
417 | __underlying_##op(p, q, __fortify_size); \
| ^~~~~~~~~~~~~
./include/linux/fortify-string.h:463:26: note: in expansion of macro '__fortify_memcpy_chk'
463 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx_scsi.c:2851:3: note: in expansion of macro 'memcpy'
2851 | memcpy(buf + i, ms_card->raw_sys_info, 96);
| ^~~~~~
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210818044252.1533634-1-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/rts5208/rtsx_scsi.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c
index 1deb74112ad4..11d9d9155eef 100644
--- a/drivers/staging/rts5208/rtsx_scsi.c
+++ b/drivers/staging/rts5208/rtsx_scsi.c
@@ -2802,10 +2802,10 @@ static int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip)
}
if (dev_info_id == 0x15) {
- buf_len = 0x3A;
+ buf_len = 0x3C;
data_len = 0x3A;
} else {
- buf_len = 0x6A;
+ buf_len = 0x6C;
data_len = 0x6A;
}
@@ -2855,11 +2855,7 @@ static int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip)
}
rtsx_stor_set_xfer_buf(buf, buf_len, srb);
-
- if (dev_info_id == 0x15)
- scsi_set_resid(srb, scsi_bufflen(srb) - 0x3C);
- else
- scsi_set_resid(srb, scsi_bufflen(srb) - 0x6C);
+ scsi_set_resid(srb, scsi_bufflen(srb) - buf_len);
kfree(buf);
return STATUS_SUCCESS;
--
2.30.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function Sasha Levin
@ 2021-09-09 11:48 ` Greg Kroah-Hartman
2021-09-13 16:27 ` Sasha Levin
0 siblings, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-09-09 11:48 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Phillip Potter, kernel test robot,
linux-staging
On Thu, Sep 09, 2021 at 07:37:38AM -0400, Sasha Levin wrote:
> From: Phillip Potter <phil@philpotter.co.uk>
>
> [ Upstream commit ac5951a6e3d50cfa861ea83baa2ec15d994389cb ]
>
> Remove rtw_wx_set_rate handler function, which currently handles the
> SIOCSIWRATE wext ioctl. This function (although containing a lot of
> code) set nothing outside its own local variables, and did nothing other
> than call a now removed debugging statement repeatedly. Removing it and
> leaving its associated entry in rtw_handlers as NULL is therefore the
> better option. Removing this function also fixes a kernel test robot
> warning.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> Link: https://lore.kernel.org/r/20210625191658.1299-1-phil@philpotter.co.uk
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> .../staging/rtl8188eu/os_dep/ioctl_linux.c | 75 -------------------
> 1 file changed, 75 deletions(-)
This whole driver is now gone in 5.15-rc1, so no need for doing anything
like this for older kernels. Please drop this patch from all branches.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function
2021-09-09 11:48 ` Greg Kroah-Hartman
@ 2021-09-13 16:27 ` Sasha Levin
0 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-13 16:27 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, stable, Phillip Potter, kernel test robot,
linux-staging
On Thu, Sep 09, 2021 at 01:48:49PM +0200, Greg Kroah-Hartman wrote:
>On Thu, Sep 09, 2021 at 07:37:38AM -0400, Sasha Levin wrote:
>> From: Phillip Potter <phil@philpotter.co.uk>
>>
>> [ Upstream commit ac5951a6e3d50cfa861ea83baa2ec15d994389cb ]
>>
>> Remove rtw_wx_set_rate handler function, which currently handles the
>> SIOCSIWRATE wext ioctl. This function (although containing a lot of
>> code) set nothing outside its own local variables, and did nothing other
>> than call a now removed debugging statement repeatedly. Removing it and
>> leaving its associated entry in rtw_handlers as NULL is therefore the
>> better option. Removing this function also fixes a kernel test robot
>> warning.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
>> Link: https://lore.kernel.org/r/20210625191658.1299-1-phil@philpotter.co.uk
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> .../staging/rtl8188eu/os_dep/ioctl_linux.c | 75 -------------------
>> 1 file changed, 75 deletions(-)
>
>This whole driver is now gone in 5.15-rc1, so no need for doing anything
>like this for older kernels. Please drop this patch from all branches.
Dropped, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-09-13 16:27 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210909114106.141462-1-sashal@kernel.org>
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 044/252] staging: rtl8188eu: remove rtw_wx_set_rate handler function Sasha Levin
2021-09-09 11:48 ` Greg Kroah-Hartman
2021-09-13 16:27 ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 045/252] staging: board: Fix uninitialized spinlock when attaching genpd Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 046/252] staging: hisilicon,hi6421-spmi-pmic.yaml: fix patternProperties Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 053/252] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 055/252] media: atomisp: Fix runtime PM imbalance in atomisp_pci_probe Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 056/252] media: atomisp: pci: fix error return code in atomisp_pci_probe() Sasha Levin
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 083/252] staging: ks7010: Fix the initialization of the 'sleep_status' structure Sasha Levin
2021-09-09 11:38 ` [PATCH AUTOSEL 5.14 107/252] media: imx: imx7-media-csi: Fix buffer return upon stream start failure Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 139/252] staging: rtl8723bs: fix right side of condition Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 173/252] staging: rts5208: Fix get_ms_information() heap buffer size Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox