Received: by 10.192.165.148 with SMTP id m20csp64972imm; Thu, 26 Apr 2018 16:04:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp1duwZXLRPmyq3xAGUIcmXOS8NqT2oQVc7ngHcCZQaoj9rkjkPuZsqGuThs+O46IkjeLyP X-Received: by 10.99.0.86 with SMTP id 83mr6338901pga.29.1524783878776; Thu, 26 Apr 2018 16:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524783878; cv=none; d=google.com; s=arc-20160816; b=zIbTg+N0Ur4+v2zijUpJ9WnnsZfBzDFDyZCEF1V5uLxbFvqij144jyyX8gsjWLteqc 1KQtBXGcvedTg1/VANq7lXiYLfNE8cb0VkDic0v1NKha0HVKrx6JRcvDr6sbx6eq8e+/ BGUPQwvprLEF/8sqf4R9Q1Ot3JICasxTqnh5ZHfK8T0VGvetXhMIFGn91nnrCoa8ENd7 2RII04VbTJ+Rhbz2URItjaA32wMVPprWIGzQJZMv0dQNOc7LtiOJxDXzXTZZTFeuFfm2 4WT+hZldibp8RajJ7VF2fDQBIurcDiLjXYRgvAyUQzP+YScsYvismJzl0Xph0DQEpszd 72BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=MAY02PBlH5rxbWku28x07Yiga8cldTOgvQLM4JYIbZI=; b=i0xUK/RlFu8BcrH0r9oz4+q4FfkQ3XZAXSxwY8olLUgj3klR945HbRwVM8FhDCntA3 9ej1VNvp7qHcwhivOeo6Vb+9ZYDvn0R+lmF3ZsMVX01WWwaEs1jSsIqU/PEcD0HwWTSj sK8a84HE1lNqrG6PLm5vsunIaOWIJwMS02Ik0FSaEKp4E7/e7DTgZ9ZQVzIOh+qCmf45 YarCv8dtv1XG3FbpMuYhpGbP65Ms/EkWPQiKSrAb72rYkDRbdGcr3Kjv/1FhnyGqnsj3 84fXD9rMZZeNaLC2ZXE8Dbodr6qxe79O+9oTX19zvwEaxKUFwik94einUW+mNxTIhQln Obcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i8JRuZYo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si16834607pge.559.2018.04.26.16.04.24; Thu, 26 Apr 2018 16:04: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; dkim=pass header.i=@linaro.org header.s=google header.b=i8JRuZYo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756641AbeDZXDP (ORCPT + 99 others); Thu, 26 Apr 2018 19:03:15 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:43250 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754336AbeDZXDN (ORCPT ); Thu, 26 Apr 2018 19:03:13 -0400 Received: by mail-io0-f196.google.com with SMTP id t23-v6so402300ioc.10 for ; Thu, 26 Apr 2018 16:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MAY02PBlH5rxbWku28x07Yiga8cldTOgvQLM4JYIbZI=; b=i8JRuZYoaECG1nM9iIcHaNml2bhBuyR7f1pTULzCsSFHcr9d2IegDQLhOW+Sv+q12R 6iHmOcKbwotbKigT3PWW1V8Ua2PeYQK4ipNjIFxtdczLfJrtmIrRf2KKDAe/EmYJjAo2 cRXKZSAb/EJTNTKCyQSz+JtgZACIxJc0MBBKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MAY02PBlH5rxbWku28x07Yiga8cldTOgvQLM4JYIbZI=; b=DWjavfHGEiOXZuA06FkiV/hF7TLHHX+BCDVD+VphRvAh+q1wMjE8HZDXsyhmbYSunZ R4aJGmeBMJdgOXIbQq53fMkDOypbIYQzwigMVI1JScrybPs/tjJ2oxBEN9JDQ3b1ofgD /5E2RaYFNjh24ApYpdybFu9i/OaiQgAguT0OKPK6Lg62UpkjDSYvBmMYXAgXN1zgIu0S /R+37NMX41myUoB/lT3V02WMWBdDJH6xuJlpSmVz3pHP4Q/IuBgYDd8a+n4I3ym3DLSu SY4G7srLb6OISnz30AxIaxqzUSru5Jiqih7s4kSOD77FG1PTJV5TRCPO1LR7B4SAJwgy UYmQ== X-Gm-Message-State: ALQs6tDajTDT1+yvD2nd5HcfUqoxNdiDQmz67TKC9IvAZs3wovj1myBa SQukjQpAW4h93HiMQLxLzrBr7SqEvB65hFWtdaZWRg== X-Received: by 2002:a6b:248e:: with SMTP id k136-v6mr34862787iok.270.1524783793060; Thu, 26 Apr 2018 16:03:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:2793:0:0:0:0:0 with HTTP; Thu, 26 Apr 2018 16:03:12 -0700 (PDT) In-Reply-To: <20180418172634.14734-1-colin.king@canonical.com> References: <20180418172634.14734-1-colin.king@canonical.com> From: Linus Walleij Date: Fri, 27 Apr 2018 01:03:12 +0200 Message-ID: Subject: Re: [PATCH] gpio: make several const arrays static, shrinks object size To: Colin King Cc: William Breathitt Gray , "open list:GPIO SUBSYSTEM" , kernel-janitors@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 7:26 PM, Colin King wrote: > From: Colin Ian King > > Don't populate the const read-only arrays 'port' on the stack but > instead make them static. Makes the object code smaller: > > Before: > text data bss dec hex filename > 8542 4088 672 13302 33f6 drivers/gpio/gpio-gpio-mm.o > 10959 4952 832 16743 4167 drivers/gpio/gpio-104-dio-48e.o > 9022 5064 1408 15494 3c86 drivers/gpio/gpio-104-idi-48.o > > After: > text data bss dec hex filename > 8372 4144 672 13188 3384 drivers/gpio/gpio-gpio-mm.o > 10790 5008 832 16630 40f6 drivers/gpio/gpio-104-dio-48e.o > 8853 5152 1408 15413 3c35 linux/drivers/gpio/gpio-104-idi-48.o > > (gcc version 7.2.0 x86_64) > > Signed-off-by: Colin Ian King I had already applied some part of the patch. Dropped patches to one file for this reason. Please check the result. Patch applied! Yours, Linus Walleij