All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Accel-config] Re: [PATCH] accel-config: Fix char device path issue with iax device type
@ 2021-06-28 22:15 Dave Jiang
  0 siblings, 0 replies; only message in thread
From: Dave Jiang @ 2021-06-28 22:15 UTC (permalink / raw
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]


On 6/28/2021 12:31 PM, ramesh.thomas(a)intel.com wrote:
> From: Ramesh Thomas <ramesh.thomas(a)intel.com>
>
> Even in kernel versions where iax bus type was removed dsa driver
> creates char device path under iax. Use device type to create the path
> instead of bus type in accel-config.
>
> Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>

Reviewed-by: Dave Jiang <dave.jiang(a)intel.com>


> ---
>   accfg/lib/libaccfg.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c
> index 1463a4d..f53751e 100644
> --- a/accfg/lib/libaccfg.c
> +++ b/accfg/lib/libaccfg.c
> @@ -2093,7 +2093,7 @@ ACCFG_EXPORT int accfg_wq_get_user_dev_path(struct accfg_wq *wq, char *buf,
>   
>   	ctx = accfg_device_get_ctx(wq->device);
>   
> -	sprintf(p, "/dev/%s", wq->device->bus_type_str);
> +	sprintf(p, "/dev/%s", wq->device->device_type_str);
>   	n1 = n = scandir(p, &d, NULL, alphasort);
>   	if (n < 0) {
>   		err(ctx, "Device path not found %s\n", p);
> @@ -2112,12 +2112,12 @@ ACCFG_EXPORT int accfg_wq_get_user_dev_path(struct accfg_wq *wq, char *buf,
>   	if (n < 0) {
>   		err(ctx, "Device for %s not found at /dev/%s\n",
>   				accfg_wq_get_devname(wq),
> -				wq->device->bus_type_str);
> +				wq->device->device_type_str);
>   		rc = -ENOENT;
>   		goto ext_uacce;
>   	}
>   
> -	n = sprintf(p, "/dev/%s/%s", wq->device->bus_type_str, f);
> +	n = sprintf(p, "/dev/%s/%s", wq->device->device_type_str, f);
>   
>   	if ((size_t)n >= size) {
>   		err(ctx, "Buffer size too small. Need %d bytes\n", n + 1);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-28 22:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-28 22:15 [Accel-config] Re: [PATCH] accel-config: Fix char device path issue with iax device type Dave Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.