Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3337138imu; Sun, 11 Nov 2018 12:40:28 -0800 (PST) X-Google-Smtp-Source: AJdET5dN4Fz2FVw/28SNNVwPbgF/71/K2Bt6oU34DLtRZjbIUxhprwRMOGPZWBFtbaLYAkR4RjiY X-Received: by 2002:a17:902:846:: with SMTP id 64-v6mr13560117plk.70.1541968828208; Sun, 11 Nov 2018 12:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968828; cv=none; d=google.com; s=arc-20160816; b=xPie7lPGEEIeeUYnulUKDQ9YsUW11rU1DFosPiAVEkLVD5yYWvFyGFGS4ZU2BYxK2X JV81Zyxy3pwreWYst7+FmYOmsmGGXxlXfUxF9S1nTqAPJi/0p9vZt0DnRMzVpMq4G/3J DGostTwA4GSbO2FWclRiyb2AFimj0WbqSV216Tcm23zLFEajrSdmQQvw7WYigImnK9ZC UvD0op5OcUKuZVVn2W0cwoooyxz7lekbTGIh3Ess6a+luW3i8etB3DFcZgVnbkaTVH0j dC2H9hWxQJKmFc2NS/noltKFBHX0QxcPyITC2OHTnyM0YboGNqmUSqdZSA1lQopIxKUT PYyA== 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:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=dVBFqy/69JXTntJ04LR2bRM3GbOsPHMAr+mdjtWRL7U=; b=Ac0f6HTgyF/Ek4zR2ES6+7nQ5ZtOAeDFnpcEIUCe9huSTtiNXw9grGXfVO4JP1Hojv Trg1XvEgNpEunLsAsLq41Wgh7EyP8k45yMmaapSEr9z7vd9f7LGjdhPC3I1HqvkaTFSx 8FkMu/njE2WHjC+LWzCBzvvDNMwnW1v9atQoM4WwRQR4kLgXSDzh+g6AChwbrkd4GucV L0e5rgewxJTX+C2nCvPKXCbqELX4Hxs0985t7iqSYLJoRDROo1RTEDsmORT5HBL6FiT8 EpJD5Da7kE+CyyRk9JCDxg56wJO7FHSmbPP9DOU/dpToKe4RhADviH6HDDBvAllaXY/D X7wQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f39-v6si15988557plb.149.2018.11.11.12.40.12; Sun, 11 Nov 2018 12:40:28 -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; 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 S1730430AbeKLG30 (ORCPT + 99 others); Mon, 12 Nov 2018 01:29:26 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49510 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729974AbeKLFsH (ORCPT ); Mon, 12 Nov 2018 00:48:07 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsT-0000lG-CE; Sun, 11 Nov 2018 19:58:37 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsQ-0001UF-Gc; Sun, 11 Nov 2018 19:58:34 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Colin Ian King" , "Tejun Heo" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 093/366] libata: zpodd: make arrays cdb static, reduces object code size In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Colin Ian King commit 795ef788145ed2fa023efdf11e8d5d7bedc21462 upstream. Don't populate the arrays cdb on the stack, instead make them static. Makes the object code smaller by 230 bytes: Before: text data bss dec hex filename 3797 240 0 4037 fc5 drivers/ata/libata-zpodd.o After: text data bss dec hex filename 3407 400 0 3807 edf drivers/ata/libata-zpodd.o Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo Signed-off-by: Ben Hutchings --- drivers/ata/libata-zpodd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/ata/libata-zpodd.c +++ b/drivers/ata/libata-zpodd.c @@ -34,7 +34,7 @@ struct zpodd { static int eject_tray(struct ata_device *dev) { struct ata_taskfile tf; - const char cdb[] = { GPCMD_START_STOP_UNIT, + static const char cdb[] = { GPCMD_START_STOP_UNIT, 0, 0, 0, 0x02, /* LoEj */ 0, 0, 0, 0, 0, 0, 0, @@ -55,7 +55,7 @@ static enum odd_mech_type zpodd_get_mech unsigned int ret; struct rm_feature_desc *desc = (void *)(buf + 8); struct ata_taskfile tf; - char cdb[] = { GPCMD_GET_CONFIGURATION, + static const char cdb[] = { GPCMD_GET_CONFIGURATION, 2, /* only 1 feature descriptor requested */ 0, 3, /* 3, removable medium feature */ 0, 0, 0,/* reserved */