Skip to contentSkip to conversation

media: v4l2-core: v4l2-subdev: Removed duplicate lockdep assertion

PATCH In review Sunny Patel 3 participants 8 messages Apr 4 – Apr 21 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: v4l2-core: v4l2-subdev: Removed duplicate lockdep assertion

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 1 line
2.43.0
#1 lore raw

On Sat, Apr 04, 2026 at 07:42:26PM +0530, Sunny Patel wrote:

Missing commit message. Please read
Documentation/process/submitting-patches.rst

Quoted 17 lines
---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw

PATCH 1/1 media: v4l2-core: v4l2-subdev: Removed duplicate lockdep assertion

The __v4l2_subdev_state_get_interval() function has a duplicate lockdep_assert_held() call. Removed the redundant assertion.

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 1 line
2.43.0
#3 lore raw

When submitting new versions of a patch (or patch series), please remember to indicate the version in the subject line. The -v option to git-format-patch helps.

Quoted 13 lines · Sunny Patel

The __v4l2_subdev_state_get_interval() function has a duplicate lockdep_assert_held() call. Removed the redundant assertion.

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -0
index 32e6f60e26c7..4616e9280a28 100644

drivers/media/v4l2-core/v4l2-subdev.c __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state, · line 1847

Quoted 5 lines
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-

Why do you remove this assertion and not the next one ?

Quoted 3 lines
drivers/media/v4l2-core/v4l2-subdev.c +0 -0
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw

PATCH v2 1/1 media: v4l2-core: Removed duplicate lockdep assertion

The __v4l2_subdev_state_get_interval() function has a duplicate lockdep_assert_held() call. Removed the redundant assertion.

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH v2] media: v4l2-core: Removed duplicate lockdep assertion

There was a review comment in the previous version of this patch and you didn't take it into account. Please reply to it and explain why.

Quoted 21 lines · Sunny Patel

The __v4l2_subdev_state_get_interval() function has a duplicate lockdep_assert_held() call. Removed the redundant assertion.

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 3 lines
Regards,

Laurent Pinchart
#6 lore raw

PATCH 1/1 media: v4l2-core: v4l2-subdev: Removed duplicate lockdep assertion

In reply to Laurent Pinchart

Removal is only required afte state->pads for stream_configs since state->pads only represents the static array so not required locking for it.

The __v4l2_subdev_state_get_interval() function has a duplicate lockdep_assert_held() call. Removed the redundant assertion.

---
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 1 line
2.43.0
#7 lore raw

Hi Sunny,

Thanks for the update.

Please always set the version of the patch if not the first.

Quoted 5 lines · Sunny Patel

Removal is only required afte state->pads for stream_configs since state->pads only represents the static array so not required locking for it.

Extra newline.

Quoted 2 lines

The __v4l2_subdev_state_get_interval() function has a duplicate lockdep_assert_held() call. Removed the redundant assertion.

Please use imperative when describing what the patch does.

Quoted 3 lines

---

Please describe changes across versions, at least from the previous one.

Quoted 16 lines
 drivers/media/v4l2-core/v4l2-subdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/v4l2-core/v4l2-subdev.c +0 -2
index 32e6f60e26c7..4616e9280a28 100644
@@ -1843,8 +1843,6 @@ __v4l2_subdev_state_get_interval(struct v4l2_subdev_state *state,
 	if (WARN_ON(!state))
 		return NULL;
 
-	lockdep_assert_held(state->lock);
-
 	if (state->pads) {
 		if (stream)
 			return NULL;
Signature · 3 lines
Kind regards,

Sakari Ailus