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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D7D6C7618A for ; Mon, 20 Mar 2023 14:24:37 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peGQL-0004Gu-LY; Mon, 20 Mar 2023 10:23:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peGQK-0004G4-1h for qemu-devel@nongnu.org; Mon, 20 Mar 2023 10:23:44 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peGQI-0000Cb-9p for qemu-devel@nongnu.org; Mon, 20 Mar 2023 10:23:43 -0400 Received: by mail-wm1-x333.google.com with SMTP id u11-20020a05600c19cb00b003edcc414997so2766245wmq.3 for ; Mon, 20 Mar 2023 07:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679322221; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wDFPVnK26gTPvQ7OQnmaMHAo8uxTCxn0wjupc66n0+g=; b=iupUAOLOVvIo5M2FeGbu2pABScMqZ1WtjEgwgzAmbLp8n1wBphdMsJVh/nBr2ctxaq niYu4FF+KJTk+QSzJev4lNK//Wy/Yhv2xD0lLuBLZslRJqBIMiTdxNYJxSEs1KxrsHJR HXKgVtUZ7tM96cRGbKte3pAoXlUVUeGIklTPLppMnqAsDyzgnvesrxlGGjLmAxHwP2Z8 oOTJXlxwRgHOZRq+NQU2XjlOeW0QinUZw0n+V/hg5OrnJccCE8/JVuMQzPi0BC01UBxH +gRQI2RsNKHxJHJ8loygXyNNQB1Q6krKKZ6IgKVxC7ORtE9QtzBgoDcVrwecwQ2JsPM+ E8LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679322221; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wDFPVnK26gTPvQ7OQnmaMHAo8uxTCxn0wjupc66n0+g=; b=6ilKN12elwqWrb/N5OoGpjZ8INvBYAONc3x64X5BHZNzQuk2J3rGY0mULIHEbHybjG Ak1rVycOK1oEDE2zwX3lGm4EpKUHySjf6DaThoBQD6E5XvWNY5vCBSzZj54Z5B80E46j SLlE/hxeLscPR53LuSncw9jJeUqMc5bLMZjkMOSD4txuAtNuINwr0QVfaECosrLUxmkZ RUIo0+5C50yl0oQ99LlwZCe0gZMY3CDDGcoLgZD9CmvAvXkkILAq7vDorSeeCl+Y+YEk aRCw8cQy3DJdUnWb9qbhysntzw9QPTuR7Z+W/NAmIJfhVbZvFh18YSLzqo7eiutcRX09 MjNg== X-Gm-Message-State: AO0yUKV70GAST9rOmGujHirQzDwyOGKu1ct8iwO5LASY3WvWN9/Dxg5m bI6nzhJRaNZ2AwkQooPfVTtbgw== X-Google-Smtp-Source: AK7set/aRqtnWw0m8lIYSvCcTJKy8bYXEjcr1/Crqm07tlo2b+OzQuFfio36H5QqfOmps9fL+g8D5g== X-Received: by 2002:a05:600c:3b24:b0:3ed:296b:4899 with SMTP id m36-20020a05600c3b2400b003ed296b4899mr26844308wms.15.1679322220744; Mon, 20 Mar 2023 07:23:40 -0700 (PDT) Received: from [192.168.30.216] ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p9-20020a1c5449000000b003dc1d668866sm16596895wmi.10.2023.03.20.07.23.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Mar 2023 07:23:40 -0700 (PDT) Message-ID: Date: Mon, 20 Mar 2023 15:23:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH-for-8.1 4/5] bulk: Do not declare function prototypes using extern keyword Content-Language: en-US To: =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Kevin Wolf , Hanna Reitz , Warner Losh , Kyle Evans , Stefano Stabellini , Anthony Perard , Paul Durrant , =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Peter Maydell , Andrew Jeffery , Joel Stanley , Tyrone Ting , Hao Wu , Paolo Bonzini , Eduardo Habkost , Richard Henderson , Stefan Weil , Riku Voipio , Marcelo Tosatti , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , xen-devel@lists.xenproject.org, kvm@vger.kernel.org References: <20230320134219.22489-1-philmd@linaro.org> <20230320134219.22489-5-philmd@linaro.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 20/3/23 14:48, Daniel P. Berrangé wrote: > On Mon, Mar 20, 2023 at 02:42:18PM +0100, Philippe Mathieu-Daudé wrote: >> By default, C function prototypes declared in headers are visible, >> so there is no need to declare them as 'extern' functions. >> Remove this redundancy in a single bulk commit; do not modify: >> >> - meson.build (used to check function availability at runtime) >> - pc-bios >> - libdecnumber >> - *.c >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> block/dmg.h | 8 +++---- >> bsd-user/bsd-file.h | 6 ++--- >> crypto/hmacpriv.h | 13 +++++------ >> hw/xen/xen_pt.h | 8 +++---- >> include/crypto/secret_common.h | 14 +++++------- >> include/exec/page-vary.h | 4 ++-- >> include/hw/misc/aspeed_scu.h | 2 +- >> include/hw/nvram/npcm7xx_otp.h | 4 ++-- >> include/hw/qdev-core.h | 4 ++-- >> include/qemu/crc-ccitt.h | 4 ++-- >> include/qemu/osdep.h | 2 +- >> include/qemu/rcu.h | 14 ++++++------ >> include/qemu/sys_membarrier.h | 4 ++-- >> include/qemu/uri.h | 6 ++--- >> include/sysemu/accel-blocker.h | 14 ++++++------ >> include/sysemu/os-win32.h | 4 ++-- >> include/user/safe-syscall.h | 4 ++-- >> target/i386/sev.h | 6 ++--- >> target/mips/cpu.h | 4 ++-- >> tcg/tcg-internal.h | 4 ++-- >> tests/tcg/minilib/minilib.h | 2 +- >> include/exec/memory_ldst.h.inc | 42 +++++++++++++++++----------------- >> roms/seabios | 2 +- > > Accidental submodule commit., > >> 23 files changed, 84 insertions(+), 91 deletions(-) >> >> diff --git a/block/dmg.h b/block/dmg.h >> index e488601b62..ed209b5dec 100644 >> --- a/block/dmg.h >> +++ b/block/dmg.h >> @@ -51,10 +51,10 @@ typedef struct BDRVDMGState { >> z_stream zstream; >> } BDRVDMGState; >> >> -extern int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in, >> - char *next_out, unsigned int avail_out); >> +int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in, >> + char *next_out, unsigned int avail_out); >> >> -extern int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in, >> - char *next_out, unsigned int avail_out); >> +int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in, >> + char *next_out, unsigned int avail_out); > > These are variable declarations, so with this change you'll get multiple > copies of the variable if this header is included from multiple source > files. IOW, the 'extern' usage is correct. Doh indeed, good catch, thanks. >> diff --git a/roms/seabios b/roms/seabios >> index ea1b7a0733..3208b098f5 160000 >> --- a/roms/seabios >> +++ b/roms/seabios >> @@ -1 +1 @@ >> -Subproject commit ea1b7a0733906b8425d948ae94fba63c32b1d425 >> +Subproject commit 3208b098f51a9ef96d0dfa71d5ec3a3eaec88f0a > > Nope ! Oops...