Received: by 10.223.164.202 with SMTP id h10csp661001wrb; Tue, 14 Nov 2017 07:39:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMYkVjsYfGQ1GqSUR0kqf7s1B1G2hYxfpjlZn3zX3/62JvzsYJYm1SBePaoGR09G/VPCehfj X-Received: by 10.84.194.1 with SMTP id g1mr12703633pld.394.1510673990853; Tue, 14 Nov 2017 07:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510673990; cv=none; d=google.com; s=arc-20160816; b=vvWnquoqIG9qJ2sSduoLsj5he3ImSv3i+SFtsnL3V/LoemiXRxnMXZn83yH/0KCZ1p adXoHK1SDi6PLqez0l38HOJrlfLaOWKHfSpewZf5ruMUiCM2x+FrznN8RqRNTfzbye2F WH+1fRm2Hqq5gN14305IXlCrR9aUnUIi37m88GeU+XSR1m0Cms4QTua5jMFjTDyDqYiX dmOK1pWHcojXARCTAVgmW+LJFwn0P600ppWOSOBFzEqYT4Jb8F14vZExpggU+HQGrcgK XNOngZ6OxNBrcpCXuId51S8YbJln7cOAB8S71zJ+G7bg8mYjwTlmJV2rzF9cgXEebYEo cKeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5r1rHXJtGJ7tQw/ZK+a4oGRN1/1i8MjcG/B86lSVuXA=; b=iDfFZBtm/EBziOi3ohzlDT61YpgP2ZA6nrdxclOeDftx7hq0i9xkuB8xwnGHwVFCSW 1Z4DJj2q2lWQyA0eg2n+NUNAUnRzTYVSAFNVbVyGR12lrsXQzNRReN0hJIjVD+OAAbnQ bP6KNQeChqAdxn/49vxXt45DiEbWJEbn1Ji9Xepnl5Xs5yYZ1EGQPP9m6DyNoSqM8Ma/ PhFMMVy5NGvJQgMUmMsvqNf0YRXhgvRtINCavS0MGNCk2ep8KioEWYITPikbIKU82awy p3/cCEvawDpV/zJdpP4GiMiY9+zjN9zanw4gsPBaYCTnlFHJSrl23OfHqLWXJRbza/fk OHOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si16190244plk.227.2017.11.14.07.39.38; Tue, 14 Nov 2017 07:39:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754443AbdKNNsg (ORCPT + 88 others); Tue, 14 Nov 2017 08:48:36 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:43230 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754094AbdKNNsU (ORCPT ); Tue, 14 Nov 2017 08:48:20 -0500 Received: from localhost.localdomain ([127.0.0.1]:51298 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S23992314AbdKNNsPMiFJ0 (ORCPT + 2 others); Tue, 14 Nov 2017 14:48:15 +0100 Received: from h7.dl5rb.org.uk (localhost [127.0.0.1]) by h7.dl5rb.org.uk (8.15.2/8.14.8) with ESMTP id vAEDmC8o013829; Tue, 14 Nov 2017 14:48:12 +0100 Received: (from ralf@localhost) by h7.dl5rb.org.uk (8.15.2/8.15.2/Submit) id vAEDmCVM013828; Tue, 14 Nov 2017 14:48:12 +0100 Date: Tue, 14 Nov 2017 14:48:12 +0100 From: Ralf Baechle To: James Hogan Cc: Matt Redfearn , Guenter Roeck , linux-mips@linux-mips.org, "# 4 . 11 +" , linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Wim Van Sebroeck Subject: Re: [PATCH] watchdog: indydog: Add dependency on SGI_HAS_INDYDOG Message-ID: <20171114134812.GF13046@linux-mips.org> References: <1510656774-31464-1-git-send-email-matt.redfearn@mips.com> <20171114111737.GB5823@jhogan-linux.mipstec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114111737.GB5823@jhogan-linux.mipstec.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 14, 2017 at 11:17:38AM +0000, James Hogan wrote: > 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 > > Cc: # 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. I agree, due to the references to sgimc this driver will only compile for the platforms which set SGI_HAS_INDYDOG; MIPS as the dependency is too generic. Updated patch for the watchdog maintainers' ease below. Ralf Signed-off-by: Ralf Baechle Reported-by: Matt Redfearn Suggested-by: James Hogan drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index c722cbfdc7e6..3ece1335ba84 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 help Hardware driver for the Indy's/I2's watchdog. This is a watchdog timer that will reboot the machine after a 60 second From 1584040154096073509@xxx Tue Nov 14 11:20:11 +0000 2017 X-GM-THRID: 1584039247125284538 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread