Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1350374lqh; Mon, 6 May 2024 05:23:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyfUmxC65ZACIu/S1nayD9ZONjrflkBHgtnbj2Q8td7/P12ZcmCXirdAUCAb4ueqHKjbNRzc2M1wb16d/XHYbYzdIulHcbdMz501FkTg== X-Google-Smtp-Source: AGHT+IFmPEmdB6iqM7Fq933Z7oBZUFOgw8Mx+Pr14MPxsBWYfHOkXsILwT3/IwnhiJBqfk8ZVNqf X-Received: by 2002:a05:6214:4015:b0:6a0:a4db:b297 with SMTP id kd21-20020a056214401500b006a0a4dbb297mr17615344qvb.23.1714998213044; Mon, 06 May 2024 05:23:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714998213; cv=pass; d=google.com; s=arc-20160816; b=q0wwOaHNV0vWX7493V91c0+D4o0HAu3qAuEoPUdfFL0WbSFJBOqgB95kK9+OLbKyQ+ ZlAf9wi2qcHKZTaE+w1viSdcNIHl1hy06sE1vOsf3tLSiUE1phCq1i/Vq1E1W8dJ3Kkn W0NuakrpNy/pN36+m5J3PRlkRCJ+P1HP35Xw5vwxCsXGdBWqF4ww/2zU+Hg+dCH3kPD1 tnDisWiKsMxsYQ1WM7Vwcoc/HttGNLvVkgTS4CXtnzvyLGf0AH20wNPdke5Xzga15LN2 NmXmyJCbunipQAm0/I3qj9xtBEmIbhr4eYp44T3sPoHZW0KE5IqBjnQuPa3pQuUdGTNa m0ug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=6EJVQ+wMxEHRL14RVOpH9mV9WNJQFrNy5pxAip0Pyy8=; fh=VImTCCj3xKDfhmMweIBbGFgwGGQfOOXnS8KXLB1O0Wc=; b=NVIfGHzSnV0y/6ZEViq+dOLGsZKxcbdncWWrO3db/ybxlEvwOjENSuX4TCPXRJqD7o sn2IYeKaSlKYX3VEhtCea0RC6buhGqWKNYIY38tQE5R1PzZTfVfTRfKgxwOOCaGB0+1E ozqjtzpcjurRVKx25yBsiF3l1H7aSHye7laHDMRs+DFNYC8Nf6PI7SZ+Td9cCznWGWKE JCCYn05VtB12q4/WVRxVXoT23suZEBY/vv+28u/WFhxcuqXx83I5k74Ny0wPDRxWQ1Ld LrcgrvZxUG5DhxX9Enh2lCXrqQ4f+o3XxShxFJrNR6RJxUyigAIbf1afZZFIjDzIaic5 jGyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=2wHWU+qJ; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-169797-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c2-20020a056214224200b006a0d099c1e6si9107961qvc.553.2024.05.06.05.23.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 05:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169797-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=2wHWU+qJ; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-169797-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BF1371C234CF for ; Mon, 6 May 2024 12:23:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0931143C48; Mon, 6 May 2024 12:23:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="2wHWU+qJ" Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DACEE143899 for ; Mon, 6 May 2024 12:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.182.106 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714998207; cv=none; b=DXCaeUiw2OJ0sZR/VpuzaT3ywOYRnjdDrLF4DengX4Ht8tuuwd9PxheEZrolccw1Wy72nX4wYyDc+M00JjNcz7kaIXfHEl8XH7Nr8vo9VdIuQcp84on+HoiBPyxCGhzjb2KHaEG3odQFyEoiCod5aI1YJGH0onUcZedplOzSDzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714998207; c=relaxed/simple; bh=CeBSZCyIULZ4lID6ixB6Atv3O7cFtl+byeqy/usUoJA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=hXnbJbcgYPn9eCF6YLw0JZZlIXD1/R4roBmkEK8DiesZXj63hDNR7tn/TyHoih4m9JSEz2cRAruE5s7C01GFOaxqje46jmK/OxL6bmdJ88QK6km+XNedsJXpmoSAKuB6bCqBCsF0u2XhDSbnwX9/boDbr4UlX/geZKLjD9LxxnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=2wHWU+qJ; arc=none smtp.client-ip=185.132.182.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4468VNBQ032357; Mon, 6 May 2024 14:07:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= selector1; bh=6EJVQ+wMxEHRL14RVOpH9mV9WNJQFrNy5pxAip0Pyy8=; b=2w HWU+qJMRg1YngPQfOl2Y2ECz9cKoNqJYUwSlTSND6V/PbTOT0MsrXLeTeu4HssOT wasRDCloTdPyC97jZm9AFjC/JtAnmD481ohyP5/jZjH01hwzyOlLb2zXsnSAVjTU VjEY5x7+x3IiEegYTgUQXLsQfq0YN0e6zYGPWQGrzh9eUb65Pa8ebxy1BykX7ryc 1YzhT/l/BocGomvLB8ulcKVxEq2bzszRDKlm1TlhLzBaJJgT4nEqYEgJOdQa53y2 WltLcY8euLHAX704v+gmlpwXXgrScCrwqzpJodRmLLxwJrGx5p8BhdZ6PVlE7IdM 6cNahAQMf6Lxhx//AUsg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3xwcbx6qg5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 14:07:47 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 52CF64002D; Mon, 6 May 2024 14:07:42 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4895B21A239; Mon, 6 May 2024 14:07:11 +0200 (CEST) Received: from [10.48.86.107] (10.48.86.107) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 6 May 2024 14:07:08 +0200 Message-ID: <02e9e9c5-449a-48ae-88a7-0483895cd4bf@foss.st.com> Date: Mon, 6 May 2024 14:07:07 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] checkpatch: use utf-8 match for spell checking To: Antonio Borneo , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn CC: , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , References: <20231212094310.3633-1-antonio.borneo@foss.st.com> <20240102161038.22347-1-antonio.borneo@foss.st.com> Content-Language: en-US From: Clement LE GOFFIC In-Reply-To: <20240102161038.22347-1-antonio.borneo@foss.st.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_07,2024-05-06_01,2023-05-22_02 Hello, A gentle reminder to review this patch. Best regards, Clément On 1/2/24 17:10, Antonio Borneo wrote: > The current code that checks for misspelling verifies, in a more > complex regex, if $rawline matches [^\w]($misspellings)[^\w] > > Being $rawline a byte-string, a utf-8 character in $rawline can > match the non-word-char [^\w]. > E.g.: > ./scripts/checkpatch.pl --git 81c2f059ab9 > WARNING: 'ment' may be misspelled - perhaps 'meant'? > #36: FILE: MAINTAINERS:14360: > +M: Clément Léger > ^^^^ > > Use a utf-8 version of $rawline for spell checking. > > Signed-off-by: Antonio Borneo > Reported-by: Clément Le Goffic > --- > Changes in v2: > - use $rawline_utf8 also in the while-loop's body; > - fix path of checkpatch in the commit message. > --- > scripts/checkpatch.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 25fdb7fda112..2d122d232c6d 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -3477,9 +3477,10 @@ sub process { > # Check for various typo / spelling mistakes > if (defined($misspellings) && > ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) { > - while ($rawline =~ /(?:^|[^\w\-'`])($misspellings)(?:[^\w\-'`]|$)/gi) { > + my $rawline_utf8 = decode("utf8", $rawline); > + while ($rawline_utf8 =~ /(?:^|[^\w\-'`])($misspellings)(?:[^\w\-'`]|$)/gi) { > my $typo = $1; > - my $blank = copy_spacing($rawline); > + my $blank = copy_spacing($rawline_utf8); > my $ptr = substr($blank, 0, $-[1]) . "^" x length($typo); > my $hereptr = "$hereline$ptr\n"; > my $typo_fix = $spelling_fix{lc($typo)}; > > base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86