mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@mips.com>
To: Matt Redfearn <matt.redfearn@mips.com>
Cc: Guenter Roeck <linux@roeck-us.net>, <linux-mips@linux-mips.org>,
	"# 4 . 11 +" <stable@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-watchdog@vger.kernel.org>,
	Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH] watchdog: indydog: Add dependency on SGI_HAS_INDYDOG
Date: Tue, 14 Nov 2017 11:17:38 +0000	[thread overview]
Message-ID: <20171114111737.GB5823@jhogan-linux.mipstec.com> (raw)
In-Reply-To: <1510656774-31464-1-git-send-email-matt.redfearn@mips.com>

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

On Tue, Nov 14, 2017 at 10:52:54AM +0000, Matt Redfearn wrote:
> Commit da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> enabled building the Indy watchdog driver when COMPILE_TEST is enabled.
> However, the driver makes reference to symbols that are only defined for
> certain platforms are selected in the config. These platforms select
> SGI_HAS_INDYDOG. Without this, link time errors result, for example
> when building a MIPS allyesconfig.
> 
> drivers/watchdog/indydog.o: In function `indydog_write':
> indydog.c:(.text+0x18): undefined reference to `sgimc'
> indydog.c:(.text+0x1c): undefined reference to `sgimc'
> drivers/watchdog/indydog.o: In function `indydog_start':
> indydog.c:(.text+0x54): undefined reference to `sgimc'
> indydog.c:(.text+0x58): undefined reference to `sgimc'
> drivers/watchdog/indydog.o: In function `indydog_stop':
> indydog.c:(.text+0xa4): undefined reference to `sgimc'
> drivers/watchdog/indydog.o:indydog.c:(.text+0xa8): more undefined
> references to `sgimc' follow
> make: *** [Makefile:1005: vmlinux] Error 1
> 
> Fix this by ensuring that CONFIG_INDIDOG can only be selected when the
> necessary dependent platform symbols are built in.
> 
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
> Cc: <stable@vger.kernel.org> # 4.11 +
> ---
> 
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index ca200d1f310a..d96e2e7544fc 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1451,7 +1451,7 @@ config RC32434_WDT
>  
>  config INDYDOG
>  	tristate "Indy/I2 Hardware Watchdog"
> -	depends on SGI_HAS_INDYDOG || (MIPS && COMPILE_TEST)
> +	depends on SGI_HAS_INDYDOG || (MIPS && COMPILE_TEST && SGI_HAS_INDYDOG)

(MIPS && COMPILE_TEST && SGI_HAS_INDYDOG) implies SGI_HAS_INDYDOG

So I think you can just do:
-	depends on SGI_HAS_INDYDOG || (MIPS && COMPILE_TEST)
+	depends on SGI_HAS_INDYDOG

I.e. COMPILE_TEST isn't of any value in this case.

Cheers
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-11-14 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 10:52 Matt Redfearn
2017-11-14 11:17 ` James Hogan [this message]
2017-11-14 13:48   ` Ralf Baechle
2017-11-14 16:19     ` Guenter Roeck

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=20171114111737.GB5823@jhogan-linux.mipstec.com \
    --to=james.hogan@mips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=matt.redfearn@mips.com \
    --cc=stable@vger.kernel.org \
    --cc=wim@iguana.be \
    /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®