Re: [PATCH] media: staging: use strscpy() instead of strlcpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/29/19 4:29 PM, Mauro Carvalho Chehab wrote:
> There are a few left overs at staging with were still using the
> deprecated strlcpy() function.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>

Reviewed-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>

Thanks!

	Hans

> ---
>  drivers/staging/media/imx/imx-media-dev-common.c      | 4 ++--
>  drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-dev-common.c b/drivers/staging/media/imx/imx-media-dev-common.c
> index 910594125889..6cd93419b81d 100644
> --- a/drivers/staging/media/imx/imx-media-dev-common.c
> +++ b/drivers/staging/media/imx/imx-media-dev-common.c
> @@ -30,7 +30,7 @@ struct imx_media_dev *imx_media_dev_init(struct device *dev)
>  
>  	dev_set_drvdata(dev, imxmd);
>  
> -	strlcpy(imxmd->md.model, "imx-media", sizeof(imxmd->md.model));
> +	strscpy(imxmd->md.model, "imx-media", sizeof(imxmd->md.model));
>  	imxmd->md.ops = &imx_media_md_ops;
>  	imxmd->md.dev = dev;
>  
> @@ -38,7 +38,7 @@ struct imx_media_dev *imx_media_dev_init(struct device *dev)
>  
>  	imxmd->v4l2_dev.mdev = &imxmd->md;
>  	imxmd->v4l2_dev.notify = imx_media_notify;
> -	strlcpy(imxmd->v4l2_dev.name, "imx-media",
> +	strscpy(imxmd->v4l2_dev.name, "imx-media",
>  		sizeof(imxmd->v4l2_dev.name));
>  
>  	media_device_init(&imxmd->md);
> diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
> index 57611464ad07..58721c46fba4 100644
> --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
> +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
> @@ -462,7 +462,7 @@ static int rockchip_vpu_probe(struct platform_device *pdev)
>  	}
>  
>  	vpu->mdev.dev = vpu->dev;
> -	strlcpy(vpu->mdev.model, DRIVER_NAME, sizeof(vpu->mdev.model));
> +	strscpy(vpu->mdev.model, DRIVER_NAME, sizeof(vpu->mdev.model));
>  	media_device_init(&vpu->mdev);
>  	vpu->v4l2_dev.mdev = &vpu->mdev;
>  
> 

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux