Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1921042pxb; Fri, 5 Mar 2021 03:04:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkr5DFKZQPWWePOTm9jeOIY7OQVc75qcCwePZVY13AuG+9zyX7pFA1Loyvfn4gFduW82F2 X-Received: by 2002:a17:907:778d:: with SMTP id ky13mr1728042ejc.291.1614942282406; Fri, 05 Mar 2021 03:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614942282; cv=none; d=google.com; s=arc-20160816; b=St2KvZszyRY4ViggltzA2jwKi20Ot7vd0KgZ8jvDkhNdCBiUo+WWgIDsbdwyUl0gTx NkaRrkEKB0spJY9yOXhcDq8GlGM2cTG2ElxR8dOm045FppFUxM26zvLfRiNlo3gJ6/2a 6P6c48H3NFfdRDh7oYpD4QDU6ZuWlLUXW38k4Uo6bGo0BoJmnL440ZTVVLaSE79mfMOW GyJzLoC6s+mlYs6EK4RVa/B7GPk0SHfoWtjOihtSNeS4Xt4adpKkkrHr2UMSnXQ5oMpN OuM3YGH2NaGe+8b2RnPD+/CY/FVPO5HrVRYZsucI277JISghnVfcPhzMUcf/TvLhS12H X76A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=EQFMP9BzTNNB6wxBlsqUN2aGxK8OY+6IXBWgyb6bVn4=; b=GRFEntE/Y1GMyFphPCzRa1qvxT9/yBOsxwU9K+BQZQxa+H4sqd02OUf3eBgP9wIXQT aDzAR9VAUd/OnVdryP096C6AoQA9bq5JF3NaPqjy002clY7ZZ6e3sX0aW/HMDTYXn6kx jgFEVAAJjeMuMyG6kZeop7fYtJTZ3KO2eGfDJm6cqY6okKVVmG1C2MpvNKNqVecQH75q 9t2GooLYPwEJzy5ijnR4rzRh0kI19v494PvX/0+siaqSLAMqR93ZLCxX15LRXoGOV2s1 9AETIYy6yivV1Hh+211Hqg4AXdswd8r6nzjHP6fcoWz5xVbD8xuNHumAB3GUPC+xYpbw Kr0w== 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 q10si1255549edd.316.2021.03.05.03.04.19; Fri, 05 Mar 2021 03:04:42 -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; 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 S229759AbhCELDZ (ORCPT + 99 others); Fri, 5 Mar 2021 06:03:25 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:13068 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbhCELC4 (ORCPT ); Fri, 5 Mar 2021 06:02:56 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DsPsk6NggzMjRP; Fri, 5 Mar 2021 19:00:42 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Fri, 5 Mar 2021 19:02:45 +0800 From: Nanyong Sun To: , , CC: , , , , , Subject: [PATCH 6/9] riscv: syscall_table: Reduce W=1 compilation warnings noise Date: Fri, 5 Mar 2021 19:33:29 +0800 Message-ID: <20210305113332.428048-7-sunnanyong@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210305113332.428048-1-sunnanyong@huawei.com> References: <20210305113332.428048-1-sunnanyong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building riscv syscall table with W=1 throws the warning as following pattern: arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init] 14 | #define __SYSCALL(nr, call) [nr] = (call), | ^ ./include/uapi/asm-generic/unistd.h:29:37: note: in expansion of macro ‘__SYSCALL’ 29 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) | ^~~~~~~~~ ./include/uapi/asm-generic/unistd.h:34:1: note: in expansion of macro ‘__SC_COMP’ 34 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) | ^~~~~~~~~ arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for ‘sys_call_table[0]’) 14 | #define __SYSCALL(nr, call) [nr] = (call), | ^ ./include/uapi/asm-generic/unistd.h:29:37: note: in expansion of macro ‘__SYSCALL’ 29 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) | ^~~~~~~~~ ./include/uapi/asm-generic/unistd.h:34:1: note: in expansion of macro ‘__SC_COMP’ 34 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) | ^~~~~~~~~ arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init] ... Since we intentionally build the syscall tables this way,ignore the warning. Reported-by: Hulk Robot Signed-off-by: Nanyong Sun --- arch/riscv/kernel/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile index 3dc0abde988a..647a47f5484a 100644 --- a/arch/riscv/kernel/Makefile +++ b/arch/riscv/kernel/Makefile @@ -8,6 +8,7 @@ CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) endif +CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,) extra-y += head.o extra-y += vmlinux.lds -- 2.25.1