lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe0ecf26-e098-473d-a78b-58938a237bac@amd.com>
Date: Mon, 1 Jul 2024 11:49:34 -0700
From: Brett Creeley <bcreeley@....com>
To: Bart Van Assche <bvanassche@....org>, Tejun Heo <tj@...nel.org>
Cc: Lai Jiangshan <jiangshanlai@...il.com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>,
 linux-kernel@...r.kernel.org, Shannon Nelson <shannon.nelson@....com>,
 Brett Creeley <brett.creeley@....com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH 23/53] pds_core: Simplify a create*_workqueue() call



On 6/30/2024 3:26 PM, Bart Van Assche wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> Pass a format string to create*_workqueue2() instead of formatting the
> workqueue name before create*_workqueue() is called.
> 
> Signed-off-by: Bart Van Assche <bvanassche@....org>
> ---
>   drivers/net/ethernet/amd/pds_core/main.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/pds_core/main.c b/drivers/net/ethernet/amd/pds_core/main.c
> index 660268ff9562..e2e49656c111 100644
> --- a/drivers/net/ethernet/amd/pds_core/main.c
> +++ b/drivers/net/ethernet/amd/pds_core/main.c
> @@ -213,12 +213,9 @@ static const struct devlink_param pdsc_dl_params[] = {
>                                pdsc_dl_enable_validate),
>   };
> 
> -#define PDSC_WQ_NAME_LEN 24
> -
>   static int pdsc_init_pf(struct pdsc *pdsc)
>   {
>          struct devlink_health_reporter *hr;
> -       char wq_name[PDSC_WQ_NAME_LEN];
>          struct devlink *dl;
>          int err;
> 
> @@ -236,8 +233,8 @@ static int pdsc_init_pf(struct pdsc *pdsc)
>                  goto err_out_release_regions;
> 
>          /* General workqueue and timer, but don't start timer yet */
> -       snprintf(wq_name, sizeof(wq_name), "%s.%d", PDS_CORE_DRV_NAME, pdsc->uid);
> -       pdsc->wq = create_singlethread_workqueue(wq_name);
> +       pdsc->wq = create_singlethread_workqueue2("%s.%d", PDS_CORE_DRV_NAME,
> +                                                 pdsc->uid);

LGTM. Thanks.

Reviewed-by: Brett Creeley <brett.creeley@....com>

BTW, I don't actually see patch 53/53 that renames *workqueue2() -> 
*workqueue(). Am I missing something here? It's mentioned in the cover 
letter, but I don't see it on the series thread.

Brett

>          INIT_WORK(&pdsc->health_work, pdsc_health_thread);
>          INIT_WORK(&pdsc->pci_reset_work, pdsc_pci_reset_thread);
>          timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ