From patchwork Wed Jul 16 17:41:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 33747 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 754A9201F1 for ; Wed, 16 Jul 2014 17:41:42 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id q107sf2348718qgd.11 for ; Wed, 16 Jul 2014 10:41:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=y7v//9ycZiIsqn36j7/BEJcRw/NEZmA20lgRkd2WKoE=; b=IcivMy9KSnf1AaWzSUuxe+vyzhjymWDqV98SRPzzInAAPTSOOxCRmPmGPkJ9PXfxsz FrTatQOOjS+bwnaT15nVzg2RE8W9GhHZqaLT/0KRkzkG4V4xivoQCrFdSajr+o2VcMzH KYOrPtl3x6jAPQ2xC4BNyLAbtAioCzWknfwydDHXYulA8k1EHx5MZPaLLBr7jm8FqoB+ HjW7fat2uWE5ZEFIdWhzSY9oUmmj+TUzZAnLDnxvRoUgXJ6VS5fDnc4sCVvCxFYHRQT8 ypbTBS2KwabMGAYSRGzn8f+DKuvGRH1WtE2oRKLCVevX/xLNYp4o2s61Ys0CxNeeJgGz Uz9Q== X-Gm-Message-State: ALoCoQnsSfgSV18YSDOMMMt+IQZUKjSL31y6n2djaiC6OFiEMW2CYVJH/0CbPJrkqbbjkc5Dh0/x X-Received: by 10.236.168.101 with SMTP id j65mr13384856yhl.30.1405532502114; Wed, 16 Jul 2014 10:41:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.132 with SMTP id o4ls459739qga.40.gmail; Wed, 16 Jul 2014 10:41:42 -0700 (PDT) X-Received: by 10.52.170.69 with SMTP id ak5mr8507632vdc.63.1405532502030; Wed, 16 Jul 2014 10:41:42 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id mt8si9165974vec.72.2014.07.16.10.41.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jul 2014 10:41:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so2354063vcb.18 for ; Wed, 16 Jul 2014 10:41:41 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr4419338vcf.71.1405532501882; Wed, 16 Jul 2014 10:41:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp317817vcb; Wed, 16 Jul 2014 10:41:41 -0700 (PDT) X-Received: by 10.68.211.233 with SMTP id nf9mr31192918pbc.29.1405532501070; Wed, 16 Jul 2014 10:41:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pb2si5206972pac.28.2014.07.16.10.41.40; Wed, 16 Jul 2014 10:41:40 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934633AbaGPRlj (ORCPT + 3 others); Wed, 16 Jul 2014 13:41:39 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:33864 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932418AbaGPRli (ORCPT ); Wed, 16 Jul 2014 13:41:38 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6GHfcqU012331 for ; Wed, 16 Jul 2014 12:41:38 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6GHfcxD030451 for ; Wed, 16 Jul 2014 12:41:38 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 16 Jul 2014 12:41:38 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6GHfb7o013100; Wed, 16 Jul 2014 12:41:37 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 1/3] usb: gadget: udc: fsl_udc_core: fix sparse errors Date: Wed, 16 Jul 2014 12:41:28 -0500 Message-ID: <1405532490-12625-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.1.563.g66f467c MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , No functional changes, just fixing some easy to spot sparse errors. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/fsl_udc_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index 57944ee..75b23ea 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -59,9 +59,9 @@ static const char driver_name[] = "fsl-usb2-udc"; static const char driver_desc[] = DRIVER_DESC; -static struct usb_dr_device *dr_regs; +static struct usb_dr_device __iomem *dr_regs; -static struct usb_sys_interface *usb_sys_regs; +static struct usb_sys_interface __iomem *usb_sys_regs; /* it is initialized in probe() */ static struct fsl_udc *udc_controller = NULL; @@ -159,6 +159,8 @@ static inline void fsl_set_accessors(struct fsl_usb2_platform_data *pdata) {} * request is still in progress. *--------------------------------------------------------------*/ static void done(struct fsl_ep *ep, struct fsl_req *req, int status) +__releases(ep->udc->lock) +__acquires(ep->udc->lock) { struct fsl_udc *udc = NULL; unsigned char stopped = ep->stopped; @@ -1392,6 +1394,8 @@ stall: static void setup_received_irq(struct fsl_udc *udc, struct usb_ctrlrequest *setup) +__releases(udc->lock) +__acquires(udc->lock) { u16 wValue = le16_to_cpu(setup->wValue); u16 wIndex = le16_to_cpu(setup->wIndex); @@ -1957,7 +1961,7 @@ static int fsl_udc_start(struct usb_gadget *g, &udc_controller->gadget); if (retval < 0) { ERR("can't bind to transceiver\n"); - udc_controller->driver = 0; + udc_controller->driver = NULL; return retval; } } @@ -2379,7 +2383,7 @@ static int fsl_udc_probe(struct platform_device *pdev) goto err_release_mem_region; } - pdata->regs = (void *)dr_regs; + pdata->regs = (void __iomem *)dr_regs; /* * do platform specific init: check the clock, grab/config pins, etc.