Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8758194rwb; Tue, 13 Dec 2022 10:03:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GdrzB8q5K5HkL1R+P1asyLPEMm0zLTlGtfPOqRnyFs4GLCv2nGqxCerJhcCMzSFjBYXu8 X-Received: by 2002:a17:906:fcd9:b0:7c0:9bc2:a7f1 with SMTP id qx25-20020a170906fcd900b007c09bc2a7f1mr18416596ejb.34.1670954598163; Tue, 13 Dec 2022 10:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670954598; cv=none; d=google.com; s=arc-20160816; b=HlcgGgXbcG9tG7plThKAQknGQFkEu5L+bPuySl/vmzPIZSfXeCbbET8aJmyuborjp1 xTN8XsW2ZlPlL25HhHHRcX3vPlmZ2j+LVnGgTZXDbV751GfNiWl0eYtCutHO9HG6LtpG soaQJybEC0ab+sk08JuyDvi4hzSKVZR7DISTcbA8kMIm35/q6o23GqNWF3nRzxH3BSk4 AynYkY1KIznEpSIMD7N9u0a3FIE8TexEj63M6KFCFtiNlA47QaKqksq1ABsPJjgTIhfs 8FxktwWYVwMeS1CKus3QeUYxL41+BSl+X5ZjOXCO+UYQqfX59Hi4AUkn/EssdTHNeRxr Ltjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=z0omR0ISWAA4du1XKL80E5Cf5YbDXbqPmELEAXHKvQo=; b=m/j1ctTY7HEnqAsmvoxXmIgO+SZVZ5aUe+UVz/2se+DKcpDQIVfk/vG+eCkYa0G9tK 1MWSWmX6TbUoDGb/QEb09J0ZdWQjMQSWH+G886IclS9LCzRaim8egQyRmbfggkekQowA etk+26NhstrYPMmpHjaxhHV1LGOwmw4zKvodQs1XQpHFrptm2k6BvsPX5F/B8V/XTk+o QfELTW+WneGACvRWpH25a4ljx4s9aSQ+YjK6EICeuokmm4cJ3fn0mo8nufuakGmTThkj lBzGo1sx4lG+8vMRm7lALJx1hmDfqsC1widwW6/Bz2zNkjow5gM0sM8IbYrsBaRj2B/Y hZcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=oEeJCQRT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a508705000000b0046dbb06d8b3si9104847edb.65.2022.12.13.10.02.58; Tue, 13 Dec 2022 10:03:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=oEeJCQRT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236334AbiLMRpa (ORCPT + 72 others); Tue, 13 Dec 2022 12:45:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236320AbiLMRp3 (ORCPT ); Tue, 13 Dec 2022 12:45:29 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA743205F5; Tue, 13 Dec 2022 09:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=z0omR0ISWAA4du1XKL80E5Cf5YbDXbqPmELEAXHKvQo=; b=oEeJCQRTr3YsEUk4WlvGuWYrWO MmgYaL2cPSShnoGVDBLrFUmnaAJapVRvgMNLCrsoAysmkulQQV4JNQduZVticVd/l67BlfPCFan9k f1+BrhK5ZSCAnpthmveiFJ98zTsYarYTTx0k/YplqYLnItSSIKOaEDd8YVlNZYwaj3svQY+v4oWSD U7NRAB78y4u6BCMR4ymIphcrEeh8QShAKSOyxoCfl7Ossfcyr0FzXNe4kjTXAep8YvaEV1g7MJaDg riGz3On3drqZLxqx99C5PN6peFFhyj0WB08lrEgaWCAZC0CoH6w4f/xDLKcHvhVD8/Y4g4pEAnYPT 669iiaiA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35696) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p59LJ-0007QC-0d; Tue, 13 Dec 2022 17:45:25 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1p59LH-0006d0-Vw; Tue, 13 Dec 2022 17:45:23 +0000 Date: Tue, 13 Dec 2022 17:45:23 +0000 From: "Russell King (Oracle)" To: "Seija K." Cc: Stefano Stabellini , Thomas Bogendoerfer , Chris Zankel , Max Filippov , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org Subject: Re: [PATCH] arch: change variable types to match those of what is assigned to them Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 13, 2022 at 12:35:35PM -0500, Seija K. wrote: > There are many places where "int len = strlen(foo);" is written, just > for len to be passed as a parameter of size_t. This causes truncation > and then expansion back from int to size_t. Not to mention this is > poor logic and needless truncations can add extra unneeded > instructions. > > This patch aims to fix the worst offenders. I suggested to test _not_ on the mailing lists, because it adds unnecessary noise - and remember that your email needlessly gets sent to thousands of recipients. Yet again, the patch is mangled, but is better than the last one. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!