All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] omap3isp cleanups
@ 2018-05-07 12:47 Sakari Ailus
  2018-05-07 12:47 ` [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config Sakari Ailus
  2018-05-07 12:47 ` [PATCH 2/2] omap3isp: Don't use GFP_DMA Sakari Ailus
  0 siblings, 2 replies; 5+ messages in thread
From: Sakari Ailus @ 2018-05-07 12:47 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, mchehab

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(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config
  2018-05-07 12:47 [PATCH 0/2] omap3isp cleanups Sakari Ailus
@ 2018-05-07 12:47 ` Sakari Ailus
  2018-05-07 13:21   ` Laurent Pinchart
  2018-05-07 12:47 ` [PATCH 2/2] omap3isp: Don't use GFP_DMA Sakari Ailus
  1 sibling, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2018-05-07 12:47 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, mchehab

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" <gustavo@embeddedor.com>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/platform/omap3isp/ispstat.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 529cd8fb29b1..34a91125da36 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -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,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] omap3isp: Don't use GFP_DMA
  2018-05-07 12:47 [PATCH 0/2] omap3isp cleanups Sakari Ailus
  2018-05-07 12:47 ` [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config Sakari Ailus
@ 2018-05-07 12:47 ` Sakari Ailus
  2018-05-07 13:21   ` Laurent Pinchart
  1 sibling, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2018-05-07 12:47 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, mchehab

The 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.

Reported-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/platform/omap3isp/ispstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 34a91125da36..c68562189961 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -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;
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config
  2018-05-07 12:47 ` [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config Sakari Ailus
@ 2018-05-07 13:21   ` Laurent Pinchart
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2018-05-07 13:21 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, mchehab

Hi Sakari,

Thank you for the patch.

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" <gustavo@embeddedor.com>
> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/platform/omap3isp/ispstat.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/media/platform/omap3isp/ispstat.c
> b/drivers/media/platform/omap3isp/ispstat.c index
> 529cd8fb29b1..34a91125da36 100644
> --- a/drivers/media/platform/omap3isp/ispstat.c
> +++ b/drivers/media/platform/omap3isp/ispstat.c
> @@ -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,


-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] omap3isp: Don't use GFP_DMA
  2018-05-07 12:47 ` [PATCH 2/2] omap3isp: Don't use GFP_DMA Sakari Ailus
@ 2018-05-07 13:21   ` Laurent Pinchart
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2018-05-07 13:21 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, mchehab

Hi Sakari,

Thank you for the patch.

On Monday, 7 May 2018 15:47:23 EEST Sakari Ailus wrote:
> The 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.
> 
> Reported-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/platform/omap3isp/ispstat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/omap3isp/ispstat.c
> b/drivers/media/platform/omap3isp/ispstat.c index
> 34a91125da36..c68562189961 100644
> --- a/drivers/media/platform/omap3isp/ispstat.c
> +++ b/drivers/media/platform/omap3isp/ispstat.c
> @@ -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;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-07 13:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 12:47 [PATCH 0/2] omap3isp cleanups Sakari Ailus
2018-05-07 12:47 ` [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config Sakari Ailus
2018-05-07 13:21   ` Laurent Pinchart
2018-05-07 12:47 ` [PATCH 2/2] omap3isp: Don't use GFP_DMA Sakari Ailus
2018-05-07 13:21   ` Laurent Pinchart

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.