From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F23F1DED4F for ; Thu, 17 Oct 2024 15:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729180125; cv=none; b=q3faTZ7C1h/TZ0gvu/ASgi81CByNG4NiuscTXgeZ9vLyIlYMhWkC4ECL0hPv5UrbF/py8J3lKw7l7iNgrm18IyS138acsOZ2B8e/Q6vdmKIZ4JwWvYinjk7YN+rJMJtUJJ7Z89AQTq04Cy9P9Vq1KnYvz9Om7gyispMEFy61gMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729180125; c=relaxed/simple; bh=G6gQQccbWBa6BQE/mGw0tBYX6m6W2Wjjb8Mhcbb7WPs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UH4SV9LV058BGxTQkH5kEqpICJXYl3ziXPLYbV6HVB+YwM7F4SoYuZsO7gbN+wpg3pLNmzS2nn7OzRSuLQZi5zOJjseKALghVHThXEdeaylzWYP4vb7HTO4RiO29RoOsr73JWkkvRSgUMG+8wn0EfGTaSY4PXkG1sMA22pB/fxE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gc9WoiRR; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gc9WoiRR" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-431548bd1b4so9999605e9.3 for ; Thu, 17 Oct 2024 08:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729180122; x=1729784922; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KPnnlqQ4PE5MwRm+D09LIqJA7KqgO9QdLYQJMtBcYNk=; b=gc9WoiRR7XAGLEhvjhwcVkuB0YLPbQEGUygbsaRjTerA6LivelgyZE8asyEinQHmZo zdHNmRSC/SXgIptO4MbiFafrA5rTd45v7Ubn5Pk8lBQIsqOVQOhDwlYSyKlO5AtNBxwx pyuTM9k6Sr74af13LGlBSKOyKn3IXfVAbSi6Fn/WjBcQrai1Ic7jYKeYGt0SeyhaXCmi 9wFOi1Ofa//ZQHvvCzHVdt004Q3fFZx1nmV8SjNZVsnTfJoYqjvrWP1weLrxdvxRE8YZ 5sxLKHoZdV5/4+bd/RLgzLf8yYkOdMZDZ7G1CCbySRlgEOqcAqGjszEE6ZIMjXn0cWkE v/tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729180122; x=1729784922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KPnnlqQ4PE5MwRm+D09LIqJA7KqgO9QdLYQJMtBcYNk=; b=pjRQ5011nWsm8K9GB5DeFoJjjp8r/wDuw6jsJhzxT0PhiibF4Y5etvGT93U+lOC8aS ictICI84VsmGJxH26cY5mCjGS4B4vFNvJi0UuPtKyBRfKXhIJb8RzskydbNI6bX3lklm eyCU0eXtQ1aw6+SUjfHDPiOX8sUF6yQy8EFAp0Tqoa1uA75sGoJcFm2fJ8YWi77IzdVg +A8H/VAaVlYduKrk+DPvvkEtQMbVx5qDr8nYUd+w7e8eagjp1DtqP42qxWecjm+25EUm DOhLjNfumrbYR2pmhza80ePxk9Q+TIWi8E6IhJc7NuVbl6ZB45GqRpIH/NpKC2baDAFS RlTA== X-Gm-Message-State: AOJu0YwWsx/QoC9TUPNHHP9mNXOBuWPNiBi7YWdJiikk6cL3OwHKhyEF fJsgn9s/DZwVLweNvm9TplqvJHC92sH8vYFnY5R5VdqGrI0hX6kwQVtgSg== X-Google-Smtp-Source: AGHT+IG4sUha6LRrXLvizBaiKoOZPyw1Z0mGIz1Bsq0LbckdnejG6OcT/XBP5FG48kIOfYqDkh7BUg== X-Received: by 2002:a5d:680b:0:b0:37d:3185:285f with SMTP id ffacd0b85a97d-37d5ffa58d3mr11949207f8f.54.1729180121238; Thu, 17 Oct 2024 08:48:41 -0700 (PDT) Received: from void.void ([141.226.9.185]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43158bce802sm30354675e9.0.2024.10.17.08.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 08:48:41 -0700 (PDT) From: Andrew Kreimer To: smatch@vger.kernel.org Cc: Andrew Kreimer Subject: [PATCH 1/2] smatch: fix typos Date: Thu, 17 Oct 2024 18:48:34 +0300 Message-Id: <20241017154835.3103-2-algonell@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241017154835.3103-1-algonell@gmail.com> References: <20241017154835.3103-1-algonell@gmail.com> Precedence: bulk X-Mailing-List: smatch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix typos in documentation, comments, etc. Via codespell. Signed-off-by: Andrew Kreimer --- smatch_annotate.c | 4 ++-- smatch_comparison.c | 2 +- smatch_extra.c | 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; diff --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