Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1193754pxb; Fri, 26 Feb 2021 05:06:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAqwy7RgO2LKkfE0G6B1ZvOmUiaEeLxvEZEEUHVylglODQlopPgxxJTj0YbAGBG15Wn7Ph X-Received: by 2002:aa7:c804:: with SMTP id a4mr3135106edt.251.1614344794934; Fri, 26 Feb 2021 05:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614344794; cv=none; d=google.com; s=arc-20160816; b=gNgMGGCigK1hZlbHLcVTyd4LAfk7BjbRLBoG2JuovagFLBR1WDLavFzNWPYGxC51RG Bzfy4zKBRr/Y6PHOOMNaQ2Ov3PJxOl29BTFC+X6ZHBDVLk36+mXNqmbMbGudye1sriju bqmM5gJcJwc71wyvoSpD8+lCfSICVgGxZAYTnxEGYFzYYCBCtVXfgpmH74goKRX/ORPI vw7gXnxuGWRcQSA5RyX1jugaqluDD72v8krqsKOG6rneuQG1iXVDCoDUd8Z3ApgB8O78 ytQlT1Y9jfnJ+C+8jyYWysk9OxErKbKqMR4qwXlscPZIsXz5IIcYx3O8rrXhoVJohfSg Ucag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=E1qg03c0wEH1kCwm5wPTWr/kyq0GtF85jeiLNtREXMs=; b=ZzzRgVZODd5jEF2CF97gsSsLiKUO0A/nT4RnFGdOfkoQZDsZ6e2FuuKph7ckZEGW7E lZzqhshwIwuyw7Qk+AIW7KCRBCbSwpci+el0lWgosA7GD1g8e0YZcPFDURcI3f0jIesn 42T0g13GEMHderQTrQu2NtmFGz/6X105BXGPG8C9WsxXn7Fth7PV8L9oRTB4yfi6Se9R dGhENUbmp/+DSixoAPaL468a6LQ5qXWDdmTMmQwQ7MRWxfl5VOZpSM9J0CkKvitK8hlS Van+pgwWpbCtS7RFFrb7wTH5xK1QxT64CAlVWnq4pOVKdrudJ9xnAsn81Y3gjHlbAFu/ x09w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ApzP7RAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg4si6269264ejc.313.2021.02.26.05.06.10; Fri, 26 Feb 2021 05:06:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ApzP7RAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbhBZNBo (ORCPT + 99 others); Fri, 26 Feb 2021 08:01:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbhBZNBa (ORCPT ); Fri, 26 Feb 2021 08:01:30 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96F32C06174A; Fri, 26 Feb 2021 05:00:50 -0800 (PST) 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; \