From patchwork Thu Jun 26 20:13:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 32597 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6D6D8201EF for ; Thu, 26 Jun 2014 20:14:24 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id r10sf4022302igi.4 for ; Thu, 26 Jun 2014 13:14:23 -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:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=UytI947hUGAm/R76I8im7gSC9Xt5+fJOhJZKGkXLQmo=; b=GGJTYUMEbNBSp4HdfEmrEBUmnQoDOQaahM3HlaFDY7KxN88qeanTM1Anqq8WjG+JeW 9tGO2sPS0qgOq+wd1ebAga2bKeQINU0u1XwIlRrnUa5hYEnRJphHnEujWBrxRg6+Vm35 enTiM/Km64uT+qeP9uzIEOh3YkT/Iqff9xKZGYxrN5dT3JAPAoMk2GVTETcs4yjSijM4 TJe6Q4NBFj3epri7+jqdG85SfL2TIWDhHq1qDIMkDbNkq/G7r0x/BUg8xbT6qE072oBr 9dQu9I6AlrDuQVbGEZMQ2693cTHy8nAJ2ob6piajgAnUANNkRTVZx7l76vNVY/7SPZcv 9TQA== X-Gm-Message-State: ALoCoQns8xXXyjpbwmwvC4oQ95B+i8JVK71cGeobRMFXUFQKkKCw8mRbyxoaW7+KaQft6/eIBFyu X-Received: by 10.182.250.229 with SMTP id zf5mr9519967obc.4.1403813663830; Thu, 26 Jun 2014 13:14:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.229 with SMTP id p92ls371958qgp.92.gmail; Thu, 26 Jun 2014 13:14:23 -0700 (PDT) X-Received: by 10.58.151.68 with SMTP id uo4mr15283724veb.11.1403813663713; Thu, 26 Jun 2014 13:14:23 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id or9si5256274vcb.81.2014.06.26.13.14.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 13:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so4291665veb.2 for ; Thu, 26 Jun 2014 13:14:23 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr2736680vcf.71.1403813663637; Thu, 26 Jun 2014 13:14:23 -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 tc5csp56302vcb; Thu, 26 Jun 2014 13:14:23 -0700 (PDT) X-Received: by 10.180.103.228 with SMTP id fz4mr6876798wib.4.1403813662639; Thu, 26 Jun 2014 13:14:22 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id ek7si22340504wib.59.2014.06.26.13.14.22 for ; Thu, 26 Jun 2014 13:14:22 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 277A1A7778; Thu, 26 Jun 2014 22:14:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XLAHfeVhQeEV; Thu, 26 Jun 2014 22:14:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DDACCA777B; Thu, 26 Jun 2014 22:13:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 436E0A775F for ; Thu, 26 Jun 2014 22:13:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sZgHWpiTzsNq for ; Thu, 26 Jun 2014 22:13:37 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gw1-out.broadcom.com (mail-gw1-out.broadcom.com [216.31.210.62]) by theia.denx.de (Postfix) with ESMTP id 3CCA2A7759 for ; Thu, 26 Jun 2014 22:13:29 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.01,555,1400050800"; d="scan'208";a="36719525" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw1-out.broadcom.com with ESMTP; 26 Jun 2014 13:35:13 -0700 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 26 Jun 2014 13:13:28 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.174.1; Thu, 26 Jun 2014 13:13:28 -0700 Received: from mail.broadcom.com (lbrmn-vmlnx03.ric.broadcom.com [10.136.4.105]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 9CAC69F9F7; Thu, 26 Jun 2014 13:13:27 -0700 (PDT) From: Steve Rae To: Rob Herring , Sebastian Siewior Date: Thu, 26 Jun 2014 13:13:24 -0700 Message-ID: <1403813604-31685-5-git-send-email-srae@broadcom.com> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1403813604-31685-1-git-send-email-srae@broadcom.com> References: <1403813604-31685-1-git-send-email-srae@broadcom.com> MIME-Version: 1.0 Cc: Marek Vasut , Steve Rae , Pantelis Antoniou , u-boot@lists.denx.de, Tom Rini Subject: [U-Boot] [PATCH v3 4/4] usb/gadget: fastboot: minor cleanup X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srae@broadcom.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.128.171 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 - update static function - additional debugging statements Signed-off-by: Steve Rae --- Changes in v3: None Changes in v2: - new in v2 drivers/usb/gadget/f_fastboot.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 89c2d3e..3e6e47f 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -293,7 +293,7 @@ static int fastboot_add(struct usb_configuration *c) } DECLARE_GADGET_BIND_CALLBACK(usb_dnl_fastboot, fastboot_add); -int fastboot_tx_write(const char *buffer, unsigned int buffer_size) +static int fastboot_tx_write(const char *buffer, unsigned int buffer_size) { struct usb_request *in_req = fastboot_func->in_req; int ret; @@ -338,6 +338,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) strcpy(response, "OKAY"); strsep(&cmd, ":"); if (!cmd) { + printf("%s: missing var\n", __func__); fastboot_tx_write_str("FAILmissing var"); return; } @@ -358,6 +359,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) else strcpy(response, "FAILValue not set"); } else { + printf("%s: unknown variable: %s\n", __func__, cmd); strcpy(response, "FAILVariable not implemented"); } fastboot_tx_write_str(response); @@ -531,10 +533,12 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) } } - if (!func_cb) + if (!func_cb) { + printf("%s: unknown command: %s\n", __func__, cmdbuf); fastboot_tx_write_str("FAILunknown command"); - else + } else { func_cb(ep, req); + } if (req->status == 0) { *cmdbuf = '\0';