public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: Tobias Klauser <tklauser@distanz•ch>,
	Alexander Shiyan <shc_work@mail•ru>
Cc: Jim Davis <jim.epost@gmail•com>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	linux-next <linux-next@vger•kernel.org>,
	linux-kernel <linux-kernel@vger•kernel.org>,
	jslaby@suse•cz, linux-serial@vger•kernel.org
Subject: Re: [PATCH] tty: serial: serial_mctrl_gpio: Fix build error for !GPIOLIB
Date: Wed, 10 Sep 2014 06:57:16 -0700	[thread overview]
Message-ID: <20140910135716.GA23074@kroah.com> (raw)
In-Reply-To: <20140910080657.GC14260@distanz.ch>

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

On Wed, Sep 10, 2014 at 10:06:58AM +0200, Tobias Klauser wrote:
> If SERIAL_MCTRL_GPIO is selected but GPIOLIB is not, the noop functions
> from serial_mctrl_gpio.h are pulled in. However, serial_mctrl_gpio.c is
> still compiled, leading to function redefinition build errors. Since all
> drivers that include serial_mctrl_gpio.h also depend on
> SERIAL_MCTRL_GPIO, let it depend on GPIOLIB as well remove the noop
> functions alltogether.
> 
> Reported-by: Jim Davis <jim.epost@gmail•com>
> Signed-off-by: Tobias Klauser <tklauser@distanz•ch>
> ---
>  drivers/tty/serial/Kconfig             |  1 +
>  drivers/tty/serial/serial_mctrl_gpio.h | 35 ----------------------------------
>  2 files changed, 1 insertion(+), 35 deletions(-)

I fixed this yesterday with commit below from Alexander, which does
things a bit differently than you.  Any objections to it?

thanks,

greg k-h

[-- Attachment #2: 0004-serial-clps711x-Fix-COMPILE_TEST-build-for-target-wi.patch --]
[-- Type: text/x-diff, Size: 1529 bytes --]

>From efb089517d2f34a58aceb600ab58b0ca3db1fa07 Mon Sep 17 00:00:00 2001
From: Alexander Shiyan <shc_work@mail•ru>
Date: Tue, 9 Sep 2014 08:14:36 +0400
Subject: serial: clps711x: Fix COMPILE_TEST build for target without GPIOLIB
 support

The patch fixes the following build error of CLPS711X serial driver for
targets without GPIOLIB support:

>> drivers/tty/serial/serial_mctrl_gpio.c:44:6: error: redefinition of 'mctrl_gpio_set'
  void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl)
      ^
  In file included from drivers/tty/serial/serial_mctrl_gpio.c:23:0:
  drivers/tty/serial/serial_mctrl_gpio.h:80:6: note: previous definition of 'mctrl_gpio_set' was here
  void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl)
      ^

Reported-by: kbuild test robot <fengguang.wu@intel•com>
Signed-off-by: Alexander Shiyan <shc_work@mail•ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 8079f5225575..81f6ee7d4223 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -222,7 +222,7 @@ config SERIAL_CLPS711X
 	tristate "CLPS711X serial port support"
 	depends on ARCH_CLPS711X || COMPILE_TEST
 	select SERIAL_CORE
-	select SERIAL_MCTRL_GPIO
+	select SERIAL_MCTRL_GPIO if GPIOLIB
 	help
 	  This enables the driver for the on-chip UARTs of the Cirrus
 	  Logic EP711x/EP721x/EP731x processors.
-- 
2.1.0


  reply	other threads:[~2014-09-10 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 22:32 randconfig build error with next-20140909, in drivers/tty/serial/serial_mctrl_gpio.c Jim Davis
2014-09-10  8:05 ` Tobias Klauser
2014-09-10  8:06 ` [PATCH] tty: serial: serial_mctrl_gpio: Fix build error for !GPIOLIB Tobias Klauser
2014-09-10 13:57   ` Greg Kroah-Hartman [this message]
2014-09-10 14:16     ` Tobias Klauser
2014-09-10 14:36       ` Alexander Shiyan

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=20140910135716.GA23074@kroah.com \
    --to=gregkh@linuxfoundation$(echo .)org \
    --cc=jim.epost@gmail$(echo .)com \
    --cc=jslaby@suse$(echo .)cz \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=linux-serial@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=shc_work@mail$(echo .)ru \
    --cc=tklauser@distanz$(echo .)ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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