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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 9CC28C433DB for ; Fri, 26 Feb 2021 13:50:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A1B9664EED for ; Fri, 26 Feb 2021 13:50:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1B9664EED 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 C4A316B0005; Fri, 26 Feb 2021 08:50:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BFB726B0006; Fri, 26 Feb 2021 08:50:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B11386B006C; Fri, 26 Feb 2021 08:50:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 9B1B46B0005 for ; Fri, 26 Feb 2021 08:50:56 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 53E58824556B for ; Fri, 26 Feb 2021 13:50:56 +0000 (UTC) X-FDA: 77860554912.27.8AB68D8 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id DDB7480192E6 for ; Fri, 26 Feb 2021 13:50:54 +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=Xb9xtwpTL4lk5rD+hInHkQNlk5EbdNVRWlBW9PFOfl0=; b=T0Z0vG6F9aHvwy4kj3atsTdhqV KFg6314YV9TaMGSUrji3QGOC0oKV0rHxoHD+545kEGbcaN+guF9qBd8kx0gVnJhCaFutVDZ+Lhnri Aqng3m0F3mVoPrGJ17KuEtFIY2KMkkEgP1SsK9iSG3r8gwopy4hJEnv+6U0V3LA77AXOHd5sCyZ/x FeAQPIZQdLveDh3tlFOTcC7B8JO3WcQ/60T/fMMDyYyTOLweF7nq1dsD2eN2cvNMj/ssreUON4Wlm beJ7MO3qUakhfLgQ5jB0ZfT7+AjsTMEZPOco4AREGntD5Z5dArEqKx0TwwgoilP9FyPK+Sa+wlDun E9lKYbPQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lFdVy-00C5aQ-7k; Fri, 26 Feb 2021 13:50:43 +0000 Date: Fri, 26 Feb 2021 13:50:42 +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: <20210226135042.GD2723601@casper.infradead.org> References: <20210226130029.GC2723601@casper.infradead.org> 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: DDB7480192E6 X-Stat-Signature: s7nroosoz6srm3su1uqppy64pjj91hoo Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf16; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614347454-385234 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 01:47:20PM +0000, Chris Down wrote: > Chris Down writes: > > I must confess I have no idea of the history of why it was `extern int` > > in the first place -- my fear was somehow we use cmpxchg.h from a > > different context. Do you have any idea? :-) > > Ok, found where it's introduced in the pre-git archives: "New file > asm-ia64/intrinsics.h." from David Mosberger , Dec > 9 2002. No indication why it's extern, but it's been there since the dawn of > ia64. It's just a quirk of C. 'extern' is only meaningful when applied to variables. In the context of functions, extern int printk(char *fmt); int printk(char *fmt); are completely equivalent. Unless (as you've seen) there's then a static definition following the extern declaration.