From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wfsmp4pwh5henpd6" 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 List-Id: --wfsmp4pwh5henpd6 Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [PATCH 0/2] Use terms consistently in function parameter names. MIME-Version: 1.0 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(-) --=20 2.43.0 --wfsmp4pwh5henpd6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmXkackACgkQnowa+77/ 2zLx6A/+JurxBBdZMKFu/0xWH0u/ByoKTj86x8rQFsh0MB6NLid4Mhm9u/t8t5vF X2MpVSLA6N2PEQbSdAOpoExE+RnJmyOOYvlnjba6WHjaMRPOWyi7SXZggctUreV5 Pjq7VBKdTmLUmMqvV8ydsRPFqNawA8FQcnMQN7C5XGK3sdyC4mY+qpRBSvGym/zS 0thYAtfzmPPmHqi8zRd5nvZDIwCgh2sN2x2JlbgTgw/FYL5xmRpjwR3+S7jDXbcp DkLd+B/w3aDa1JkQMCK2j5fk8AsNfbNzF9yn5ol+Gf7b/Lfdfdgn6UQ/L6L8tNUc 4szK/7g8WW1mHJpJo2ely8WrRuH/hx58n1sFBcA4gOziEBUC66lWut7sy5Wbi08K IVxD1x0PcvBrKm3e2TKHwHkw8nR2HaHupyPg3KaahlBQ8A68eCyCK4oXcVbMgeqn oP18NtiuuMcPINBdG31V7TkO/tvVYNhYqVhOA0n1Ui+VUj3n4NFJItR33G5caXYR AnPrJoEBHHYJ6ELM0t2VvWGz/tWvFKBlWHfBm7Wlx6sYpqLgTlV3zGCVb+ljtj3I +m/w8p3/+B7d3IOiy6GDKM0kFDY4yPS7Qrcx+2wkORe/GjB/yKZSULhGMSPp2C1y HGuqk53trRwEl3+F5vFRzS502srTZXK/7DrNuUbWEPVUt5vM/9M= =ZcOj -----END PGP SIGNATURE----- --wfsmp4pwh5henpd6--