diff mbox

staging: omapdrm: Fix DMM sparse warnings

Message ID 1344489296-16722-1-git-send-email-andy.gross@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Gross Aug. 9, 2012, 5:14 a.m. UTC
Fix the following sparse warnings:

drivers/staging/omapdrm/omap_dmm_tiler.c:123:13:
   warning: symbol 'omap_dmm_irq_handler' was not declared.
   Should it be static?

drivers/staging/omapdrm/omap_dmm_tiler.c:370:24:
   warning: Using plain integer as NULL pointer

Signed-off-by: Andy Gross <andy.gross@ti.com>
---
 drivers/staging/omapdrm/omap_dmm_tiler.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Rob Clark Aug. 9, 2012, 4:56 p.m. UTC | #1
On Thu, Aug 9, 2012 at 12:14 AM, Andy Gross <andy.gross@ti.com> wrote:
> Fix the following sparse warnings:
>
> drivers/staging/omapdrm/omap_dmm_tiler.c:123:13:
>    warning: symbol 'omap_dmm_irq_handler' was not declared.
>    Should it be static?
>
> drivers/staging/omapdrm/omap_dmm_tiler.c:370:24:
>    warning: Using plain integer as NULL pointer
>
> Signed-off-by: Andy Gross <andy.gross@ti.com>

Signed-off-by: Rob Clark <rob.clark@linaro.org>

> ---
>  drivers/staging/omapdrm/omap_dmm_tiler.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c
> index 8619783..ec7a5c8 100644
> --- a/drivers/staging/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c
> @@ -120,7 +120,7 @@ static int wait_status(struct refill_engine *engine, uint32_t wait_mask)
>         return 0;
>  }
>
> -irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
> +static irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
>  {
>         struct dmm *dmm = arg;
>         uint32_t status = readl(dmm->base + DMM_PAT_IRQSTATUS);
> @@ -367,7 +367,7 @@ struct tiler_block *tiler_reserve_1d(size_t size)
>         int num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
>
>         if (!block)
> -               return 0;
> +               return ERR_PTR(-ENOMEM);
>
>         block->fmt = TILFMT_PAGE;
>
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sumit Semwal Aug. 10, 2012, 5:59 a.m. UTC | #2
On Thu, Aug 9, 2012 at 10:26 PM, Rob Clark <rob.clark@linaro.org> wrote:
> On Thu, Aug 9, 2012 at 12:14 AM, Andy Gross <andy.gross@ti.com> wrote:
>> Fix the following sparse warnings:
>>
>> drivers/staging/omapdrm/omap_dmm_tiler.c:123:13:
>>    warning: symbol 'omap_dmm_irq_handler' was not declared.
>>    Should it be static?
>>
>> drivers/staging/omapdrm/omap_dmm_tiler.c:370:24:
>>    warning: Using plain integer as NULL pointer
>>
>> Signed-off-by: Andy Gross <andy.gross@ti.com>
>
> Signed-off-by: Rob Clark <rob.clark@linaro.org>
Reviewed-by: Sumit Semwal <sumit.semwal@ti.com>
>
>> ---
>>  drivers/staging/omapdrm/omap_dmm_tiler.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c
>> index 8619783..ec7a5c8 100644
>> --- a/drivers/staging/omapdrm/omap_dmm_tiler.c
>> +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c
>> @@ -120,7 +120,7 @@ static int wait_status(struct refill_engine *engine, uint32_t wait_mask)
>>         return 0;
>>  }
>>
>> -irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
>> +static irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
>>  {
>>         struct dmm *dmm = arg;
>>         uint32_t status = readl(dmm->base + DMM_PAT_IRQSTATUS);
>> @@ -367,7 +367,7 @@ struct tiler_block *tiler_reserve_1d(size_t size)
>>         int num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
>>
>>         if (!block)
>> -               return 0;
>> +               return ERR_PTR(-ENOMEM);
>>
>>         block->fmt = TILFMT_PAGE;
>>
>> --
>> 1.7.5.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c
index 8619783..ec7a5c8 100644
--- a/drivers/staging/omapdrm/omap_dmm_tiler.c
+++ b/drivers/staging/omapdrm/omap_dmm_tiler.c
@@ -120,7 +120,7 @@  static int wait_status(struct refill_engine *engine, uint32_t wait_mask)
 	return 0;
 }
 
-irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
+static irqreturn_t omap_dmm_irq_handler(int irq, void *arg)
 {
 	struct dmm *dmm = arg;
 	uint32_t status = readl(dmm->base + DMM_PAT_IRQSTATUS);
@@ -367,7 +367,7 @@  struct tiler_block *tiler_reserve_1d(size_t size)
 	int num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
 
 	if (!block)
-		return 0;
+		return ERR_PTR(-ENOMEM);
 
 	block->fmt = TILFMT_PAGE;