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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 9E016C433E0 for ; Tue, 16 Mar 2021 00:34:12 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21E0C64F51 for ; Tue, 16 Mar 2021 00:34:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21E0C64F51 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:Date:Mime-Version:References:In-reply-to: Subject:cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pdBUqNbgk62ek5bdoNEQ/3lPD/J+WoR/gpoThz+n3gI=; b=hD5FtrSscaAeWpi0faquli+3J nlbcXrpdvgBGGV25c7teuVKviIVezFmAmKD4hhNLyWju941WUObtedgpzK6Zz2BNFWMGK0vzd/d/1 LdHU124AvsxThMaQEIVpNlcncNLBWxfMGHReT3BruKL02LGipGduKDdJx5A0LVW0aHlaG8hhQPxTm 5uOg6gSLk6mVyxQeNathNIKku+fUF9kR+Qx6xp3X1zEcNsXFEXNj+pOfBshB1QWOZssOhP4zLbiAI e+cdwIHEiJhVbLECPUb8bpPqBfC1xC8Wyr7LHhyD6cvqUfwG+Pe2GEfhIBEsPI8whwvMOdRisf/3C /HGPfemZg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lLxbl-00H8bv-Ne; Tue, 16 Mar 2021 00:30:49 +0000 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lLxbf-00H8ar-Po for linux-arm-kernel@lists.infradead.org; Tue, 16 Mar 2021 00:30:46 +0000 Received: by mail-qk1-x732.google.com with SMTP id l132so33648658qke.7 for ; Mon, 15 Mar 2021 17:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vt-edu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:in-reply-to:references:mime-version:date :message-id; bh=u2hOxobQQ7N70NBKzVloCTb3n1+wpT22bqbV6rT/WDg=; b=m8FkuGtneQBpLgtKi+ofN462A9a6xiecDw2C0W8WRA9PrPEfAAFxnX5afC/p4Ux+oo XA5DIbCcRhJAnRbbboSztqFNq9XtL7w6Obn0m6oh6aAvpkrYiwjarnpAUTQTGr6GPAdC Usb2DIxws54WtNYPX6Zk5MhUmkwn3I86HqvD4+tkpuiXu5oamRQeSqzLf0FCXewQDx4N hAFPEYWxleX921w8Um0Vab7pT9bfZkRkWzBsL79E/TzMKkgSMQ2z7RbwNwJZYUE9NBjV nD7k1oExjf2VwTEvxRyt4HqQP1OdR/y9e0v0g1KohAgeb8dbtpYdXtDkIaQzLKq5JfkM ag6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:date:message-id; bh=u2hOxobQQ7N70NBKzVloCTb3n1+wpT22bqbV6rT/WDg=; b=hSm36TVhiDt110cNAzlcHZixIgJtsux60hOdb6qdAEgERaHzKfeYuTaDZv2NgNdhqB rC6nve+vVASfrwT+C2GfcHbZlQeAHqGHQmOYMIJijuRQL1WoZudMEuVd3srpGjVHQe7h +9ah49SPjoDP8thppUZHIEwnAQQ0t3vX9iQP9CakC+gNq72C+OMHhTg6CFzFN9LXXkYU gVfnRodY4Ds7Ymhz27UnAHf7horYINa7EspzkNl4lRi2ebJjsHEykuosfi4JaniM9qzo b1q4wwyWBLN2NUlfspYs7VNpdXmnvy9S7aq9cQNh8lX+5ZTK2K+OPU/LH8SXOMJujaNp ruzQ== X-Gm-Message-State: AOAM531Q+zm0AqPOohvJiRmb/6261qeKWCULmxG7yex0kz0T+4UYIJ5c BD8TVmCRosrTDuW4FVeBbAZD2g== X-Google-Smtp-Source: ABdhPJytrqR676TiFsnS/tXlV+p+3r5sT2Bg7/v4cPAW0K05L9MsbG60smFZLQ4zLjoOSttm/pFjkQ== X-Received: by 2002:a37:c07:: with SMTP id 7mr26807312qkm.312.1615854641008; Mon, 15 Mar 2021 17:30:41 -0700 (PDT) Received: from turing-police ([2601:5c0:c380:d61::359]) by smtp.gmail.com with ESMTPSA id y13sm11761961qto.39.2021.03.15.17.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 17:30:40 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Christoph Hellwig cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: arm64: kernel/sys.c - silence initialization warnings. In-reply-to: <20210315192300.GA154861@infradead.org> References: <162859.1615542946@turing-police> <20210315111433.GA22897@arm.com> <20210315192300.GA154861@infradead.org> Mime-Version: 1.0 Date: Mon, 15 Mar 2021 20:30:39 -0400 Message-ID: <96852.1615854639@turing-police> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_003044_165769_5D34FA63 X-CRM114-Status: GOOD ( 21.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 15 Mar 2021 19:23:00 -0000, Christoph Hellwig said: > On Mon, Mar 15, 2021 at 11:14:34AM +0000, Catalin Marinas wrote: > > We do similar initialisation in arch/arm64/kernel/sys32.c and > > arch/arm64/kernel/traps.c for example. It's a pretty common pattern > > throughout the kernel. > > > > So we either treat W=1 output as diff against the vanilla kernel when > > checking new patches or we remove override-init altogether from W=1. > > Mark Rutland pointed me to an older thread: > > Please just remove the override-init warning, it is not helpful at all. The tl;dr: Christoph is *probably* correct that it's not flagging any actual bugs. And since *my* interest is "get the kernel tree to a point where W=1 or sparse throwing a warning is something worth looking at", I'm not opposed to a patch to remove it from W=1 tree-wide if it has essentially zero chance of flagging an actual bug. The longer version: So I did a quick analysis... For an x86_64 allmodconfig, there's not that many left: 16 drivers/ata/ahci.h 1 drivers/ata/pata_atiixp.c 1 drivers/ata/pata_cs5520.c 1 drivers/ata/pata_cs5530.c 1 drivers/ata/pata_sc1200.c 1 drivers/ata/pata_serverworks.c 1 drivers/ata/sata_mv.c 4 drivers/ata/sata_nv.c 1 drivers/ata/sata_sil24.c 1 drivers/block/drbd/drbd_main.c 6 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h 2 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h 1 drivers/input/serio/i8042-x86ia64io.h 1 include/linux/blkdev.h 1 kernel/bpf/btf.c 4 kernel/time/hrtimer.c 1 lib/errname.c The drivers/ata *.c warnings all appear to be the same type of thing: static struct scsi_host_template serverworks_osb4_sht = { ATA_BMDMA_SHT(DRV_NAME), .sg_tablesize = LIBATA_DUMB_MAX_PRD, }; The preprocessor macro defining the struct contents, and then overriding one predefined value. So that's half of x64_64 done right there. There's a few corners still need looking at, like why drivers/ata/ahci.h throws 16 warnings on x64, but 30 on arm and 28 on arm64, and why there's 4 warnings on include/linux/stddef.h on arm64 but not arm or x86. But the number is certainly small enough that it's only a day or two's work at most to check every single one. If I go through the rest of x86 and arm and they're all legit, I'll send a patch to nuke it kernel-wide rather than piecemeal. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel