On Thu, Nov 13, 2025 at 10:12:00PM +0800, Chang Junzheng wrote:
> From: Chang Junzheng <guagua210311(a)outlook.com>
>
> Fix checkpatch.pl warning by changing envp array declaration to
> static const char * const. This improves code safety and follows
> kernel coding style recommendations.
>
> Signed-off-by: Chang Junzheng <guagua210311(a)qq.com>
> Changes in v2:
> - Restored original indentation of array elements
> - Only changed the array declaration as originally intended
The "Changes" goes below the --- line, as per the documentation.
thanks,
greg k-h
On Thu, Nov 13, 2025 at 09:39:54PM +0800, cjz_VM wrote:
> Hi Greg,
>
> Thanks for reviewing my patch!
>
> For sending twice: I apologize for the duplicate. After the first send, I realized I had missed some greybus-specific maintainers, so I resent to include them all.
Then that should have been a v2 patch :)
> For the indentation: You're right to ask about it. When I changed the declaration from 'char *envp[]' to 'static const char * const envp[]', the opening bracket moved to the right due to the longer declaration. I added tabs to keep the array elements aligned with the opening bracket, following the kernel coding style rule that parameters should align with the opening parenthesis.
>
> If this alignment approach is not preferred, I'm happy to adjust it to whatever style you recommend.
You did not document your change, and it had nothing really to do with
the const change, so I would not recommend doing this.
Also, please do not top-post, and be sure to properly wrap your lines in
your email client.
thanks,
greg k-h
Currently if a user enqueues a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.
This lack of consistency cannot be addressed without refactoring the API.
alloc_workqueue() treats all queues as per-CPU by default, while unbound
workqueues must opt-in via WQ_UNBOUND.
This default is suboptimal: most workloads benefit from unbound queues,
allowing the scheduler to place worker threads where they’re needed and
reducing noise when CPUs are isolated.
This continues the effort to refactor workqueue APIs, which began with
the introduction of new workqueues and a new alloc_workqueue flag in:
commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")
This change adds a new WQ_PERCPU flag to explicitly request
alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified.
With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU.
Once migration is complete, WQ_UNBOUND can be removed and unbound will
become the implicit default.
Suggested-by: Tejun Heo <tj(a)kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari(a)suse.com>
---
drivers/greybus/operation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/greybus/operation.c b/drivers/greybus/operation.c
index 54ccc434a1f7..7e12ffb2dd60 100644
--- a/drivers/greybus/operation.c
+++ b/drivers/greybus/operation.c
@@ -1238,7 +1238,7 @@ int __init gb_operation_init(void)
goto err_destroy_message_cache;
gb_operation_completion_wq = alloc_workqueue("greybus_completion",
- 0, 0);
+ WQ_PERCPU, 0);
if (!gb_operation_completion_wq)
goto err_destroy_operation_cache;
--
2.51.1
From: Markus Elfring <elfring(a)users.sourceforge.net>
Date: Fri, 31 Oct 2025 19:50:39 +0100
A pointer was assigned to a variable. The same pointer was used for
the destination parameter of a memcpy() call.
This function is documented in the way that the same value is returned.
Thus convert two separate statements into a direct variable assignment for
the return value from a memory copy action.
The source code was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring(a)users.sourceforge.net>
---
drivers/greybus/es2.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/greybus/es2.c b/drivers/greybus/es2.c
index 7630a36ecf81..d71d37b41a66 100644
--- a/drivers/greybus/es2.c
+++ b/drivers/greybus/es2.c
@@ -194,8 +194,7 @@ static int output_async(struct es2_ap_dev *es2, void *req, u16 size, u8 cmd)
return -ENOMEM;
}
- buf = (u8 *)dr + sizeof(*dr);
- memcpy(buf, req, size);
+ buf = memcpy((u8 *)dr + sizeof(*dr), req, size);
dr->bRequest = cmd;
dr->bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE;
--
2.51.1
In arche_platform_probe(), if arche_platform_coldboot_seq() fails after
register_pm_notifier() succeeds, the function returns without unregistering
the pm_notifier, leading to a resource leak.
Add unregister_pm_notifier() call in the err_coldboot error path to
properly clean up the registered notifier on failure.
Fixes: d29b67d44a7c ("greybus: arche-platform: Add support for init-off feature")
Signed-off-by: Haotian Zhang <vulab(a)iscas.ac.cn>
---
drivers/staging/greybus/arche-platform.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index d48464390f58..9c5bb5dae187 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -545,6 +545,7 @@ static int arche_platform_probe(struct platform_device *pdev)
return 0;
err_coldboot:
+ unregister_pm_notifier(&arche_pdata->pm_notifier);
mutex_unlock(&arche_pdata->platform_state_mutex);
err_device_remove:
device_remove_file(&pdev->dev, &dev_attr_state);
--
2.50.1.windows.1
Signed-off-by: zntsproj <vseokaktusah7(a)gmail.com>
---
.../staging/greybus/Documentation/firmware/firmware-management | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware-management b/drivers/staging/greybus/Documentation/firmware/firmware-management
index 7918257e5..393455557 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware-management
+++ b/drivers/staging/greybus/Documentation/firmware/firmware-management
@@ -193,7 +193,7 @@ Identifying the Character Device
There can be multiple devices present in /dev/ directory with name
gb-authenticate-N and user first needs to identify the character device used for
-authentication a of particular interface.
+authentication of a particular interface.
The Authentication core creates a device of class 'gb_authenticate', which shall
be used by the user to identify the right character device for it. The class
--
2.51.2
Signed-off-by: zntsproj <vseokaktusah7(a)gmail.com>
---
.../staging/greybus/Documentation/firmware/firmware-management | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware-management b/drivers/staging/greybus/Documentation/firmware/firmware-management
index 7918257e5..393455557 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware-management
+++ b/drivers/staging/greybus/Documentation/firmware/firmware-management
@@ -193,7 +193,7 @@ Identifying the Character Device
There can be multiple devices present in /dev/ directory with name
gb-authenticate-N and user first needs to identify the character device used for
-authentication a of particular interface.
+authentication of a particular interface.
The Authentication core creates a device of class 'gb_authenticate', which shall
be used by the user to identify the right character device for it. The class
--
2.51.2
Signed-off-by: zntsproj <vseokaktusah7(a)gmail.com>
---
.../staging/greybus/Documentation/firmware/firmware-management | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware-management b/drivers/staging/greybus/Documentation/firmware/firmware-management
index 7918257e5..393455557 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware-management
+++ b/drivers/staging/greybus/Documentation/firmware/firmware-management
@@ -193,7 +193,7 @@ Identifying the Character Device
There can be multiple devices present in /dev/ directory with name
gb-authenticate-N and user first needs to identify the character device used for
-authentication a of particular interface.
+authentication of a particular interface.
The Authentication core creates a device of class 'gb_authenticate', which shall
be used by the user to identify the right character device for it. The class
--
2.51.2