Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3262074ybp; Sun, 6 Oct 2019 08:09:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOiSrPZ1+JEthhg5OVM/OeQvhpkICkLdj+NM1yfkCOHO8hB2SJuijrMIxw1vpB+ifRBzOA X-Received: by 2002:a17:906:4bc3:: with SMTP id x3mr20138104ejv.200.1570374555037; Sun, 06 Oct 2019 08:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570374555; cv=none; d=google.com; s=arc-20160816; b=0abdtKlQfGe4T5NDwjwOJ8jNcLO4T4YpnylrgX0BQtCxaHbUjAWrgkdz3y04LhsbqM wnvAOTVo1vY11QQyPwNZ4smKveFv8EJv7eBQVSulMyLRgYTKS9fIFA/OXRXmziv750tg S5zmHQvzMGjjwePM7avhgu8ln6o7dnnA/mZ6NNdn82/mTrSxjhYuYaNHzHFNLvClXjry 6PPg8J+LrUDfh7x/FSLKpy9Xk4CyKzGoyagMDK1qMFKaEF4Zi5FNo/hrmB/Z6kwuatlE xz2SLLsvmVyVsaLZxkHFLI5/F30Dcpo1HzFaW2CgquGgb3hXlAuO9KhvHB8UN+YWAi/b YWqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=L/3bXAMhH+NMl02E2HmiTYgs/jrbZvh1+VGy/pv/Uu4=; b=cy4YCUZ2K9yfftUsX+OghVp4puRvbxwBWSltrvnj07InHdKlEcOaIkzbu4bghKPH2V G12zC23PtZ+PGzUECfCc+M2P995WtdrNjsRblg6N+GSWYgrVBy7o8VtBkfEjwD902t6g GIhhwWJXNVgNlMb9myw+KaY8RQYVPopYGwBTvidErPMQQPC4vdsQVtdWZDqrKae2EU+T rHVnUypjEcoXd1pUrxtMkGOVkesGPvEVal2JIb0cO60T0SuSIJiN8Frav8iWVkdMfpy8 MdMuNt2W2CQAme9u6+DoSZZ61lvpcuOtQRx3OWosxiFoEF8avrkq2QlqEdZMGOyo0IsY Z3TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="A/HtZGNK"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si5847218ejt.155.2019.10.06.08.08.51; Sun, 06 Oct 2019 08:09:15 -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=@gmail.com header.s=20161025 header.b="A/HtZGNK"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbfJFPIS (ORCPT + 99 others); Sun, 6 Oct 2019 11:08:18 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:36934 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfJFPIR (ORCPT ); Sun, 6 Oct 2019 11:08:17 -0400 Received: by mail-yb1-f193.google.com with SMTP id z125so3816135ybc.4; Sun, 06 Oct 2019 08:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=L/3bXAMhH+NMl02E2HmiTYgs/jrbZvh1+VGy/pv/Uu4=; b=A/HtZGNKASObaRehA9OcjjBRSeAtpi4F6ziIrMchH412rKhTL5W4tpIP67/nHuQHV+ wuDfh7O5e93k8mliYn1n4egN/Dqze6p1uj6F6wGiugSR2mCc/N6UYqPfc0UN1HK3n5pr Ij6F98HGEIPfaR4eDaaQLEJt0lZYNcetImUDufl2JSc8k1NkaRM6HIA0ZyNutWrn6AZj O8DNe6nAFiiACTiOSnE2y/Psjg6vgfJV/5MU1dJc4gaYU98WEJw+1ZDnLozgubzHiHNe NjCamTQImaXeYe4WvTuAKMUG5+d2ny0JiQyq3/E/YlWMeVcb3eUis7Gk94CfCd8Epusv zgNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=L/3bXAMhH+NMl02E2HmiTYgs/jrbZvh1+VGy/pv/Uu4=; b=MQsFWTDo0l/TBCW/f/WBpHIkuFcvoSst24jLNNB38vrxcEIWHHfBFmeu0c5+Kuz86u eEUY41SWhSyfz9uyMB0zi8kAbqegsqdgYqxAWesz77+Sk4Gn9t9/GlrrnOuOheYm9TDk m53qKMBc14Ks7mjqwDEq8b3sr9EQMNRA5wlf2ZuuIcQ6cuK8ctU5QhrYP8YVCOCr7xGi Bl/EmwKZyJenD2Ski63KxgsLpXLeEUGv4R+G106Ir5JWhHZ4lCpnJPGbVO99gIAdBTvK nX8m1tfa6TvktUiMR62p/wkB64PhY37GPC00Kvl+1+TGZJ+Nwn2GG2wMpoNBg9VIeXLS EXHw== X-Gm-Message-State: APjAAAXpOPXHN/vdztTZRfHw/92KOS0xLniTS/iaHFng79fmRd/jqloU peDb3MCzsSyT6nGo5y1WGfQ= X-Received: by 2002:a25:f50c:: with SMTP id a12mr8635437ybe.354.1570374494329; Sun, 06 Oct 2019 08:08:14 -0700 (PDT) Received: from icarus (072-189-084-142.res.spectrum.com. [72.189.84.142]) by smtp.gmail.com with ESMTPSA id m20sm3069324ywd.97.2019.10.06.08.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Oct 2019 08:08:13 -0700 (PDT) Date: Sun, 6 Oct 2019 11:07:59 -0400 From: William Breathitt Gray To: Colin King Cc: Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: 104-idi-48e: make array register_offset static, makes object smaller Message-ID: <20191006150759.GA68457@icarus> References: <20191006144256.23733-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191006144256.23733-1-colin.king@canonical.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 type > 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, unsigned offset) > { > struct idi_48_gpio *const idi48gpio = gpiochip_get_data(chip); > unsigned i; > - const unsigned register_offset[6] = { 0, 1, 2, 4, 5, 6 }; > + static const unsigned int register_offset[6] = { 0, 1, 2, 4, 5, 6 }; > unsigned base_offset; > unsigned mask; > > -- > 2.20.1 Acked-by: William Breathitt Gray