omap3isp cleanups
cover omap3isp cleanups
Hi,
These patches fix a useless check in ispstat as well as get rid of the GFP_DMA.
Sakari Ailus (2):
omap3isp: Remove useless NULL check in omap3isp_stat_config
omap3isp: Don't use GFP_DMA
drivers/media/platform/omap3isp/ispstat.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/2 omap3isp: Remove useless NULL check in omap3isp_stat_config
The omap3isp driver checked whether the second argument (the new configuration) to the ISP statistics is NULL. This is the pointer to the user-given argument and is never NULL. Remove the check.
--- drivers/media/platform/omap3isp/ispstat.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/media/platform/omap3isp/ispstat.c +0 -6
@@ -542,12 +542,6 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf)struct ispstat_generic_config *user_cfg = new_conf;u32 buf_size = user_cfg->buf_size; -if (!new_conf) { -dev_dbg (stat->isp->dev,"%s: configuration is NULL\n" , - stat->subdev.name); -return -EINVAL ; - } -mutex_lock (&stat->ioctl_lock); dev_dbg(stat->isp->dev,
Signature · 1 line
2.11.0
Re: [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config
Hi Sakari,
Thank you for the patch.
Quoted 7 lines · On Monday, 7 May 2018 15:47:22 EEST Sakari Ailus wrote:
The omap3isp driver checked whether the second argument (the new configuration) to the ISP statistics is NULL. This is the pointer to the user-given argument and is never NULL. Remove the check.
Reported-by "Gustavo A. R. Silva" <[email protected]>Suggested-by Laurent Pinchart <[email protected]>Signed-off-by Sakari Ailus <[email protected]>
Quoted 22 lines
--- drivers/media/platform/omap3isp/ispstat.c | 6 ------ 1 file changed, 6 deletions(-)(quoted diff) +0
-0
b/drivers/media/platform/omap3isp/ispstat.cindex529cd8fb29b1..34a91125da36100644drivers/media/platform/omap3isp/ispstat.c +0
-6@@ -542,12 +542,6 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf) struct ispstat_generic_config *user_cfg = new_conf;u32 buf_size = user_cfg->buf_size; -if (!new_conf) { -dev_dbg (stat->isp->dev,"%s: configuration is NULL\n" , - stat->subdev.name); -return -EINVAL ; - } -mutex_lock (&stat->ioctl_lock); dev_dbg(stat->isp->dev,
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 2/2 omap3isp: Don't use GFP_DMA
In reply to Sakari AilusThe isp stat driver allocates memory for DMA and uses GFP_DMA flag for dev_alloc_coherent. The flag is no longer needed as the DMA mask is used for the purpose. Remove it.
--- drivers/media/platform/omap3isp/ispstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/omap3isp/ispstat.c +1 -1
@@ -371,7 +371,7 @@ static int isp_stat_bufs_alloc_one(struct device *dev,int ret; buf->virt_addr =dma_alloc_coherent (dev, size, &buf->dma_addr, -GFP_KERNEL |GFP_DMA ); +GFP_KERNEL );if (!buf->virt_addr)return -ENOMEM ;
Signature · 1 line
2.11.0
Re: [PATCH 2/2] omap3isp: Don't use GFP_DMA
Hi Sakari,
Thank you for the patch.
Quoted 6 lines · On Monday, 7 May 2018 15:47:23 EEST Sakari Ailus wrote:
The isp stat driver allocates memory for DMA and uses
GFP_DMAflag fordev_alloc_coherent. The flag is no longer needed as the DMA mask is used for the purpose. Remove it.Reported-by Mauro Carvalho Chehab <[email protected]>Signed-off-by Sakari Ailus <[email protected]>
Quoted 17 lines
--- drivers/media/platform/omap3isp/ispstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/media/platform/omap3isp/ispstat.cindex34a91125da36..c68562189961100644drivers/media/platform/omap3isp/ispstat.c +1
-1@@ -371,7 +371,7 @@ static int isp_stat_bufs_alloc_one(struct device *dev,int ret; buf->virt_addr =dma_alloc_coherent (dev, size, &buf->dma_addr, -GFP_KERNEL |GFP_DMA ); +GFP_KERNEL );if (!buf->virt_addr)return -ENOMEM ;
Signature · 3 lines
Regards, Laurent Pinchart