platform/surface: aggregator: Fixes for user-space interface extension series
Subsystems (3)
Maximilian Luz
maintainercover platform/surface: aggregator: Fixes for user-space interface extension series
Small fixes for "platform/surface: aggregator: Extend user-space interface for events".
Specifically, prevent use of an uniniitalized variable and drop an unnecessary initialization.
Maximilian Luz (2):
platform/surface: aggregator: Do not return uninitialized value platform/surface: aggregator: Drop unnecessary variable initialization
drivers/platform/surface/aggregator/controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.31.1
Maximilian Luz
maintainerPATCH 1/2 platform/surface: aggregator: Do not return uninitialized value
The status variable in ssam_nf_refcount_disable_free() is only set when the reference count equals zero. Otherwise, it is returned uninitialized. Fix this by always initializing status to zero.
--- drivers/platform/surface/aggregator/controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/surface/aggregator/controller.c +1 -1
@@ -2228,7 +2228,7 @@ static int ssam_nf_refcount_disable_free(struct ssam_controller *ctrl,const struct ssam_event_registry reg = entry->key.reg;const struct ssam_event_id id = entry->key.id;struct ssam_nf *nf = &ctrl->cplt.event.notif; -int status; +int status =0 ;lockdep_assert_held (&nf->lock);
Signature · 1 line
2.31.1
Maximilian Luz
maintainerPATCH 2/2 platform/surface: aggregator: Drop unnecessary variable initialization
In reply to Maximilian LuzThe status variable in ssam_controller_event_disable() is always set, no need to initialize it.
--- drivers/platform/surface/aggregator/controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/surface/aggregator/controller.c +1 -1
@@ -2464,7 +2464,7 @@ int ssam_controller_event_disable(struct ssam_controller *ctrl,u16 rqid =ssh_tc_to_rqid (id.target_category);struct ssam_nf *nf = &ctrl->cplt.event.notif;struct ssam_nf_refcount_entry *entry; -int status =0 ; +int status;if (!ssh_rqid_is_event (rqid))return -EINVAL ;
Signature · 1 line
2.31.1
Hi,
Quoted 9 lines · Maximilian Luz
Small fixes for "platform/surface: aggregator: Extend user-space interface for events".
Specifically, prevent use of an uniniitalized variable and drop an unnecessary initialization.
Maximilian Luz (2):
platform/surface: aggregator: Do not return uninitialized value platform/surface: aggregator: Drop unnecessary variable initialization
Thank you for your patch-series, I've applied the series to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans