diff mbox series

firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation

Message ID ZEGTnajiQm7mkkZS@slm.duckdns.org (mailing list archive)
State New, archived
Headers show
Series firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation | expand

Commit Message

Tejun Heo April 20, 2023, 7:33 p.m. UTC
scmi_xfer_raw_worker_init() is specifying a flag, WQ_SYSFS, as @max_active.
Fix it by or'ing WQ_SYSFS into @flags so that it actually enables sysfs
interface and using 0 for @max_active for the default setting.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 drivers/firmware/arm_scmi/raw_mode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cristian Marussi April 21, 2023, 8:46 a.m. UTC | #1
On Thu, Apr 20, 2023 at 09:33:49AM -1000, Tejun Heo wrote:
> scmi_xfer_raw_worker_init() is specifying a flag, WQ_SYSFS, as @max_active.
> Fix it by or'ing WQ_SYSFS into @flags so that it actually enables sysfs
> interface and using 0 for @max_active for the default setting.
> 

Hi Tejun,

my bad I messed up the params in the call.

LGTM.

Thanks,
Cristian

> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
>  drivers/firmware/arm_scmi/raw_mode.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/firmware/arm_scmi/raw_mode.c
> +++ b/drivers/firmware/arm_scmi/raw_mode.c
> @@ -1066,7 +1066,7 @@ static int scmi_xfer_raw_worker_init(str
>  
>  	raw->wait_wq = alloc_workqueue("scmi-raw-wait-wq-%d",
>  				       WQ_UNBOUND | WQ_FREEZABLE |
> -				       WQ_HIGHPRI, WQ_SYSFS, raw->id);
> +				       WQ_HIGHPRI | WQ_SYSFS, 0, raw->id);
>  	if (!raw->wait_wq)
>  		return -ENOMEM;
>
Sudeep Holla April 21, 2023, 9:27 a.m. UTC | #2
On Fri, Apr 21, 2023 at 09:46:11AM +0100, Cristian Marussi wrote:
> On Thu, Apr 20, 2023 at 09:33:49AM -1000, Tejun Heo wrote:
> > scmi_xfer_raw_worker_init() is specifying a flag, WQ_SYSFS, as @max_active.
> > Fix it by or'ing WQ_SYSFS into @flags so that it actually enables sysfs
> > interface and using 0 for @max_active for the default setting.
> >

Thanks, good catch, very hard to notice.

> 
> Hi Tejun,
> 
> my bad I messed up the params in the call.
>

Hi Cristian,

I think it deserves the fixes tag, right ?

Fixes: 3c3d818a9317 ("firmware: arm_scmi: Add core raw transmission support")
Cristian Marussi April 21, 2023, 9:38 a.m. UTC | #3
On Fri, Apr 21, 2023 at 10:27:42AM +0100, Sudeep Holla wrote:
> On Fri, Apr 21, 2023 at 09:46:11AM +0100, Cristian Marussi wrote:
> > On Thu, Apr 20, 2023 at 09:33:49AM -1000, Tejun Heo wrote:
> > > scmi_xfer_raw_worker_init() is specifying a flag, WQ_SYSFS, as @max_active.
> > > Fix it by or'ing WQ_SYSFS into @flags so that it actually enables sysfs
> > > interface and using 0 for @max_active for the default setting.
> > >
> 
> Thanks, good catch, very hard to notice.

Indeed :<

> 
> > 
> > Hi Tejun,
> > 
> > my bad I messed up the params in the call.
> >
> 
> Hi Cristian,
> 
> I think it deserves the fixes tag, right ?
> 
> Fixes: 3c3d818a9317 ("firmware: arm_scmi: Add core raw transmission support")
> 

I though so, but as usual I am not sure what to do when we are fixing something
in the middle of a cycle... Raw support went in v6.3-rc1 and we are now in
v6.3-rc7, so if you want to pick this up now (as it seems the case) it will fix
the above yes, but it is anyway still on an unreleased kernel...so nothing really
to have to apply on any early stable kernels...buh..I dont know what is the rule,
but the Fix tag seems harmless ... so why not :D

Thanks,
Cristian
Sudeep Holla April 21, 2023, 9:48 a.m. UTC | #4
On Fri, Apr 21, 2023 at 10:38:49AM +0100, Cristian Marussi wrote:
> I though so, but as usual I am not sure what to do when we are fixing something
> in the middle of a cycle... Raw support went in v6.3-rc1 and we are now in
> v6.3-rc7, so if you want to pick this up now (as it seems the case) it will fix
> the above yes, but it is anyway still on an unreleased kernel...so nothing really
> to have to apply on any early stable kernels...buh..I dont know what is the rule,
> but the Fix tag seems harmless ... so why not :D
> 

Not that complicated TBH. If you know this fixes a particular commit in the
tree, just add Fixes tag. The stable maintainers have made it easier in
general by relying on the fixes tag and not needing explicit stable tag in
most of the cases. I will add it.
diff mbox series

Patch

--- a/drivers/firmware/arm_scmi/raw_mode.c
+++ b/drivers/firmware/arm_scmi/raw_mode.c
@@ -1066,7 +1066,7 @@  static int scmi_xfer_raw_worker_init(str
 
 	raw->wait_wq = alloc_workqueue("scmi-raw-wait-wq-%d",
 				       WQ_UNBOUND | WQ_FREEZABLE |
-				       WQ_HIGHPRI, WQ_SYSFS, raw->id);
+				       WQ_HIGHPRI | WQ_SYSFS, 0, raw->id);
 	if (!raw->wait_wq)
 		return -ENOMEM;