From patchwork Thu May 10 06:35:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 8510 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2B29F23ED1 for ; Thu, 10 May 2012 06:45:38 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id ECCD5A18A84 for ; Thu, 10 May 2012 06:45:37 +0000 (UTC) Received: by yenq6 with SMTP id q6so1431156yen.11 for ; Wed, 09 May 2012 23:45:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=8JrTtG0/fe5ada2whmB8o1SoNf1wGA5pbL5t0P7ON6A=; b=BXCc6Cege95iF9Ndy8jqDdGyHSTjcIwylojDXwmJRTwsPswg4M7pNptJbrFQ8gOii+ miAm8LQ9Oa45MlYi3AI6PjTi34cgu3ndeScpxG6y2SM+V9C9ElH+geZD7keYutLA0bDk 8mcyVh9mdV/GV/0Yf+YeLB/rul0XfMgXcOqh68GKReaVs8Dbwm9JvuFk8vbwuCskbCsm XckWoUqWumx6cuSjDclvFJPP5Th2mTxlEjuxjXf5ymPoApTsL6Qj1qIPwMj1k+z25uWS WtoYBtYGo68XOstCN3tY6X4G4ctDaESYKblaLICGibUsH2oBqEn2tKCq4ARLe/8DwmnU LMcw== Received: by 10.42.130.7 with SMTP id t7mr1380061ics.43.1336632337362; Wed, 09 May 2012 23:45:37 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.73.147 with SMTP id q19csp71550ibj; Wed, 9 May 2012 23:45:36 -0700 (PDT) Received: by 10.68.234.232 with SMTP id uh8mr4475882pbc.82.1336632336616; Wed, 09 May 2012 23:45:36 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id ux8si1530127pbc.322.2012.05.09.23.45.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 May 2012 23:45:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by danh15 with SMTP id h15so1630631dan.37 for ; Wed, 09 May 2012 23:45:36 -0700 (PDT) Received: by 10.68.226.5 with SMTP id ro5mr17388083pbc.74.1336632336146; Wed, 09 May 2012 23:45:36 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id q1sm8574684pbp.62.2012.05.09.23.45.32 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 May 2012 23:45:35 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, k.debski@samsung.com, kyungmin.park@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] [media] s5p-g2d: Fix NULL pointer warnings in g2d.c file Date: Thu, 10 May 2012 12:05:47 +0530 Message-Id: <1336631748-25160-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmSwziQhZeMTvzqfFMolZdXzEPVphZ2egHfxbNZcD2PP+q6W1gzIOHlx2QTJ7DwmFZEung0 Fixes the following warnings detected by sparse: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat Acked-by: Kamil Debski --- drivers/media/video/s5p-g2d/g2d.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/video/s5p-g2d/g2d.c b/drivers/media/video/s5p-g2d/g2d.c index 789de74..70bee1c 100644 --- a/drivers/media/video/s5p-g2d/g2d.c +++ b/drivers/media/video/s5p-g2d/g2d.c @@ -546,11 +546,11 @@ static void job_abort(void *prv) struct g2d_dev *dev = ctx->dev; int ret; - if (dev->curr == 0) /* No job currently running */ + if (dev->curr == NULL) /* No job currently running */ return; ret = wait_event_timeout(dev->irq_queue, - dev->curr == 0, + dev->curr == NULL, msecs_to_jiffies(G2D_TIMEOUT)); } @@ -599,19 +599,19 @@ static irqreturn_t g2d_isr(int irq, void *prv) g2d_clear_int(dev); clk_disable(dev->gate); - BUG_ON(ctx == 0); + BUG_ON(ctx == NULL); src = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); dst = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx); - BUG_ON(src == 0); - BUG_ON(dst == 0); + BUG_ON(src == NULL); + BUG_ON(dst == NULL); v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx); - dev->curr = 0; + dev->curr = NULL; wake_up(&dev->irq_queue); return IRQ_HANDLED; }