Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1142816ybp; Wed, 9 Oct 2019 09:23:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAW/KdicBVkSmCuyJUfUaaxckAHSRnqHv5ZF+XJIw/wem8UdpNwNRiZqX0ltZGiqYX+JPE X-Received: by 2002:a17:906:4d5a:: with SMTP id b26mr3650060ejv.157.1570638189259; Wed, 09 Oct 2019 09:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570638189; cv=none; d=google.com; s=arc-20160816; b=DobnKzdE2N1RKUKE9g+JNz16IUMtBu1t8tMa1Hvqrz6jPBNDd2XM4oVi3k8HrLtRJF S3XAs20vcQIRsALRsktI23yN4F86jpVCXNhUdLJYtlRDms9ua8FTOivlSNCvxuRs389d Dpe7Mjo+wAn+Tegu8uBeI7WTv735Dh6IjpLNQmd+nj+3T8Z1RrL/E8iz96z2kNU61QWv ijqrM8DXOB0mMTbEUbtbMj6723rzEbhRBd3gAvAnHE0c1w6s1KfPuJpZGuX8sX+rm/c/ L5uLVYdNhFmMJpU3iOOKZVWo/8Rsi3zSANezobjDmaPildqs6b/8WIT9u1WjY3mfHJQK uTjg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IUUKEe0zhlcZFtagTSvrUaS/BWmjpqqusKCPMPNT3Lg=; b=gBFpdE6j3DG469ZXY9gVWGFFHh+USSq41sO++hedElQjG+glL4x9wMuoOy5PVnKvv7 3+/re5RvesTx0HYEbxaC/DR6ExwykfwMBkabWcs8NpBuJ+e/QqpPQw5+YBCHQJpAfDft i44eL/wL25EArTn1pokLBu8cP2quexCdBkQrepkh79DqFoE2+ZaIiLbDzWoZGhRk9m79 BcgzLwFWvkX5epi0hoG4HzLyvfdBeCaFR3iQq5Lrgc7hHQJf1QRbN4NjZYaA8h0fwsBQ UkYYkhuRp4cUFCm2DlH/EgKSeB07c3lybb9n4VDWaWxkkvYYNIXMNJQq669YKWDv2g05 lrqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cxALGUnx; 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 w8si1591876edq.391.2019.10.09.09.22.45; Wed, 09 Oct 2019 09:23:09 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cxALGUnx; 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 S1731719AbfJIQWa (ORCPT + 99 others); Wed, 9 Oct 2019 12:22:30 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:42711 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729644AbfJIQW3 (ORCPT ); Wed, 9 Oct 2019 12:22:29 -0400 Received: by mail-oi1-f194.google.com with SMTP id i185so2251553oif.9 for ; Wed, 09 Oct 2019 09:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IUUKEe0zhlcZFtagTSvrUaS/BWmjpqqusKCPMPNT3Lg=; b=cxALGUnxRvrQGDezHD9t6ZPKJl+Ssz7AIhSQxFiBfK59tSQ66omb3puTw8ObHhW08e 1OuwuqX/8B/WoHg54T7F4hRL2wDKdnNX5V/0X6CQaJnnB6es3GOlfEGAYioVI98V19og OzvDrJwvnoLmfKcURJnZ/RecO6dEpeHYwssrD0pZPbifGbH0RlVaC6m3ppv+ZFMiIkaS d5ezpvYSSBxjOnw6SwYgvZ80RRGaitAhRHc3uKS7fckn0oXZ4mLg5GmMAQvgwggERSMh rZD3dN/ltEJcpPwIjlSvv8Kw2zB6zwpqnxrtl+PgJ2mk7CTH+uP9+Q9X9vL4TDQ7O88U ll4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IUUKEe0zhlcZFtagTSvrUaS/BWmjpqqusKCPMPNT3Lg=; b=c+q9pDg9rQeaOZYk2TFH0WBAB3bdu5Ia+rCVuXcONGjF7qdl/XUoZ78+lM3HbVVmt+ J/UHOKFN7EsyIi8H/5Fi9qQsooMhkiUuZIQd71nbsOoZh0yGVQ4yM+XgObra/B86LVDY U2e90k9OTgIGCG3A7arVm7CEWlkeLRBYbe6TiNlJZRPTTQah0it/6gIw4GyOfoeUxbR4 gdxtBj27G10iLGPgkl7xj5N+b5l7Da21M9PGQYLwRUU+TWP2gXgwakVnAPNW8YPzASp+ ++gLntDzaxqAstVQM5NEFOT7ph0IOujONWN6PA9IcHtkzaVGiVnQHBjnaDA9MAjPEsWF TyCw== X-Gm-Message-State: APjAAAVgo2Rtb3Ku8k4Yvye5ISDPDZJthJiL2U40BUSL7GH8GQUOHEtv GYsMtsZyxIzCTLQbXUjpG9oBaLdsiysA+hNv3afd+g== X-Received: by 2002:aca:5c06:: with SMTP id q6mr3225521oib.175.1570638147577; Wed, 09 Oct 2019 09:22:27 -0700 (PDT) MIME-Version: 1.0 References: <20191006144256.23733-1-colin.king@canonical.com> <20191006150759.GA68457@icarus> In-Reply-To: <20191006150759.GA68457@icarus> From: Bartosz Golaszewski Date: Wed, 9 Oct 2019 18:22:16 +0200 Message-ID: Subject: Re: [PATCH] gpio: 104-idi-48e: make array register_offset static, makes object smaller To: William Breathitt Gray Cc: Colin King , Linus Walleij , linux-gpio , kernel-janitors@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org niedz., 6 pa=C5=BA 2019 o 17:08 William Breathitt Gray napisa=C5=82(a): > > On Sun, Oct 06, 2019 at 03:42:56PM +0100, Colin King wrote: > > From: Colin Ian King > > > > Don't populate the array register_offset on the stack but instead make = it > > static. Makes the object code smaller by 63 bytes. Also add the int ty= pe > > specifier to clean up a checkpatch warning. > > > > Before: > > text data bss dec hex filename > > 9212 5712 1408 16332 3fcc drivers/gpio/gpio-104-idi= -48.o > > > > After: > > text data bss dec hex filename > > 9085 5776 1408 16269 3f8d drivers/gpio/gpio-104-idi= -48.o > > > > (gcc version 9.2.1, amd64) > > > > Signed-off-by: Colin Ian King > > --- > > drivers/gpio/gpio-104-idi-48.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpio/gpio-104-idi-48.c b/drivers/gpio/gpio-104-idi= -48.c > > index ff53887bdaa8..c95c93ec0bd7 100644 > > --- a/drivers/gpio/gpio-104-idi-48.c > > +++ b/drivers/gpio/gpio-104-idi-48.c > > @@ -65,7 +65,7 @@ static int idi_48_gpio_get(struct gpio_chip *chip, un= signed offset) > > { > > struct idi_48_gpio *const idi48gpio =3D gpiochip_get_data(chip); > > unsigned i; > > - const unsigned register_offset[6] =3D { 0, 1, 2, 4, 5, 6 }; > > + static const unsigned int register_offset[6] =3D { 0, 1, 2, 4, 5,= 6 }; > > unsigned base_offset; > > unsigned mask; > > > > -- > > 2.20.1 > > Acked-by: William Breathitt Gray Applied for next. Bart