Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1304435ybe; Fri, 6 Sep 2019 15:29:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpubA78DrmRlWe5QrfTrzUQm6GBsm2nTNkHasx227f5s/Ti5gTOMZD/OGe/+0eSi/jBqjj X-Received: by 2002:a62:2b46:: with SMTP id r67mr13942022pfr.140.1567808979034; Fri, 06 Sep 2019 15:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567808979; cv=none; d=google.com; s=arc-20160816; b=FL5vatwGoc4pS6xZONtHJq+npI6O186rDpvBoVXwNiTzFvbl6oiPfcJoQl7N8EUWiL Z5lU9+WruQLrBRBJfBgjUOYbpQpF6AVBcXYR687lJk31PaMj5iky8KEEBNcuw6L6GiOy DW0kUiau7VmgPTYvCc8JsOF26KUY3l7Eh0wql4tCkj2j+LfcwaXm+8CztTTbEeRCDj+l yQ7q/8QejOuSpdhPfYW7LWtR5yWNSpuuH3QgbSqld/eyJgR/baRqx0K+ciXgvuLJnBnb /22puKcwC1gzFMGvBvdKL36iwKyazB0FLJLre4ST23hpmCeJJ6c3BpZrCVEzuPovjpc9 O+nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=dGk8gOTHWHw5+0bIDo83bucrr9M5XJWPpvja2uN7s3c=; b=R5d+WRas3U6vm6Jk1XJ7Dr+9fGtYvdxHwxhccOF2kkTeysDyn5k8yxVNjfYKUnVJOX ELuA6dWAsGp4sJ5IRnMqwvFbpKN39OsuGv8dYDQ06df3QtryTX6q+tliZgPsfTUBM/0d lqv23Fl/lr2JMVgCGM0vCxalw+HXl0WdGdJmTsZlch2r3yspa+Gda0mg2ZJyN4TnKa4S U51cloCfQQu81B4x7KIQds7UWpbEtq73sZStRIGBYk4g1+Gl4LgpVtuhEwhy50EFLfSL KsD4+1tUDy9/YeORCCejy4DZnLu90NkOluPIA+LV4qRxA1Q5flY7S2lZS7drsOWTrXRd wUnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si5488212pgq.282.2019.09.06.15.29.23; Fri, 06 Sep 2019 15:29:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393837AbfIFN6J (ORCPT + 99 others); Fri, 6 Sep 2019 09:58:09 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:45101 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728978AbfIFN6J (ORCPT ); Fri, 6 Sep 2019 09:58:09 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1i6EkZ-0002vX-Dc; Fri, 06 Sep 2019 13:58:07 +0000 From: Colin King To: Gabriel Krisman Bertazi , linux-fsdevel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] unicode: make array 'token' static const, makes object smaller Date: Fri, 6 Sep 2019 14:58:07 +0100 Message-Id: <20190906135807.23152-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Don't populate the array 'token' on the stack but instead make it static const. Makes the object code smaller by 234 bytes. Before: text data bss dec hex filename 5371 272 0 5643 160b fs/unicode/utf8-core.o After: text data bss dec hex filename 5041 368 0 5409 1521 fs/unicode/utf8-core.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King --- fs/unicode/utf8-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c index 71ca4d047d65..2a878b739115 100644 --- a/fs/unicode/utf8-core.c +++ b/fs/unicode/utf8-core.c @@ -154,7 +154,7 @@ static int utf8_parse_version(const char *version, unsigned int *maj, { substring_t args[3]; char version_string[12]; - const struct match_token token[] = { + static const struct match_token token[] = { {1, "%d.%d.%d"}, {0, NULL} }; -- 2.20.1