Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1404376pxb; Tue, 17 Aug 2021 10:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycWqhGoGkGYCQYOBCmi0foWLL1OMUZtBIGQZjU8tfCpU1wtG5GGJBIMIimVpD/q/eK7Yx/ X-Received: by 2002:a5d:9688:: with SMTP id m8mr3856873ion.78.1629222587466; Tue, 17 Aug 2021 10:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629222587; cv=none; d=google.com; s=arc-20160816; b=D/kmu1MN3WGTjlhVTHJw3mzYO9fyDeMX/yCCG/XAYnIo63l+LLNE4GR/Q+Tt7pruN8 067AAoSaLdVUXDFcUcoR9geb3G2RBgD1GiJHYKxr9JdLLfMEPMxzcqEtL0iEO5PUT7lt 22qFzLb1+nyCJjq3jLQOycZqPXEVU1x/dbfqpll9FtUrOFGVAizzKo0J+OHCK+I9Dg2O PncH7HjZBs49o22D9se82ku7Bzg7aRKVwgx119NUDTCBo981CFyCzc4WyDDCHhbn520Q vSGk7tWHYbAhUIjK55nAg0aERzLvfNu2FcZXMw4Fz86ybo4wVPEuWWkS+k9qHaee7Wo7 PIZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OajzvIDboNIwQJBzK0ILl7SgIgpRWrEplTTHpQsUVOA=; b=DfqFrtZopzjXxm18+geM60KAvoTxOCkGdVL3X2xNflphD7dQGehv809fvfi2V/QSNC 9GKhlmtdfZB0TMAnKO/qmFyBP/z+XOLKP+w89WPXgyeTrj1lcZINU0U/ONpdYtsBrfs8 xM3B3if/719Qc4rh2ZqbOkFPqMLlSM9Jo1BwV7epxmS73GK04p02eZI4UENYZ+AZH/p7 gI/qR9blZueaGJ3rL3nWTtokskLhyvijbMH+pl+3haUdZaVfsqukXBrBu2dNBHnvGkgf pVwWXL21saY+PhMDwP8RRrgWrv/osJlEbdoCDdtCrvC8MSOMpgWkz/e75kRejQM/GqLW g2WQ== ARC-Authentication-Results: i=1; mx.google.com; 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 2si3170863iob.47.2021.08.17.10.49.36; Tue, 17 Aug 2021 10:49:47 -0700 (PDT) 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; 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 S232230AbhHQRrd (ORCPT + 99 others); Tue, 17 Aug 2021 13:47:33 -0400 Received: from gate.crashing.org ([63.228.1.57]:46930 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbhHQRr3 (ORCPT ); Tue, 17 Aug 2021 13:47:29 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 17HHiMVp024495; Tue, 17 Aug 2021 12:44:22 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 17HHiKkS024494; Tue, 17 Aug 2021 12:44:20 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 17 Aug 2021 12:44:20 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Jason Wang , benh@kernel.crashing.org, yukuai3@huawei.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] macintosh: no need to initilise statics to 0 Message-ID: <20210817174420.GG1583@gate.crashing.org> References: <20210817115104.30057-1-wangborong@cdjrlc.com> <2105ef52-b736-cc18-def9-02ac174d1922@csgroup.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2105ef52-b736-cc18-def9-02ac174d1922@csgroup.eu> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 01:59:33PM +0200, Christophe Leroy wrote: > > > Le 17/08/2021 ? 13:51, Jason Wang a ?crit?: > >Global static variables dont need to be initialised to 0. Because > >the compiler will initilise them. > > It is not the compiler, it is the Kernel. It is done here: > > https://elixir.bootlin.com/linux/v5.14-rc6/source/arch/powerpc/kernel/early_32.c This implements part of the C language: everything with static storage duration (which includes all global objects, not just those marked "static") is initialized. > Among those 44 changes, only 2 are related to the commit's description. Yeah. Don't do that please :-/ Segher