Message ID | 20240604172904.61613-4-wahrenst@gmx.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | staging: vc04_services: Random cleanups | expand |
Hi Stefan, Thank you for the patch. On Tue, Jun 04, 2024 at 07:28:56PM +0200, Stefan Wahren wrote: > There are some struct members, which don't have a real > function. So it's safe to drop them. > > Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Both fields are unused in the RPi kernel as well, so this looks fine to me. The last user of bulk_transfer_mutex was removed in commit 14f4d72fb799a9b3170a45ab80d4a3ddad541960 which you could reference if desired. slot_remove_event has never been used. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 -- > .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 4 ---- > 2 files changed, 6 deletions(-) > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c > index df3af821f218..51cfc366519b 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c > @@ -2163,14 +2163,12 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero, s > mutex_init(&state->slot_mutex); > mutex_init(&state->recycle_mutex); > mutex_init(&state->sync_mutex); > - mutex_init(&state->bulk_transfer_mutex); > > spin_lock_init(&state->msg_queue_spinlock); > spin_lock_init(&state->bulk_waiter_spinlock); > spin_lock_init(&state->quota_spinlock); > > init_completion(&state->slot_available_event); > - init_completion(&state->slot_remove_event); > init_completion(&state->data_quota_event); > > state->slot_queue_available = 0; > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h > index 8af209e34fb2..be20abcfad75 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h > @@ -347,8 +347,6 @@ struct vchiq_state { > > struct mutex sync_mutex; > > - struct mutex bulk_transfer_mutex; > - > spinlock_t msg_queue_spinlock; > > spinlock_t bulk_waiter_spinlock; > @@ -393,8 +391,6 @@ struct vchiq_state { > /* Signalled when a free slot becomes available. */ > struct completion slot_available_event; > > - struct completion slot_remove_event; > - > /* Signalled when a free data slot becomes available. */ > struct completion data_quota_event; >
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index df3af821f218..51cfc366519b 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -2163,14 +2163,12 @@ vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero, s mutex_init(&state->slot_mutex); mutex_init(&state->recycle_mutex); mutex_init(&state->sync_mutex); - mutex_init(&state->bulk_transfer_mutex); spin_lock_init(&state->msg_queue_spinlock); spin_lock_init(&state->bulk_waiter_spinlock); spin_lock_init(&state->quota_spinlock); init_completion(&state->slot_available_event); - init_completion(&state->slot_remove_event); init_completion(&state->data_quota_event); state->slot_queue_available = 0; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 8af209e34fb2..be20abcfad75 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -347,8 +347,6 @@ struct vchiq_state { struct mutex sync_mutex; - struct mutex bulk_transfer_mutex; - spinlock_t msg_queue_spinlock; spinlock_t bulk_waiter_spinlock; @@ -393,8 +391,6 @@ struct vchiq_state { /* Signalled when a free slot becomes available. */ struct completion slot_available_event; - struct completion slot_remove_event; - /* Signalled when a free data slot becomes available. */ struct completion data_quota_event;
There are some struct members, which don't have a real function. So it's safe to drop them. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 -- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 4 ---- 2 files changed, 6 deletions(-) -- 2.34.1