From: Andrew Kreimer <algonell@gmail.com>
To: smatch@vger.kernel.org
Cc: Andrew Kreimer <algonell@gmail.com>
Subject: [PATCH 1/2] smatch: fix typos
Date: Thu, 17 Oct 2024 18:48:34 +0300 [thread overview]
Message-ID: <20241017154835.3103-2-algonell@gmail.com> (raw)
In-Reply-To: <20241017154835.3103-1-algonell@gmail.com>
Fix typos in documentation, comments, etc.
Via codespell.
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
---
smatch_annotate.c | 4 ++--
smatch_comparison.c | 2 +-
| 6 +++---
smatch_implied.c | 2 +-
smatch_locking.c | 2 +-
smatch_math.c | 2 +-
smatch_param_compare_limit.c | 2 +-
smatch_parsed_conditions.c | 2 +-
smatch_ssa.c | 2 +-
smatch_strlen.c | 2 +-
smatch_struct_assignment.c | 2 +-
11 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/smatch_annotate.c b/smatch_annotate.c
index 21df3d1b..be1f3d09 100644
--- a/smatch_annotate.c
+++ b/smatch_annotate.c
@@ -41,8 +41,8 @@ void register_annotate(int id)
{
/*
* Technically snprintf() returns the number of bytes which *would* have
- * been printed. I do try caclulating that in check_snprintf(). But
- * it probably works better to assume the limitter is accurate.
+ * been printed. I do try calculating that in check_snprintf(). But
+ * it probably works better to assume the limiter is accurate.
*/
add_implied_return_hook("snprintf", ¶m_caps_return, INT_PTR(1));
diff --git a/smatch_comparison.c b/smatch_comparison.c
index 4f18a848..fef45c37 100644
--- a/smatch_comparison.c
+++ b/smatch_comparison.c
@@ -1185,7 +1185,7 @@ static void handle_for_loops(struct expression *expr, char *state_name, struct s
return;
}
- /* Second time checking the condtion */
+ /* Second time checking the condition */
if (__prev_stmt != __cur_stmt->iterator_post_statement)
return;
--git a/smatch_extra.c b/smatch_extra.c
index 60cf794f..53210640 100644
--- a/smatch_extra.c
+++ b/smatch_extra.c
@@ -1327,7 +1327,7 @@ static void clear_pointed_at_state(struct expression *expr)
struct symbol *type;
/*
- * ALERT: This is sort of a mess. If it's is a struct assigment like
+ * ALERT: This is sort of a mess. If it's is a struct assignment like
* "foo = bar;", then that's handled by smatch_struct_assignment.c.
* the same thing for p++ where "p" is a struct. Most modifications
* are handled by the assignment hook or the db. Smatch_extra.c doesn't
@@ -1549,7 +1549,7 @@ static int handle_postop_inc(struct expression *left, int op, struct expression
false_state = alloc_estate_range(add_one(limit), add_one(limit));
/* Currently we just discard the false state but when two passes is
- * implimented correctly then it will use it.
+ * implemented correctly then it will use it.
*/
set_extra_expr_true_false(left->unop, true_state, false_state);
@@ -2544,7 +2544,7 @@ struct range_list *intersect_with_real_abs_var_sym(const char *name, struct symb
* with the real absolute to say that actually it's 0-8.
*
* We are combining it here. But now that I think about it, this is
- * probably not the ideal place to combine it because it should proably
+ * probably not the ideal place to combine it because it should probably
* be done earlier. Oh well, this is an improvement on what was there
* before so I'm going to commit this code.
*
diff --git a/smatch_implied.c b/smatch_implied.c
index 2b5fab02..9055d676 100644
--- a/smatch_implied.c
+++ b/smatch_implied.c
@@ -90,7 +90,7 @@ static bool implications_turned_off(int owner)
/*
* tmp_range_list():
- * It messes things up to free range list allocations. This helper fuction
+ * It messes things up to free range list allocations. This helper function
* lets us reuse memory instead of doing new allocations.
*/
static struct range_list *tmp_range_list(struct symbol *type, long long num)
diff --git a/smatch_locking.c b/smatch_locking.c
index 80e4b057..26f8e622 100644
--- a/smatch_locking.c
+++ b/smatch_locking.c
@@ -755,7 +755,7 @@ static void match_class_destructor(const char *fn, struct expression *expr, void
* as well because sometimes it's like the assignment is:
*
* scope = class_mutex_constructor(®ister_mutex);
- * but other times because we do a fake parameter assignement or
+ * but other times because we do a fake parameter assignment or
* something the assignment is more direct:
* scope = ®ister_mutex;
*
diff --git a/smatch_math.c b/smatch_math.c
index c5e46bfe..fa824fe8 100644
--- a/smatch_math.c
+++ b/smatch_math.c
@@ -339,7 +339,7 @@ static bool handle_container_of(struct expression *expr, int implied, int *recur
* p = container_of(foo, struct my_struct, member);
* Then if the offset is non-zero we can assume that p is a valid
* pointer. Mathematically, that's not necessarily true, but in
- * pratical terms if p isn't valid then we're already in deep trouble
+ * practical terms if p isn't valid then we're already in deep trouble
* to the point where printing more warnings now won't help.
*
* There are places were the author knows that container_of() is a
diff --git a/smatch_param_compare_limit.c b/smatch_param_compare_limit.c
index a1c4cef3..99bb1cae 100644
--- a/smatch_param_compare_limit.c
+++ b/smatch_param_compare_limit.c
@@ -119,7 +119,7 @@ static void add_comparison_limit_var_sym(const char *left_name,
}
/*
- * This is quite a bit more limitted, less ambitious, simpler compared to
+ * This is quite a bit more limited, less ambitious, simpler compared to
* smatch_camparison.c.
*/
void __compare_param_limit_hook(struct expression *left_expr, struct expression *right_expr,
diff --git a/smatch_parsed_conditions.c b/smatch_parsed_conditions.c
index 338d2a26..afa5c455 100644
--- a/smatch_parsed_conditions.c
+++ b/smatch_parsed_conditions.c
@@ -30,7 +30,7 @@
* implications.
*
* So what this module does is it ties the implications to the expression
- * pointer so that we can retreive them easily. It's similar to Smatch stored
+ * pointer so that we can retrieve them easily. It's similar to Smatch stored
* implications but it doesn't save condition, it saves the pointer.
*
* We ignore pre loop conditions which Smatch parses twice.
diff --git a/smatch_ssa.c b/smatch_ssa.c
index 37365558..f643bac3 100644
--- a/smatch_ssa.c
+++ b/smatch_ssa.c
@@ -151,7 +151,7 @@ static void match_assign(struct expression *expr)
if (!orig || orig->state == &undefined)
orig = set_state(my_id, right_name, right_sym, alloc_ssa_new(right_name));
- /* This can happen in unreachable code or outside of functions I gess */
+ /* This can happen in unreachable code or outside of functions I guess */
if (!orig)
return;
diff --git a/smatch_strlen.c b/smatch_strlen.c
index 74c5c825..8161c638 100644
--- a/smatch_strlen.c
+++ b/smatch_strlen.c
@@ -415,7 +415,7 @@ void register_strlen(int id)
add_function_hook("strcpy", &match_strcpy, NULL);
/*
* I would have made strchr only apply for success returns but some
- * arches (arm64) impliment strchr outside the kernel so we don't know
+ * arches (arm64) implement strchr outside the kernel so we don't know
* the return values. Having a NULL with a strlen is fine because if
* someone uses the NULL then we're already in trouble.
*/
diff --git a/smatch_struct_assignment.c b/smatch_struct_assignment.c
index 99f2b85c..0e3cf899 100644
--- a/smatch_struct_assignment.c
+++ b/smatch_struct_assignment.c
@@ -50,7 +50,7 @@
* p1->x->y.
*
* I don't have a proper solution for this problem right now. I just copy one
- * level and don't nest. It should handle limitted nesting but intelligently.
+ * level and don't nest. It should handle limited nesting but intelligently.
*
* The other thing is that you end up with a lot of garbage assignments where
* we record "x could be anything. x->y could be anything. x->y->z->a->b->c
--
2.39.5
next prev parent reply other threads:[~2024-10-17 15:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 15:48 [PATCH 0/2] Fix typos Andrew Kreimer
2024-10-17 15:48 ` Andrew Kreimer [this message]
2024-10-17 15:48 ` [PATCH 2/2] smatch: fix typos Andrew Kreimer
2024-10-17 19:25 ` Dan Carpenter
2024-10-18 9:50 ` Andrew Kreimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241017154835.3103-2-algonell@gmail.com \
--to=algonell@gmail.com \
--cc=smatch@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.