Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3035399imu; Mon, 19 Nov 2018 09:39:32 -0800 (PST) X-Google-Smtp-Source: AJdET5d9h65mgz8ElkAU/FjjNVMALfYK/Ul3zWFSXOTBCwSXwps/5g1qhkSTW4dmqM+Ltpbb3/n+ X-Received: by 2002:a63:ab08:: with SMTP id p8mr20623169pgf.87.1542649172836; Mon, 19 Nov 2018 09:39:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542649172; cv=none; d=google.com; s=arc-20160816; b=Fuq7QxLyDZI24ahkeTJ2jOhl5378fWbqLfk+0gTirWCZBUuHTnvWTzMRW6EADrML+d A3pf/0w1Ms1Smxx1A+NaSJjZsT4ONptWwAdatE95GoXH5jyUVdJqhmtAWgA7NnfjzZ2Z E7wbD/WJF1u6v+ti0PDHFdw7zO3mgJrmBEM0JdQqKBvZfuBltcogGsad+1giR0hOfuUq TaWHkUelUyjzKyzgMthfopaT2Ao3eWk0fZd0ssDyoyrHBOaUsHVJjy6gmVZjnev5DyRI UhI4pWqhiYcyf6D7MvsPdOElbG9yYEF/Jk4UjtIM1AhQ+PTJHTs0m/4O0cE/z9dABi+g V4Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=T5SjZ2tyDSOvAr2TOoAahu6zukA4Tlmwd7HV3ERJZK0=; b=kjkK+6QcWnEEQEPOlz3NP+MZ/3w+0WRjSmUuzZsble2Ixt+j3KbJWSu4PIJkipJdFZ 7iPEyfdVMQMofK6HreEk6PR/d/GJ2qBiqvpV14KI+5H+s8Fj9flqZjAn9QsI5WaCyGGN 4n7vALlJWtNhg2l9hJK7B8bL435ZnhkjlMG2k+OOy8UPWADYIm2E82qE2BWQm5V1JeXc tKWx+m5veLBsYKW/XhkKLanyu+NSyW4cHogq8cb3NWSBdkQA2KJDXXlYDx98aGc4Kd5T ihd+FdkSw3fgn4M6USWzZyPtj1pGcg4e9/J4EY+figrBj3yc5A0XenldDtzI9qsxiiJR rhZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si36934584pgz.593.2018.11.19.09.39.16; Mon, 19 Nov 2018 09:39:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390266AbeKTEBx (ORCPT + 99 others); Mon, 19 Nov 2018 23:01:53 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:34711 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389737AbeKTDPU (ORCPT ); Mon, 19 Nov 2018 22:15:20 -0500 Received: by mail-qk1-f194.google.com with SMTP id a132so49728973qkg.1; Mon, 19 Nov 2018 08:51:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T5SjZ2tyDSOvAr2TOoAahu6zukA4Tlmwd7HV3ERJZK0=; b=NCu1OqQb5tDCEv81hInSEYhsAWbSvyeQ3xz2agKSut88j98QwG74+UyTkmf3LRKe8i TUMkoJpbGN3GPlfusdWelUHO1bZmtgplIwseu1xyGNLFUZdN2BZs3wqsh/gmzk9KdHnp BdIOLCe6S2eCrLaHLYBLEoWgHMpsdVG/iiwuuyhx6FGbrr5khrpXCQy8yoVaox9D0tDE 4NkR/6zkGgA7xyhjuj+bedmSpz17N6POXvAJDfD+A+YlgyJvFwyOYMrqV+ggaeP4PtGa UFXxaPVaBh3CGKdT6b/tflSsR3fCotXUveqXXyM1VqrQoIYE/Di+PJqlcNN3J1WsELW0 XZLQ== X-Gm-Message-State: AGRZ1gLFfTglMv7dNzvl90NaP2EgpIqpSufVxno3nfCLi74+jxkCCYPs hhtGZ6DkBOMRdOa7niEutIZaYUtPIhCbUcif+Ak= X-Received: by 2002:a0c:f50c:: with SMTP id j12mr21842914qvm.149.1542646266888; Mon, 19 Nov 2018 08:51:06 -0800 (PST) MIME-Version: 1.0 References: <1542169930-24118-1-git-send-email-firoz.khan@linaro.org> <1542169930-24118-2-git-send-email-firoz.khan@linaro.org> In-Reply-To: <1542169930-24118-2-git-send-email-firoz.khan@linaro.org> From: Arnd Bergmann Date: Mon, 19 Nov 2018 17:50:50 +0100 Message-ID: Subject: Re: [PATCH v3 1/3] sh: add __NR_syscalls along with NR_syscalls To: Firoz Khan Cc: Linux-sh list , Yoshinori Sato , Rich Felker , gregkh , Philippe Ombredanne , Thomas Gleixner , Kate Stewart , y2038 Mailman List , Linux Kernel Mailing List , linux-arch , Deepa Dinamani , Marcin Juszkiewicz Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 14, 2018 at 5:32 AM Firoz Khan wrote: > > NR_syscalls macro holds the number of system call exist > in sh architecture. We have to change the value of NR- > _syscalls, if we add or delete a system call. > > One of the patch in this patch series has a script which > will generate a uapi header based on syscall.tbl file. > The syscall.tbl file contains the total number of system > calls information. So we have two option to update NR_sy- > scalls value. > > 1. Update NR_syscalls in asm/unistd.h manually by count- > ing the no.of system calls. No need to update NR_sys- > calls until we either add a new system call or delete > existing system call. > > 2. We can keep this feature it above mentioned script, > that will count the number of syscalls and keep it in > a generated file. In this case we don't need to expli- > citly update NR_syscalls in asm/unistd.h file. > > The 2nd option will be the recommended one. For that, I > added the __NR_syscalls macro in uapi/asm/unistd_32/64.h > along with NR_syscalls which is moved to asm/unistd.h. > The macro __NR_syscalls also added for making the name > convention same across all architecture. While __NR_sys- > calls isn't strictly part of the uapi, having it as part > of the generated header to simplifies the implementation. > We also need to enclose this macro with #ifdef __KERNEL__ > to avoid side effects. > > Signed-off-by: Firoz Khan Looks correct to me, but since there are only three references to 'NR_syscalls' in arch/sh, I wonder if we should just replace it with __NR_syscalls in the same patch. Arnd