Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3340852pxb; Mon, 1 Mar 2021 07:40:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3GBcjmLrZLScAve9k6C4MTaT8x+GRdHsQrXGdrbXBP/dyPiMA+PVy8aYMoHVrGinTZs3H X-Received: by 2002:a17:906:2dc1:: with SMTP id h1mr13415401eji.460.1614613217838; Mon, 01 Mar 2021 07:40:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614613217; cv=none; d=google.com; s=arc-20160816; b=A+XidNuLGcUtVune2dDMrhyh5fn1tP1mfVWHeSqzm3qDbSEwC6gZEwB4+chaa4rc3V /+AjiCN1K9A2XjUGDDXF19eiE30C7vCuKAnomEh1f7jQ+7J+Q2ZH4zUIt4tNuw6g8V0V j7iyzXGdFL0xX9XfX3tORH5D+UnjVPM2o1qWDns56A9b4yn09AjK+yFnccdsRiqVZrDY de66m9/5gOjC4cSZVfPbtztE0VFmRFLveVZrvzv4QmUYptouoOaMHTlP2GWoK8Mj8gNV SswOkWENzmf6Lo3qwsbH19/HbZuIOMDzHv1s7gSnHqjcYZJESMUeXpIk2Z7DlHRc4eAR 8LHQ== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=JcQhrllxuFRDL1UZHLujpUigbOErMlV75Eq1H4imx38=; b=Mt2Ihz5Wg+9aZQQKqKeuW2c9SjwHhmOBYYSzlNv2HWukgUcWUCk02qQJyuqBFebLPT wUIK1G40MNa59PHXi+6QQp5itKb5sAPrd5FqTjA7IRf31/NQCux7cUGDAP+zQWLfG5C4 pp2ED+vfgBxPW6/7VGxzytDvUhpvLNr3U6iF6iLADxemRc1qDn/RT7fFFvBioQfDf6Rc y0zMcnrXd+h2gGajNHXiAaSnPqn8wO0jNkchqoyac+Wp0ogNiKK+2/1kbHt31fP2jrBo LLmK0dR0nA1mxI3c79tVigGFFPLiBtnlIA4Nl/D1iqMv2N6Mkvn0YGd3ofvTODMdLb++ yhlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fPftHurl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp8si10817014ejc.253.2021.03.01.07.39.55; Mon, 01 Mar 2021 07:40:17 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fPftHurl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237366AbhCAPij (ORCPT + 99 others); Mon, 1 Mar 2021 10:38:39 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:28524 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237266AbhCAPi1 (ORCPT ); Mon, 1 Mar 2021 10:38:27 -0500 Received: from oscar.flets-west.jp (softbank126026090165.bbtec.net [126.26.90.165]) (authenticated) by conuserg-11.nifty.com with ESMTP id 121Fawh6014128; Tue, 2 Mar 2021 00:36:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 121Fawh6014128 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614613019; bh=JcQhrllxuFRDL1UZHLujpUigbOErMlV75Eq1H4imx38=; h=From:To:Cc:Subject:Date:From; b=fPftHurlRgDuhPQO2vly13iwVtArvLqq2thObmjs55bm2juNQDrSzWCHUN5GWuMiX vQ6cieuMxG5XN8gFBLed9fCWa3Et0wpSip7AHObAkR2jRB3s3fmHVlzPiiojAPfUJ3 bMN2Ufrh9sJBp1PIuoFF5eTNVnybbrYytsBEScRX9RjmJJ+qP6ZB9cQ6PLUkhkZPbl SQjovBgaMaCHIcpiHznFQ3lqH8pz0jA1Cukd46vgFsl/cb88Ko1outwfqcUk06UPl9 z00dulm9VLHSH3dJpSUovho8A+uGbZrK9MyIEzNBrK/iWXAzHVodxtJ45bYe70Sv+r mKOw9T55cZuPA== X-Nifty-SrcIP: [126.26.90.165] From: Masahiro Yamada To: Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 1/3] xtensa: stop filling syscall array with sys_ni_syscall Date: Tue, 2 Mar 2021 00:36:54 +0900 Message-Id: <20210301153656.363839-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org arch/xtensa/kernel/syscalls/syscalltbl.sh fills missing syscall numbers with sys_ni_syscall. So, the generated arch/xtensa/include/generated/asm/syscall_table.h has no hole. Hence, the line: [0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall, is meaningless. The number of generated __SYSCALL() macros is the same as __NR_syscalls (this is 442 as of v5.11). Hence, the array size, [__NR_syscalls] is unneeded. The designated initializer, '[nr] =', is also unneeded. This file does not need to know __NR_syscalls. Drop the unneeded include directive. Signed-off-by: Masahiro Yamada --- arch/xtensa/kernel/syscall.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index 2c415fce6801..26fa09ce4d17 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c @@ -17,7 +17,6 @@ */ #include #include -#include #include #include #include @@ -28,10 +27,8 @@ #include #include -syscall_t sys_call_table[__NR_syscalls] /* FIXME __cacheline_aligned */= { - [0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall, - -#define __SYSCALL(nr, entry, nargs)[nr] = (syscall_t)entry, +syscall_t sys_call_table[] /* FIXME __cacheline_aligned */= { +#define __SYSCALL(nr, entry, nargs) (syscall_t)entry, #include #undef __SYSCALL }; -- 2.27.0