mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 is defined
Date: Fri, 11 Mar 2011 13:50:24 +0000	[thread overview]
Message-ID: <20110311135024.400582fd@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1299848292-17101-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>

Most of these are not needed

> +#if CONFIG_SERIAL_8250_HUB6
>  static unsigned int hub6_serial_in(struct uart_port *p, int offset)
>  {
>  	offset = map_8250_in_reg(p, offset) << p->regshift;
> @@ -400,6 +401,7 @@ static void hub6_serial_out(struct uart_port *p, int offset, int value)
>  	outb(p->hub6 - 1 + offset, p->iobase);
>  	outb(value, p->iobase + 1);
>  }
> +#endif

This one is needed 
>  
>  static unsigned int mem_serial_in(struct uart_port *p, int offset)
>  {
> @@ -508,10 +510,12 @@ static void set_io_from_upio(struct uart_port *p)
>  	struct uart_8250_port *up =
>  		container_of(p, struct uart_8250_port, port);
>  	switch (p->iotype) {
> +#if CONFIG_SERIAL_8250_HUB6
>  	case UPIO_HUB6:
>  		p->serial_in = hub6_serial_in;
>  		p->serial_out = hub6_serial_out;
>  		break;
> +#endif

And this - but not the rest.

It is also such a miniscule amount of code it seems like it does not
justify the complexity of being configurable this way.


  parent reply	other threads:[~2011-03-11 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 12:58 Nobuhiro Iwamatsu
2011-03-11 12:58 ` [PATCH 2/3] tty: serial: Fix build on architecture that does not have ioport Nobuhiro Iwamatsu
2011-03-11 13:54   ` Alan Cox
2011-03-11 14:16     ` Arnd Bergmann
2011-03-11 12:58 ` [PATCH 3/3] tty: serial: Check UPF_FOURPORT, when CONFIG_SERIAL_8250_FOURPORT is defined Nobuhiro Iwamatsu
2011-03-11 13:55   ` Alan Cox
2011-03-11 13:50 ` Alan Cox [this message]
2011-03-11 13:56   ` [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 " Arnd Bergmann
2011-03-11 14:30     ` Alan Cox
2011-03-11 14:54       ` Arnd Bergmann

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=20110311135024.400582fd@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nobuhiro.iwamatsu.yj@renesas.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

all inboxes | Powered by JetHome®