From patchwork Sun Mar 3 12:15:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 56750 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E646B3858429 for ; Sun, 3 Mar 2024 12:15:41 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by sourceware.org (Postfix) with ESMTPS id C2FB13858C55 for ; Sun, 3 Mar 2024 12:15:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2FB13858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C2FB13858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=145.40.73.55 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709468114; cv=none; b=cgbqu+Ow3TP/I2BDYcqTdhYHuscXKIHu3BfYzRoWryAtKPzeGA8aEr6pW2VECf7Yvd7csUmjpqMctt0ZEd9WTM7qgqCRrPYy+gLaEAMB/8+5U7u/EyiadpKoP4a05eXkP8JG06OGd49RtZ2FGFCOMxZIbC9/+Vej6OUYrfNMmpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709468114; c=relaxed/simple; bh=qREyyhvgSeHvXyhWgxFSWmj8iefZsN67LoZLcBk5n0Q=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=E/W1+LTs+/CjMCSoPgFHEisDcz/8+tkQ3vtRlpD27Zuqcaii9gcKTwkrD9IZBVPAMgFw1J60efUl0lA3FxHEtaJVEtiwT7nUsoLpZ/Re+hU0pjY0EYt6rn/S9/FIJu3mu6279BCQUMgm7JZWmMmrivAC+xOPWpGiK4AFbiwE5VE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 55B6ACE0F80; Sun, 3 Mar 2024 12:15:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0810EC433F1; Sun, 3 Mar 2024 12:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709468108; bh=qREyyhvgSeHvXyhWgxFSWmj8iefZsN67LoZLcBk5n0Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nOw0mxvrUyYIyzSanOwyNGEDZQHgPSZwnZL6rdMKfmt0REdJxbJsVw4jxqF6BTOLE JWO2sLGSP28/9mXQL5//XPl1gH/+hIdwmJqVnhoX2nHtR8/PtNAk9VcBKD6lNTBLAB k6M1wGkBy06uYXRAbYmpuCahGbKzwQuI3r9YG8oRGQRdNVq30Ucy+0RnEznmY1OCCI gUvCbm85ChK/tQtIdYZKZFV0g6oTwAmtsqQJO8qeKrGIZHuJBeECU+dHErOwo3w4Az yLyhBzv5256Nf7/RxMnmN4TihHjvxR1yJSP7PzDj3JjccHF56ylSYbUOoO3wni9aBR jAFnS7HePUrBQ== Date: Sun, 3 Mar 2024 13:15:05 +0100 From: Alejandro Colomar To: Elliott Hughes , Stefan Puiu , Bruno Haible , linux-man@vger.kernel.org Cc: Alejandro Colomar , GNU C Library , linux-api@vger.kernel.org Subject: [PATCH 0/2] Use terms consistently in function parameter names. Message-ID: <20240303121454.16994-1-alx@kernel.org> X-Mailer: git-send-email 2.43.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Hi! I finally wrote this patch. I had it in my todo for too long. In functions, use duration, instead of request, as suggested by Elliott. In ctl functions and similar, there was a lot of variation: - command - cmd - request - req - option - operation - op And they all meant the same thing. We have similar problems in the names of the constants, which have similar variability. In the case of the function parameters, we can easily rename them. I chose 'op', as it seems a reasonable (and short) name, and most of the documentation already used the term 'operation' to refer to the parameter, even in cases where the parameter was names differently. I would like to ask to kernel maintainers and libc implementations to add some consistency here too, and rename the parameters accordingly, for consistency, or at least use your own consistency, if you don't like this one, but stick to some rules. In the case of constants, we can't rename them. Too bad. But I'd like to ask programmers to have this in mind for when new constants are added, so that some consistency is followed. (This was something that made me doubt about using 'op', because most constants seem to use '_CMD_' in their names. If you prefer 'cmd' for the parameter names for that reason, let's discuss it.) Have a lovely day! Alex Alejandro Colomar (2): man*/: epoll_*(), fcntl(), flock(), ioctl(), msgctl(), *prctl(), ptrace(), quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation' clock_nanosleep.2, nanosleep.2: Use 'duration' rather than 'request' man2/arch_prctl.2 | 12 +++--- man2/clock_nanosleep.2 | 20 ++++----- man2/epoll_wait.2 | 4 +- man2/fcntl.2 | 70 +++++++++++++++---------------- man2/flock.2 | 6 +-- man2/ioctl.2 | 30 +++++++------- man2/ioctl_console.2 | 8 ++-- man2/ioctl_fideduperange.2 | 2 +- man2/ioctl_getfsmap.2 | 6 +-- man2/ioctl_ns.2 | 2 +- man2/ioctl_tty.2 | 10 ++--- man2/ioctl_userfaultfd.2 | 10 ++--- man2/msgctl.2 | 16 ++++---- man2/nanosleep.2 | 12 +++--- man2/prctl.2 | 84 +++++++++++++++++++------------------- man2/ptrace.2 | 60 +++++++++++++-------------- man2/quotactl.2 | 34 +++++++-------- man2/reboot.2 | 19 +++++---- man2/semctl.2 | 22 +++++----- man2/shmctl.2 | 20 +++++---- man3/lockf.3 | 11 ++--- 21 files changed, 233 insertions(+), 225 deletions(-)