Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2223526ybv; Fri, 14 Feb 2020 14:03:58 -0800 (PST) X-Google-Smtp-Source: APXvYqx59wZx7mLHZdcgpJDxLpKK36CCsNAA22PjEwACkPySpO49VNzuqZAKUH+7pzj9idGR7YUj X-Received: by 2002:a9d:6251:: with SMTP id i17mr4065069otk.14.1581717837978; Fri, 14 Feb 2020 14:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581717837; cv=none; d=google.com; s=arc-20160816; b=zUKjPLvpxrQEB9Qw4U6YhyvqC8t2Wd7gMObhLC+yso42CnrOajjT3ur4pw6/U3PQwf oPv/LMu04qKX6G212etxbW6vkIrVVNSI0wDQkSQmPyT6W2P7dJAt4kSVX8JQhhUvntET bB+Uvc5/2LboCazRE7VFVwl7BfslH/9OsTZv0iBa7XrF42OUQ0wbX4w19+qaXrlc0IFJ uoYIHe3ywmqu8NW0abRFDuOrp/rFHETCowipF4mtUgVf407Sl7zL/7Q4o6EcnEI5HVGJ 8T3gdM9IKNZPsmBa4mZ3ICmt98QJB4YFuX2U2CoXaWiYxf+7ORG092VqL84eIdYOy7KR 7LzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=7DU4Wy+14Oj+GFXKUL2gVVkMfUv0Kt9hQXX6TFmtrGY=; b=JacIU8W7dyLWL84yPXgn9MGFQr8kJwladTu/BdwQ5Le1Ofk/O8Yddfz1cNlkV1JlCL gU8ITQMmG65EOCMKBmxKV8uDU8BmXTkgHYgeRajEhLQaqX5CQLOn/7Yz5/qmI5HupB6A N21J8JNjb43lywq7HjyOLAbZ9uTm4pmKxmGNlMNGcbcSGq5C8TEz4cQIMwH4i15CNTz3 h0X73Np/LANPuVFr/cxHLLN2bqkIrIKRZRpmyL7ijzM61n4Ba8BsaK6SsgUsnT2dDbhK ulCMy4TPs7HLWOoebKJyy0TfmYo5pT7KPiwUAVMlPR/3oYlLfQv3WK8pH++ls8k0QfQh p/Fg== 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 v24si3430531otn.125.2020.02.14.14.03.45; Fri, 14 Feb 2020 14:03:57 -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 S1725991AbgBNWBc (ORCPT + 99 others); Fri, 14 Feb 2020 17:01:32 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:40180 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726099AbgBNWBN (ORCPT ); Fri, 14 Feb 2020 17:01:13 -0500 Received: (qmail 7837 invoked by uid 2102); 14 Feb 2020 17:01:11 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 14 Feb 2020 17:01:11 -0500 Date: Fri, 14 Feb 2020 17:01:11 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Joe Perches cc: Greg Kroah-Hartman , , , linux-kernel Subject: Re: [PATCH] usb-storage: Use const to reduce object data size In-Reply-To: <60559197a1af9e0af7f329cc3427989e5756846f.camel@perches.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Feb 2020, Joe Perches wrote: > Make structs const to reduce data size ~20KB. > > Change function arguments and prototypes as necessary to compile. > > $ size (x86-64 defconfig pre) > text data bss dec hex filename > 12281 10948 480 23709 5c9d ./drivers/usb/storage/usb.o > 111 10528 8 10647 2997 ./drivers/usb/storage/usual-tables.o > > $ size (x86-64 defconfig post) > text data bss dec hex filename > 22809 420 480 23709 5c9d drivers/usb/storage/usb.o > 10551 0 0 10551 2937 drivers/usb/storage/usual-tables.o > > Signed-off-by: Joe Perches > --- > > compile tested only > > drivers/usb/storage/usb.c | 10 +++++----- > drivers/usb/storage/usb.h | 5 +++-- > drivers/usb/storage/usual-tables.c | 6 +++--- > include/linux/usb_usual.h | 2 +- > 4 files changed, 12 insertions(+), 11 deletions(-) It all looks quite reasonable. Acked-by: Alan Stern Alan Stern