* [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series
@ 2021-06-04 21:09 Maximilian Luz
2021-06-04 21:09 ` [PATCH 1/2] platform/surface: aggregator: Do not return uninitialized value Maximilian Luz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Maximilian Luz @ 2021-06-04 21:09 UTC (permalink / raw)
To: Hans de Goede
Cc: Mark Gross, platform-driver-x86, linux-kernel, 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
drivers/platform/surface/aggregator/controller.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] platform/surface: aggregator: Do not return uninitialized value
2021-06-04 21:09 [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Maximilian Luz
@ 2021-06-04 21:09 ` Maximilian Luz
2021-06-04 21:09 ` [PATCH 2/2] platform/surface: aggregator: Drop unnecessary variable initialization Maximilian Luz
2021-06-09 14:22 ` [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Maximilian Luz @ 2021-06-04 21:09 UTC (permalink / raw)
To: Hans de Goede
Cc: Mark Gross, platform-driver-x86, linux-kernel, Maximilian Luz,
kernel test robot
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.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 640ee17199e4 ("platform/surface: aggregator: Allow enabling of events without notifiers")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---
drivers/platform/surface/aggregator/controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
index 6646f4d6e10d..634399387d76 100644
--- a/drivers/platform/surface/aggregator/controller.c
+++ b/drivers/platform/surface/aggregator/controller.c
@@ -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);
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] platform/surface: aggregator: Drop unnecessary variable initialization
2021-06-04 21:09 [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Maximilian Luz
2021-06-04 21:09 ` [PATCH 1/2] platform/surface: aggregator: Do not return uninitialized value Maximilian Luz
@ 2021-06-04 21:09 ` Maximilian Luz
2021-06-09 14:22 ` [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Maximilian Luz @ 2021-06-04 21:09 UTC (permalink / raw)
To: Hans de Goede
Cc: Mark Gross, platform-driver-x86, linux-kernel, Maximilian Luz
The status variable in ssam_controller_event_disable() is always set, no
need to initialize it.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---
drivers/platform/surface/aggregator/controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
index 634399387d76..b8c377b3f932 100644
--- a/drivers/platform/surface/aggregator/controller.c
+++ b/drivers/platform/surface/aggregator/controller.c
@@ -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;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series
2021-06-04 21:09 [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Maximilian Luz
2021-06-04 21:09 ` [PATCH 1/2] platform/surface: aggregator: Do not return uninitialized value Maximilian Luz
2021-06-04 21:09 ` [PATCH 2/2] platform/surface: aggregator: Drop unnecessary variable initialization Maximilian Luz
@ 2021-06-09 14:22 ` Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2021-06-09 14:22 UTC (permalink / raw)
To: Maximilian Luz; +Cc: Mark Gross, platform-driver-x86, linux-kernel
Hi,
On 6/4/21 11:09 PM, Maximilian Luz wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-09 14:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 21:09 [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Maximilian Luz
2021-06-04 21:09 ` [PATCH 1/2] platform/surface: aggregator: Do not return uninitialized value Maximilian Luz
2021-06-04 21:09 ` [PATCH 2/2] platform/surface: aggregator: Drop unnecessary variable initialization Maximilian Luz
2021-06-09 14:22 ` [PATCH 0/2] platform/surface: aggregator: Fixes for user-space interface extension series Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).