Skip to contentSkip to conversation

Fix some more typos in docs and comments

PATCH Superseded Andrea Claudi 3 participants 9 messages Jan 9, 2024 – Jan 12, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fix some more typos in docs and comments

Time for some start-of-the-year cleanup :)

Using codespell, fix most of the typos in iproute2 docs and comments, except for some false positives. I didn't bother to report a Fixes tag for all the typos, but I can do that if needed.

Andrea Claudi (2):
docs, man: fix some typos
treewide: fix typos in various comments

 devlink/devlink.c           | 2 +-
 doc/actions/actions-general | 2 +-
 examples/bpf/README         | 2 +-
 include/bpf_api.h           | 2 +-
 include/libiptc/libiptc.h   | 2 +-
 include/xt-internal.h       | 2 +-
 lib/json_print.c            | 2 +-
 man/man8/devlink-rate.8     | 2 +-
 rdma/rdma.h                 | 2 +-
 tc/em_canid.c               | 2 +-
 tc/m_gact.c                 | 2 +-
 tc/q_htb.c                  | 3 ++-
 tc/q_netem.c                | 2 +-
 tipc/README                 | 2 +-
 14 files changed, 15 insertions(+), 14 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 docs, man: fix some typos

Fix some typos and spelling errors in iproute2 documentation.

---
 doc/actions/actions-general | 2 +-
 examples/bpf/README         | 2 +-
 man/man8/devlink-rate.8     | 2 +-
 tipc/README                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
doc/actions/actions-general +1 -1
index a0074a58..41c74d38 100644
@@ -116,7 +116,7 @@ The script below does the following:
 - If it does exceed its rate, its "color" changes to a mark of 2 and it is
 then passed through a second meter.
 
--The second meter is shared across all flows on that device [i am surpised
+-The second meter is shared across all flows on that device [i am surprised
 that this seems to be not a well know feature of the policer; Bert was telling
 me that someone was writing a qdisc just to do sharing across multiple devices;
 it must be the summer heat again; weve had someone doing that every year around
examples/bpf/README +1 -1
index b7261191..4c27bb4e 100644
@@ -15,4 +15,4 @@ with syntax and features:
 
 Note: Users should use new BTF way to defined the maps, the examples
 in legacy folder which is using struct bpf_elf_map defined maps is not
-recommanded.
+recommended.
man/man8/devlink-rate.8 +1 -1
index bcec3c31..f09ac4ac 100644
@@ -149,7 +149,7 @@ These parameter accept integer meaning weight or priority of a node.
 - set rate object parent to existing node with name \fINODE_NAME\fR or unset
 parent. Rate limits of the parent node applied to all it's children. Actual
 behaviour is details of driver's implementation. Setting parent to empty ("")
-name due to the kernel logic threated as parent unset.
+name due to the kernel logic treated as parent unset.
 
 .SS devlink port function rate add - create node rate object with specified parameters.
 Creates rate object of type node and sets parameters. Parameters same as for the
tipc/README +1 -1
index 578a0b7b..fbeb4345 100644
@@ -16,7 +16,7 @@ bare words specially.
 Help texts are not dynamically generated. That is, we do not pass datastructures
 like command list or option lists and print them dynamically. This is
 intentional. There is always that exception and when it comes to help texts
-these exceptions are normally neglected at the expence of usability.
+these exceptions are normally neglected at the expense of usability.
 
 KEY-VALUE
 ~~~~~~~~~
Signature · 1 line
2.43.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH iproute2 1/2] docs, man: fix some typos

Quoted 3 lines · Andrea Claudi

Fix some typos and spelling errors in iproute2 documentation.

doc/actions/actions-general The script below does the following: · line 122

Quoted 11 lines
doc/actions/actions-general +1 -1
@@ -116,7 +116,7 @@ The script below does the following:
 - If it does exceed its rate, its "color" changes to a mark of 2 and it is
 then passed through a second meter.
 
--The second meter is shared across all flows on that device [i am surpised
+-The second meter is shared across all flows on that device [i am surprised
 that this seems to be not a well know feature of the policer; Bert was telling
 me that someone was writing a qdisc just to do sharing across multiple devices;
 it must be the summer heat again; weve had someone doing that every year around

This document reads more like a newsgroup article or something from a zine than a formal piece of documentation. Even in this excerpt we see an uncapitalized "i" and a "weve", and there are many issues like this elsewhere. Fixing it feels a bit futile, plus I kinda like the slice-of-history nature of the document :) But yeah, the fix is correct.

#3 lore raw

Re: [PATCH iproute2 1/2] docs, man: fix some typos

In reply to Andrea Claudi

doc/actions/actions-general

Quoted 14 lines · On Tue, 9 Jan 2024 17:32:34 +0100 Andrea Claudi <[email protected]> wrote:

Fix some typos and spelling errors in iproute2 documentation.

---
 doc/actions/actions-general | 2 +-
 examples/bpf/README         | 2 +-
 man/man8/devlink-rate.8     | 2 +-
 tipc/README                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
doc/actions/actions-general +0 -0
index a0074a58..41c74d38 100644

I am thinking about removing all the stuff in doc/actions. It is in rough shape and doesn't really provide more info than is available elsewhere. My preference is to have information in only one place the man pages.

#4 lore raw

Re: [PATCH iproute2 1/2] docs, man: fix some typos

In reply to Andrea Claudi

doc/actions/actions-general The script below does the following: · line 122

Quoted 13 lines · On Tue, 9 Jan 2024 17:32:34 +0100 Andrea Claudi <[email protected]> wrote:
doc/actions/actions-general +1 -1
index a0074a58..41c74d38 100644
@@ -116,7 +116,7 @@ The script below does the following:
 - If it does exceed its rate, its "color" changes to a mark of 2 and it is
 then passed through a second meter.
 
--The second meter is shared across all flows on that device [i am surpised
+-The second meter is shared across all flows on that device [i am surprised
 that this seems to be not a well know feature of the policer; Bert was telling
 me that someone was writing a qdisc just to do sharing across multiple devices;
 it must be the summer heat again; weve had someone doing that every year around

Don't bother fixing this file, it will be dropped in next release.

#5 lore raw

PATCH 2/2 treewide: fix typos in various comments

In reply to Andrea Claudi

Fix various typos and spelling errors in some iproute2 comments.

---
 devlink/devlink.c         | 2 +-
 include/bpf_api.h         | 2 +-
 include/libiptc/libiptc.h | 2 +-
 include/xt-internal.h     | 2 +-
 lib/json_print.c          | 2 +-
 rdma/rdma.h               | 2 +-
 tc/em_canid.c             | 2 +-
 tc/m_gact.c               | 2 +-
 tc/q_htb.c                | 3 ++-
 tc/q_netem.c              | 2 +-
 10 files changed, 11 insertions(+), 10 deletions(-)
devlink/devlink.c +1 -1
index 3baad355..8c2e3395 100644
@@ -2326,7 +2326,7 @@ static int dl_argv_dry_parse(struct dl *dl, uint64_t o_required,
 	return err;
 }
 
-/* List of extented handles with two slashes. */
+/* List of extended handles with two slashes. */
 static const uint64_t dl_opt_extended_handle[] = {
 	DL_OPT_HANDLEP,
 	DL_OPT_HANDLE_REGION,
include/bpf_api.h +1 -1
index 5887d3a8..287f96b6 100644
@@ -253,7 +253,7 @@ static int BPF_FUNC(skb_set_tunnel_opt, struct __sk_buff *skb,
 # define memmove(d, s, n)	__builtin_memmove((d), (s), (n))
 #endif
 
-/* FIXME: __builtin_memcmp() is not yet fully useable unless llvm bug
+/* FIXME: __builtin_memcmp() is not yet fully usable unless llvm bug
  * https://llvm.org/bugs/show_bug.cgi?id=26218 gets resolved. Also
  * this one would generate a reloc entry (non-map), otherwise.
  */
include/libiptc/libiptc.h +1 -1
index 1bfe4e18..89dce2f9 100644
@@ -80,7 +80,7 @@ int iptc_append_entry(const xt_chainlabel chain,
 		      const struct ipt_entry *e,
 		      struct xtc_handle *handle);
 
-/* Check whether a mathching rule exists */
+/* Check whether a matching rule exists */
 int iptc_check_entry(const xt_chainlabel chain,
 		      const struct ipt_entry *origfw,
 		      unsigned char *matchmask,
include/xt-internal.h +1 -1
index 89c73e4f..07216140 100644
@@ -6,7 +6,7 @@
 #	define XT_LIB_DIR "/lib/xtables"
 #endif
 
-/* protocol family dependent informations */
+/* protocol family dependent information */
 struct afinfo {
 	/* protocol family */
 	int family;
lib/json_print.c +1 -1
index 7b3b6c3f..810d496e 100644
@@ -217,7 +217,7 @@ int print_color_bool(enum output_type type,
 
 /* In JSON mode, acts like print_color_bool.
  * Otherwise, will print key with prefix of "no" if false.
- * The show flag is used to suppres printing in non-JSON mode
+ * The show flag is used to suppress printing in non-JSON mode
  */
 int print_color_bool_opt(enum output_type type,
 			 enum color_attr color,
rdma/rdma.h +1 -1
index 1f8f8326..df1852db 100644
@@ -40,7 +40,7 @@ struct filter_entry {
 	char *key;
 	char *value;
 	/*
-	 * This field means that we can try to issue .doit calback
+	 * This field means that we can try to issue .doit callback
 	 * on value above. This value can be converted to integer
 	 * with simple atoi(). Otherwise "is_doit" will be false.
 	 */
tc/em_canid.c +1 -1
index 6d06b66a..22854752 100644
@@ -26,7 +26,7 @@
 #include <inttypes.h>
 #include "m_ematch.h"
 
-#define EM_CANID_RULES_MAX 400 /* Main reason for this number is Nelink
+#define EM_CANID_RULES_MAX 400 /* Main reason for this number is Netlink
 	message size limit equal to Single memory page size. When dump()
 	is invoked, there are even some ematch related headers sent from
 	kernel to userspace together with em_canid configuration --
tc/m_gact.c +1 -1
index e294a701..225ffce4 100644
@@ -18,7 +18,7 @@
 #include "tc_util.h"
 #include <linux/tc_act/tc_gact.h>
 
-/* define to turn on probablity stuff */
+/* define to turn on probability stuff */
 
 #ifdef CONFIG_GACT_PROB
 static const char *prob_n2a(int p)
tc/q_htb.c +2 -1
index 63b9521b..351ef693 100644
@@ -224,7 +224,8 @@ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
 	opt.ceil.rate = (ceil64 >= (1ULL << 32)) ? ~0U : ceil64;
 
 	/* compute minimal allowed burst from rate; mtu is added here to make
-	   sute that buffer is larger than mtu and to have some safeguard space */
+	   sure that buffer is larger than mtu and to have some safeguard space
+	 */
 	if (!buffer)
 		buffer = rate64 / get_hz() + mtu;
 	if (!cbuffer)
tc/q_netem.c +1 -1
index 5d5aad80..4ce9ab6e 100644
@@ -117,7 +117,7 @@ static void print_corr(bool present, __u32 value)
 }
 
 /*
- * Simplistic file parser for distrbution data.
+ * Simplistic file parser for distribution data.
  * Format is:
  *	# comment line(s)
  *	data0 data1 ...
Signature · 1 line
2.43.0
Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH iproute2 2/2] treewide: fix typos in various comments

Quoted 3 lines · Andrea Claudi

Fix various typos and spelling errors in some iproute2 comments.

include/bpf_api.h static int BPF_FUNC(skb_set_tunnel_opt, struct __sk_buff *skb, · line 259

Quoted 13 lines
include/bpf_api.h +1 -1
index 5887d3a8..287f96b6 100644
@@ -253,7 +253,7 @@ static int BPF_FUNC(skb_set_tunnel_opt, struct __sk_buff *skb,
 # define memmove(d, s, n)	__builtin_memmove((d), (s), (n))
 #endif
 
-/* FIXME: __builtin_memcmp() is not yet fully useable unless llvm bug
+/* FIXME: __builtin_memcmp() is not yet fully usable unless llvm bug
  * https://llvm.org/bugs/show_bug.cgi?id=26218 gets resolved. Also
  * this one would generate a reloc entry (non-map), otherwise.
  */

BTW, I wouldn't spell it "useable" myself, but I think it is not incorrect.

#7 lore raw

Re: [PATCH iproute2 2/2] treewide: fix typos in various comments

In reply to Andrea Claudi

include/libiptc/libiptc.h int iptc_append_entry(const xt_chainlabel chain, · line 86

Quoted 13 lines · On Tue, 9 Jan 2024 17:32:35 +0100 Andrea Claudi <[email protected]> wrote:
include/libiptc/libiptc.h +1 -1
index 1bfe4e18..89dce2f9 100644
@@ -80,7 +80,7 @@ int iptc_append_entry(const xt_chainlabel chain,
 		      const struct ipt_entry *e,
 		      struct xtc_handle *handle);
 
-/* Check whether a mathching rule exists */
+/* Check whether a matching rule exists */
 int iptc_check_entry(const xt_chainlabel chain,
 		      const struct ipt_entry *origfw,
 		      unsigned char *matchmask,

This is no longer in current code tree.
Please rebase and resubmit

#8 lore raw

Re: [PATCH iproute2 2/2] treewide: fix typos in various comments

Quoted 11 lines · Stephen Hemminger
Quoted 8 lines · On Tue, 9 Jan 2024 17:32:35 +0100 Andrea Claudi <[email protected]> wrote:
include/libiptc/libiptc.h +0 -0
index 1bfe4e18..89dce2f9 100644
@@ -80,7 +80,7 @@ int iptc_append_entry(const xt_chainlabel chain,
 		      const struct ipt_entry *e,
 		      struct xtc_handle *handle);
 
Quoted 8 lines

include/libiptc/libiptc.h int iptc_append_entry(const xt_chainlabel chain, · line 86

Quoted 5 lines
include/libiptc/libiptc.h +1 -1
-/* Check whether a mathching rule exists */
+/* Check whether a matching rule exists */
 int iptc_check_entry(const xt_chainlabel chain,
 		      const struct ipt_entry *origfw,
 		      unsigned char *matchmask,

This is no longer in current code tree.
Please rebase and resubmit

Woops, sorry. Will do.