Received: by 10.223.185.116 with SMTP id b49csp5472248wrg; Tue, 27 Feb 2018 14:03:52 -0800 (PST) X-Google-Smtp-Source: AH8x227Q3X/FY8jVl2jD32Q2dvMhOuWQJuo8QJZgLOliMXMgOBYoTbHUHYX0sgDQqcnpmtqyyVSS X-Received: by 2002:a17:902:8bc3:: with SMTP id r3-v6mr15523328plo.450.1519769032077; Tue, 27 Feb 2018 14:03:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519769032; cv=none; d=google.com; s=arc-20160816; b=fCyci38hx3nREuYDgm+U1K/J4yS+EsO1gBFlHd7OjOkWxc91LYbUVxn4r7bHVrWsoa OGH4V5nxzslCStDqEYkwj3VEVLiUiS3q+h3MhIhW1vTnEMkIIkxgdJke1LxHuNujRxd6 HAkpgx7z/wdFAQsMt2y1N0CY5Wfg3kduIRQsCS4o/1ABz8nwclusCDIKrkD4ewo5As5p AlzmN2YLH/A8eUn5amFrRbCOQ++L35zOhcVNydMe9P6t20VMAw6LOtviqBi5pYX0YC13 cJT6Cunfeu4oxsxmDuEAzGlvZmfg8vt6ArJxuXKfxlfNVHnyn8gwp/8kQD72QvZnEAPG /MHA== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=9CmhbrbWOP5VvA70Bhl3eGGmXjhbQCThQSGSihqpn/Q=; b=zpk5Agl1KQMqTdrq011PnVPtdjbPwPxkEeigKNh/qFSv7Q6Lcl1Hcmg81uEy7ENkLO jYTYl4g7u6rARaZe8wucxMfu4G/MPoFkBsPJeuWLAMuT4nie6bsrY91y1IpI0w3MgOEo tXND9WrrthVwY8ib/ElKeVs5+9+jPDnIK7g+yBBi54xsbzF11ErJbK6lE1NYPluqg2xP d1f7wtRM/PYrqO/HuFKN9IDEE84AUeYTBGHWpHNnDqgAnp7koywEFCNvUw50o4UEVlaI RP/eZQb9+w/SzXrv0SbEVfuyz3d6nXLb2xDUK8uVeFPNpr7AaiOF1Vp8BkEroFrsN3sT iGRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=mhsIkie6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v124si84172pgb.652.2018.02.27.14.03.37; Tue, 27 Feb 2018 14:03:52 -0800 (PST) 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; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=mhsIkie6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbeB0WCp (ORCPT + 99 others); Tue, 27 Feb 2018 17:02:45 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:43255 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbeB0WCm (ORCPT ); Tue, 27 Feb 2018 17:02:42 -0500 Received: by mail-qt0-f196.google.com with SMTP id d26so489799qtk.10 for ; Tue, 27 Feb 2018 14:02:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9CmhbrbWOP5VvA70Bhl3eGGmXjhbQCThQSGSihqpn/Q=; b=mhsIkie6ks8bblEe0nvejUI5/JJa+fRXg9g2tgo0YtUD8oCl8L6gLFQIP6NhPTb/C/ LeBL6CfDwlHvQkwdrsCKTdyc2rb4oYF20PVztUmXh2Hlgh7LzSZu5W6zgaUO9Lu9ww+P aai0RIYnO4xEYxRL+g187bN2YdtIeHEXBvX5k150GRwtm87rd48SMicAgfRGkC+LtPSN SRcguAL4AL5Ko/MynYLoRwPwUShyPYH8pmYB3fcTvobAZZjOqfuB/aXJsszWAMDvZF25 k7vnDy0JEjDKO+AYYHW7ibwNPuqBTeZjwCXRnzsHX+4NPugqN/iOgXtkSszehSNemPSD G9ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9CmhbrbWOP5VvA70Bhl3eGGmXjhbQCThQSGSihqpn/Q=; b=idGejbT+6wAuhUE+9cVoOg38Y82E4L///lyGIl6Fp5LyU67lTd7RRWzJBjTA1fbsvy UhYyh4oTLe7shHasEK+Pdv4H1BFRXdULUqQQPn14Y3bmigpHE/sYwffyqPDJPKgwP8P/ rXuIfl3h5gbLLQKxkPzxwPGbCX/8OlEEjqL+rbWdONxgUa8vu9j+FBUSBWceI3vUJ1k+ 229K8KvQqo8X+8pz8uWVN5yP2R4sQYSe+QxrUVNaYa+iaDfjvqHZfFCe5FML7rI9MMrj Ranyzco+JOPNKYwWHVsHNlqi+T9MTEyfFPfu0iN/5MDuRZhSKPkgGcqadbwYQoKoUoT7 t8eQ== X-Gm-Message-State: APf1xPB3ZB0kY9DxC3LoklLetfr0oBB0K6p2po0lOM49I/X4MDh0kgTJ kZffPKwBOhgtCd7SMfvvo7eaGg== X-Received: by 10.200.63.123 with SMTP id w56mr26200914qtk.318.1519768961795; Tue, 27 Feb 2018 14:02:41 -0800 (PST) Received: from hlaptop.cpe.express.com.ar ([200.3.222.253]) by smtp.gmail.com with ESMTPSA id g124sm116514qkb.67.2018.02.27.14.02.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 14:02:41 -0800 (PST) From: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= To: herbert@gondor.apana.org.au, davem@davemloft.net, hernan@vanguardiasur.com.ar, steven.lin1@broadcom.com, arvind.yadav.cs@gmail.com, colin.king@canonical.com, raveendra.padasalagi@broadcom.com, ray.jui@broadcom.com, scott.branden@broadcom.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] crypto: bcm: Constify variables in spu2.c Date: Tue, 27 Feb 2018 19:01:28 -0300 Message-Id: <1519768888-19866-4-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519768888-19866-1-git-send-email-hernan@vanguardiasur.com.ar> References: <1519768888-19866-1-git-send-email-hernan@vanguardiasur.com.ar> 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 Note: This is compile only tested. Variables constified: *spu2_cipher_type_names *spu2_hash_mode_names *spu2_cipher_mode_names *spu2_hash_type_names Constifying and declaring as static saves 160 bytes. add/remove: 0/4 grow/shrink: 0/0 up/down: 0/-160 (-160) Function old new delta spu2_cipher_type_names 24 - -24 spu2_hash_mode_names 32 - -32 spu2_cipher_mode_names 32 - -32 spu2_hash_type_names 72 - -72 Total: Before=9185236, After=9185076, chg -0.00% Signed-off-by: HernĂ¡n Gonzalez --- drivers/crypto/bcm/spu2.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c index bf7ac62..fcf3885 100644 --- a/drivers/crypto/bcm/spu2.c +++ b/drivers/crypto/bcm/spu2.c @@ -49,22 +49,22 @@ enum spu2_proto_sel { SPU2_DTLS_AEAD = 10 }; -char *spu2_cipher_type_names[] = { "None", "AES128", "AES192", "AES256", - "DES", "3DES" +static char * const spu2_cipher_type_names[] = { "None", "AES128", "AES192", + "AES256", "DES", "3DES" }; -char *spu2_cipher_mode_names[] = { "ECB", "CBC", "CTR", "CFB", "OFB", "XTS", - "CCM", "GCM" +static char * const spu2_cipher_mode_names[] = { "ECB", "CBC", "CTR", "CFB", + "OFB", "XTS", "CCM", "GCM" }; -char *spu2_hash_type_names[] = { "None", "AES128", "AES192", "AES256", - "Reserved", "Reserved", "MD5", "SHA1", "SHA224", "SHA256", "SHA384", - "SHA512", "SHA512/224", "SHA512/256", "SHA3-224", "SHA3-256", +static char * const spu2_hash_type_names[] = { "None", "AES128", "AES192", + "AES256", "Reserved", "Reserved", "MD5", "SHA1", "SHA224", "SHA256", + "SHA384", "SHA512", "SHA512/224", "SHA512/256", "SHA3-224", "SHA3-256", "SHA3-384", "SHA3-512" }; -char *spu2_hash_mode_names[] = { "CMAC", "CBC-MAC", "XCBC-MAC", "HMAC", - "Rabin", "CCM", "GCM", "Reserved" +static char * const spu2_hash_mode_names[] = { "CMAC", "CBC-MAC", "XCBC-MAC", + "HMAC", "Rabin", "CCM", "GCM", "Reserved" }; static char *spu2_ciph_type_name(enum spu2_cipher_type cipher_type) -- 2.7.4