linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Peter Korsgaard" <jacmet@sunsite.dk>
Cc: linux-usb-devel@lists.sourceforge.net, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH 6/6] [C67x00] Merge c67x00-hub.c into c67x00-hcd.c
Date: Wed, 13 Jun 2007 06:54:13 -0600	[thread overview]
Message-ID: <fa686aa40706130554l36fefa13w4e2b1957a9fc5288@mail.gmail.com> (raw)
In-Reply-To: <87645sieew.fsf@p4.be.48ers.dk>

On 6/12/07, Peter Korsgaard <jacmet@sunsite.dk> wrote:
> >>>>> "Grant" == Grant Likely <grant.likely@secretlab.ca> writes:
>
> Hi,
>
>  Grant> Rather than c67x00-hub.c being compiled seperately, the
>  Grant> original code had c67x00-hub.c *included* by c67x00-hcd.c.
>  Grant> This is a very bad idea.  Simplest solution is to merge the
>  Grant> two files into one and be done with it.
>
> Yeah, it isn't exactly pretty, but it's what the other hcd drivers do,
> E.G.:
>
> % grep -rs "include.*hub.c" *c
> ehci-hcd.c:#include "ehci-hub.c"
> ohci-hcd.c:#include "ohci-hub.c"
> uhci-hcd.c:#include "uhci-hub.c"
>
> I don't quite know why they do it like that though ..

True, but that doesn't mean that it's a good idea to follow the lead.
There are lots of other examples of ugly code in the kernel that is
tolerated just because nobody has cleaned it up yet, but is still
unacceptable for new code.

We know it's an ugly thing to do, and the fix is simple and easy.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

  reply	other threads:[~2007-06-13 12:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 23:02 [PATCH 0/6] Cleanups to c67x00 USB host controller driver Grant Likely
2007-06-12 23:02 ` [PATCH 1/6] [C67x00] Add test of active flag when checking TDs Grant Likely
2007-06-12 23:02   ` [PATCH 2/6] [C67x00] Fix calculation of frame bandwidth Grant Likely
2007-06-12 23:02     ` [PATCH 3/6] [C67x00] Remove unnecessary references to pt_regs Grant Likely
2007-06-12 23:02       ` [PATCH 4/6] [C67x00] Added error handling paths to lowlevel interface code Grant Likely
2007-06-12 23:02         ` [PATCH 5/6] [C67x00] Change 'struct c67x00_drv' to 'struct c67x00_device' Grant Likely
2007-06-12 23:02           ` [PATCH 6/6] [C67x00] Merge c67x00-hub.c into c67x00-hcd.c Grant Likely
2007-06-13  5:58             ` Peter Korsgaard
2007-06-13 12:54               ` Grant Likely [this message]
2007-06-13 13:59                 ` [linux-usb-devel] " phil culler
2007-06-13 14:33                   ` Grant Likely
2007-06-13 14:37                 ` Alan Stern
2007-06-13 15:09                   ` Grant Likely
2007-06-13 15:43                     ` Alan Stern
2007-06-13 16:19                       ` Grant Likely
2007-06-13 16:38                         ` Alan Stern
2007-07-30 16:51 ` I2C interrupts on 8541 Charles Krinke
2007-07-31 14:14   ` Kumar Gala

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=fa686aa40706130554l36fefa13w4e2b1957a9fc5288@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=jacmet@sunsite.dk \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=linuxppc-embedded@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).