From patchwork Mon Sep 3 10:18:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11147 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 A872723E29 for ; Mon, 3 Sep 2012 10:21:08 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 788E4A19025 for ; Mon, 3 Sep 2012 10:20:21 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so7144780iaf.11 for ; Mon, 03 Sep 2012 03:21:08 -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:in-reply-to:references :x-gm-message-state; bh=9KMCjPCcgkg5WtAF/LshqHNPdfVpCDJGvINTXyblmZ4=; b=iS5vekL1p+wHwoTDyBQ8LHOYfnzReBDGwI+XpC46V+7tN0lhXV/LolzH0tZ8lMrHHB 8i4wh0rnUsuOiKllNbyzTr94A3wjeFFXJun19u9H/8dfKfumV4qglpO3PaG3UQeSFt3M ysjTHpEfuyIMWauvA8rIF/SVFm/MEM4Y5+slpkdNhkSgcjDD88YVZVQEA1QZkQZ6uf+k cRkbWZnteNdvJbSCNGVjXQ3yDDim1v4WL79XNhH6KWlqboHuZBOMwABgkJ/UG9Zc6AXw FZIgupWRw3mQvvXbcBhPffSMNtXxsZNDj3JaGYGYhTtyWZN0cDHM4c/YfAk9jh1Xarkc xomg== Received: by 10.50.207.106 with SMTP id lv10mr10320027igc.0.1346667668151; Mon, 03 Sep 2012 03:21:08 -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.50.184.232 with SMTP id ex8csp129143igc; Mon, 3 Sep 2012 03:21:07 -0700 (PDT) Received: by 10.66.79.195 with SMTP id l3mr33090694pax.33.1346667667691; Mon, 03 Sep 2012 03:21:07 -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 pv1si21815568pbb.29.2012.09.03.03.21.07 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 03:21:07 -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 mail-pz0-f50.google.com with SMTP id e7so3942211dad.37 for ; Mon, 03 Sep 2012 03:21:07 -0700 (PDT) Received: by 10.68.217.100 with SMTP id ox4mr36731238pbc.87.1346667667151; Mon, 03 Sep 2012 03:21:07 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id gf8sm9633261pbc.52.2012.09.03.03.21.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 03:21:06 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: balbi@ti.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 3/3] usb: gadget: s3c-hsudc: Replace 0 with NULL for pointers Date: Mon, 3 Sep 2012 15:48:20 +0530 Message-Id: <1346667500-22555-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1346667500-22555-1-git-send-email-sachin.kamat@linaro.org> References: <1346667500-22555-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnSSTR3/5TPNOIDn3gxt/lqJHAEQ3p93Xwxe/okBx5rhUjCYXrq+67gX8oWw8zDSbvFSpHJ Silences the following type of sparse warnings: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat --- drivers/usb/gadget/s3c-hsudc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 35cdc6a..d8e785d 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -835,7 +835,7 @@ static struct usb_request *s3c_hsudc_alloc_request(struct usb_ep *_ep, hsreq = kzalloc(sizeof(*hsreq), gfp_flags); if (!hsreq) - return 0; + return NULL; INIT_LIST_HEAD(&hsreq->queue); return &hsreq->req; @@ -904,16 +904,16 @@ static int s3c_hsudc_queue(struct usb_ep *_ep, struct usb_request *_req, csr = readl((u32)hsudc->regs + offset); if (!(csr & S3C_ESR_TX_SUCCESS) && (s3c_hsudc_write_fifo(hsep, hsreq) == 1)) - hsreq = 0; + hsreq = NULL; } else { csr = readl((u32)hsudc->regs + offset); if ((csr & S3C_ESR_RX_SUCCESS) && (s3c_hsudc_read_fifo(hsep, hsreq) == 1)) - hsreq = 0; + hsreq = NULL; } } - if (hsreq != 0) + if (hsreq) list_add_tail(&hsreq->queue, &hsep->queue); spin_unlock_irqrestore(&hsudc->lock, flags);