LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Peter Alfredsen <loki_val@gentoo.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Lee Howard <lee.howard@mainpine.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Is the PCI serial driver code GPL v2 or v3
Date: Thu, 6 Nov 2008 19:12:50 +0000	[thread overview]
Message-ID: <20081106191250.GA28514@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200811061952.37490.loki_val@gentoo.org>

On Thu, Nov 06, 2008 at 08:52:31PM +0200, Peter Alfredsen wrote:
> It seems like a typo to me to.. That wording has been constant since the 
> file drivers/serial/serial_8250_pci.c was created based on work in 
> drivers/char/serial.c:
> http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=33c0d1b0c3ebb61243d9b19ce70d9063acff2aac
> serial_8250.c has the "or later" clause there.
> 
> But I suppose the best way is to ask the originator of that file. 
> Russell, what say you?
> Did you mean to license that file under GPL-2 or GPL-2+?

It was based upon the original serial.c by Ted T'so, but with some
reworking to add a separate quirks table, and quite a number of cleanups.

My personal position is that code I author is GPLv2, and not GPLv2 or
later.  So it's a question whether you consider that I'm the author
of the code in that file, or whether you think it's Ted's with my
contributions were under Ted's original terms.


BTW, now that you bring this to my attention, I see this hack in there:

struct serial_private *
pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board)
{
        if (dev->vendor == PCI_VENDOR_ID_OXSEMI ||
            dev->vendor == PCI_VENDOR_ID_MAINPINE)
                pci_oxsemi_tornado_init(dev, board);

        nr_ports = board->num_ports;

It's completely unnecessary with the quirk system, which follows
these lines:

        /*
         * Run the new-style initialization function.
         * The initialization function returns:
         *  <0  - error
         *   0  - use board->num_ports
         *  >0  - number of ports
         */
        if (quirk->init) {
                rc = quirk->init(dev);
                if (rc < 0) {
                        priv = ERR_PTR(rc);
                        goto err_out;
                }
                if (rc)
                        nr_ports = rc;
        }

So, why they couldn't add a quirk where the init function returns the
number of ports, instead of modifying some random board structure and
possibly upsetting future allocations is beyond me.

We now have the situation, again, where some random entry in the
pci_boards array is being modified which could trip up a future
board registration.

This is plainly idiotic and utterly buggy.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2008-11-06 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 17:43 Is the PCI serial driver code GPL v2 or v3 n0ano
2008-11-06 18:52 ` Peter Alfredsen
2008-11-06 19:12   ` Russell King [this message]
2008-11-06 19:20     ` Theodore Tso
2008-11-06 19:39     ` Lee Howard
2008-11-06 20:15       ` Russell King
2008-11-06 20:33         ` Russell King
2008-11-07  6:06         ` Lee Howard
2008-11-07 16:08         ` Alan Cox
2008-11-11 23:05           ` Russell King
2008-11-09 19:34     ` Pavel Machek
2008-11-16 15:18       ` Theodore Tso

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=20081106191250.GA28514@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=lee.howard@mainpine.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loki_val@gentoo.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).