linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Rob Herring <robh@kernel.org>
Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	kbuild test robot <lkp@intel.com>
Subject: [PATCH] serdev: fix builds with CONFIG_SERIAL_DEV_BUS=m
Date: Wed, 18 Dec 2019 09:38:42 +0100	[thread overview]
Message-ID: <20191218083842.14882-1-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <201912181000.82Z7czbN%lkp@intel.com>

Commit 54edb425346a ("serdev: simplify Makefile") broke builds with
serdev configured as module. I don't understand it completely yet, but
it seems that

	obj-$(CONFIG_SERIAL_DEV_BUS) += serdev/

in drivers/tty/Makefile with CONFIG_SERIAL_DEV_BUS=m doesn't result in
code that is added using obj-y in drivers/tty/serdev/Makefile being
compiled. So instead of dropping $(CONFIG_SERIAL_DEV_BUS) in serdev's
Makefile, drop it in drivers/tty/Makefile.

Fixes: 54edb425346a ("serdev: simplify Makefile")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

as Greg already added the offending patch to tty-next I assume it is
frozen and cannot be dropped any more, so here is an incremental fix.

Best regards
Uwe

 drivers/tty/Makefile        | 2 +-
 drivers/tty/serdev/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile
index 020b1cd9294f..6b2a21d4e0bb 100644
--- a/drivers/tty/Makefile
+++ b/drivers/tty/Makefile
@@ -16,7 +16,7 @@ obj-$(CONFIG_R3964)		+= n_r3964.o
 obj-y				+= vt/
 obj-$(CONFIG_HVC_DRIVER)	+= hvc/
 obj-y				+= serial/
-obj-$(CONFIG_SERIAL_DEV_BUS)	+= serdev/
+obj-y				+= serdev/
 
 # tty drivers
 obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
diff --git a/drivers/tty/serdev/Makefile b/drivers/tty/serdev/Makefile
index f71bb931735b..078417e5b068 100644
--- a/drivers/tty/serdev/Makefile
+++ b/drivers/tty/serdev/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 serdev-objs := core.o
 
-obj-y += serdev.o
+obj-$(CONFIG_SERIAL_DEV_BUS) += serdev.o
 
 obj-$(CONFIG_SERIAL_DEV_CTRL_TTYPORT) += serdev-ttyport.o
-- 
2.24.0


       reply	other threads:[~2019-12-18  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201912181000.82Z7czbN%lkp@intel.com>
2019-12-18  8:38 ` Uwe Kleine-König [this message]
2019-12-18  9:06   ` [PATCH] serdev: fix builds with CONFIG_SERIAL_DEV_BUS=m Johan Hovold
2019-12-18  9:29     ` Uwe Kleine-König
2019-12-18  9:38       ` Johan Hovold
2019-12-18 10:39         ` Uwe Kleine-König
2019-12-18 12:51           ` Johan Hovold
2019-12-18 17:23   ` kbuild obj-m directory descend (was: Re: [PATCH] serdev: fix builds with CONFIG_SERIAL_DEV_BUS=m) Johan Hovold
2019-12-19  2:00     ` Masahiro Yamada
2019-12-19  8:18       ` Johan Hovold
2019-12-19  8:55         ` Masahiro Yamada
2019-12-19  9:49           ` Johan Hovold

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=20191218083842.14882-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=robh@kernel.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).