From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Yuan-Hsin Chen <yuanlmm@gmail.com>
Cc: "Greg KH" <gregkh@linuxfoundation.org>,
"Yuan-Hsin Chen" <yhchen@faraday-tech.com>,
"Alan Stern" <stern@rowland.harvard.edu>,
"Felipe Balbi" <balbi@ti.com>,
florian@openwrt.org, "USB list" <linux-usb@vger.kernel.org>,
linux-kernel@vger.kernel.org, ratbert <ratbert.chuang@gmail.com>,
"John Feng-Hsin Chiang(江峰興)" <john453@faraday-tech.com>
Subject: Re: [PATCH] usb: host: Faraday fotg210-hcd driver
Date: Mon, 17 Jun 2013 20:07:09 -0700 [thread overview]
Message-ID: <20130618030709.GJ20795@xanatos> (raw)
In-Reply-To: <CADB-GoK7Ntv0yM8hWLE7nrdiLq-fZymyHihGuu-78j4qiDCszA@mail.gmail.com>
On Tue, Jun 18, 2013 at 10:42:09AM +0800, Yuan-Hsin Chen wrote:
> Hi,
>
> On Tue, Jun 18, 2013 at 4:39 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Wed, Jun 05, 2013 at 05:15:43PM +0000, Yuan-Hsin Chen wrote:
> >> FOTG210 is an OTG controller which can be configured as an
> >> USB2.0 host. FOTG210 host is an ehci-like controller with
> >> some differences. First, register layout of FOTG210 is
> >> incompatible with EHCI. Furthermore, FOTG210 is lack of
> >> siTDs which means iTDs are used for both HS and FS ISO
> >> transfer.
> >>
> >> Signed-off-by: Yuan-Hsin Chen <yhchen@faraday-tech.com>
> >> ---
> >> drivers/usb/Makefile | 1 +
> >> drivers/usb/host/Kconfig | 12 +
> >> drivers/usb/host/Makefile | 1 +
> >> drivers/usb/host/fotg210-hcd.c | 5967 ++++++++++++++++++++++++++++++++++++++++
> >> drivers/usb/host/fotg210.h | 746 +++++
> >> 5 files changed, 6727 insertions(+), 0 deletions(-)
> >> create mode 100644 drivers/usb/host/fotg210-hcd.c
> >> create mode 100644 drivers/usb/host/fotg210.h
> >
> > You obviously didn't even run this through checkpatch.pl, did you?
> >
> > $ ./scripts/checkpatch.pl --terse ../usb.mbox | tail -n 1
> > total: 138 errors, 618 warnings, 6742 lines checked
> >
> > Please fix all of these if you wish us to at least start reviewing the
> > patch. Your internal Q/A should have caught this first, please be more
> > careful in the future.
> >
>
> Actually I did run checkpatch.pl and found that almost all errors and
> warnings are from ehci core (ehci-hcd.c, ehci-hub.c and so on) where
> my driver borrowed most of code.
>
> $ ./scripts/checkpatch.pl --terse -f drivers/usb/host/ehci-hub.c | tail -n 1
> total: 18 errors, 69 warnings, 1138 lines checked
>
> $ ./scripts/checkpatch.pl --terse -f drivers/usb/host/ehci-hcd.c | tail -n 1
> total: 17 errors, 78 warnings, 1403 lines checked
>
> So you're saying that I should fix them, is that right?
In that case, no, you should be figuring out how to refactor and reuse
the EHCI code instead of copying it straight into your driver.
Sarah Sharp
next prev parent reply other threads:[~2013-06-18 3:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1370452543-19014-1-git-send-email-yhchen@faraday-tech.com>
2013-06-11 8:28 ` [PATCH] usb: host: Faraday fotg210-hcd driver Yuan-Hsin Chen
2013-06-17 20:39 ` Greg KH
2013-06-18 2:42 ` Yuan-Hsin Chen
2013-06-18 3:07 ` Sarah Sharp [this message]
2013-06-18 5:54 ` Yuan-Hsin Chen
2013-06-18 14:43 ` Alan Stern
2013-06-30 21:16 ` Sarah Sharp
2013-06-18 14:57 ` Greg KH
[not found] ` <1371671584-8181-1-git-send-email-yhchen@faraday-tech.com>
2013-07-24 23:10 ` [PATCH v2] " Greg KH
2013-07-25 15:53 ` Yuan-Hsin Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130618030709.GJ20795@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=balbi@ti.com \
--cc=florian@openwrt.org \
--cc=gregkh@linuxfoundation.org \
--cc=john453@faraday-tech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ratbert.chuang@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=yhchen@faraday-tech.com \
--cc=yuanlmm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox