From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E171C433E0 for ; Fri, 26 Feb 2021 13:00:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B95FA64EE2 for ; Fri, 26 Feb 2021 13:00:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B95FA64EE2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 359EB6B0005; Fri, 26 Feb 2021 08:00:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E31D6B0006; Fri, 26 Feb 2021 08:00:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AC8D6B006C; Fri, 26 Feb 2021 08:00:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id 00DD16B0005 for ; Fri, 26 Feb 2021 08:00:48 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A30F918059554 for ; Fri, 26 Feb 2021 13:00:48 +0000 (UTC) X-FDA: 77860428576.24.0461424 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id 6DA0933092 for ; Fri, 26 Feb 2021 13:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=E1qg03c0wEH1kCwm5wPTWr/kyq0GtF85jeiLNtREXMs=; b=ApzP7RAGkaSc8CkybIYXx6AF20 JnUr9mAz2jfz9WLfYOVXb4tyypH5D6uljEkt8Lo8+PCPwhlXhRD8h/erwo3LYC0xHdDgaX81Z59om o0EGVOdUdGmZgKaHrAfXRRAC+qBw7Sga8xaZ4NvZw3pKtoNZks/RE0jgxJzoKmoi0EkF0EuoiXc3V geu9HSi18UBVgLUxXa6l2SxAVkJ/BWQT2YldfhI0c9afXCyfEPl02PiUwF1bxZaQoFGwEbYDXSZD7 mSRzPxnA+pQM1NbQb4BwGT8nmt+sIemSRVjEEofT2/kcBOndKF0PDT5DoRm2rpp8FZKn22jSC1j6w H24Yq20A==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lFcjN-00C1lT-Fa; Fri, 26 Feb 2021 13:00:32 +0000 Date: Fri, 26 Feb 2021 13:00:29 +0000 From: Matthew Wilcox To: Chris Down Cc: Andrew Morton , linux-mm@kvack.org, Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug Message-ID: <20210226130029.GC2723601@casper.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 6DA0933092 X-Stat-Signature: 7i319wcserdpunmjnymuatz1eqywf1e4 Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614344446-267043 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Feb 26, 2021 at 12:47:58PM +0000, Chris Down wrote: > > ./include/linux/printk.h:219:5: error: static declaration of 'printk' follows non-static declaration > > 219 | int printk(const char *s, ...) > > | ^~~~~~ > > ./arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: previous declaration of 'printk' was here > > 142 | extern int printk(const char *fmt, ...); \ > > | ^~~~~~ > > > > Make CONFIG_IA64_DEBUG_CMPXCHG dependent on CONFIG_PRINTK to avoid this. Why not just fix it? diff --git a/arch/ia64/include/uapi/asm/cmpxchg.h b/arch/ia64/include/uapi/asm/cmpxchg.h index 5d90307fd6e0..d955a8e3ebde 100644 --- a/arch/ia64/include/uapi/asm/cmpxchg.h +++ b/arch/ia64/include/uapi/asm/cmpxchg.h @@ -139,7 +139,7 @@ extern long ia64_cmpxchg_called_with_bad_pointer(void); do { \ if (_cmpxchg_bugcheck_count-- <= 0) { \ void *ip; \ - extern int printk(const char *fmt, ...); \ + int printk(const char *fmt, ...); \ ip = (void *) ia64_getreg(_IA64_REG_IP); \ printk("CMPXCHG_BUGCHECK: stuck at %p on word %p\n", ip, (v));\ break; \