Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1684587 > unrolled thread

[PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static

Started byColin King <colin.king@canonical.com>
First post2017-07-10 21:00 +0200
Last post2017-07-11 21:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static Colin King <colin.king@canonical.com> - 2017-07-10 21:00 +0200
    Re: [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc  static Andrey Utkin <andrey_utkin@fastmail.com> - 2017-07-11 20:00 +0200
    Re: [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc  static Ismael Luceno <ismael@iodev.co.uk> - 2017-07-11 21:10 +0200

#1684587 — [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static

FromColin King <colin.king@canonical.com>
Date2017-07-10 21:00 +0200
Subject[PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static
Message-ID<u1M4y-fL-15@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

Don't populate const array saa7128_regs_ntsc on the stack but insteaed make
it static.  Makes the object code smaller and saves nearly 840 bytes

Before:
   text	   data	    bss	    dec	    hex	filename
   9218	    360	      0	   9578	   256a	solo6x10-tw28.o

After:
   text	   data	    bss	    dec	    hex	filename
   8237	    504	      0	   8741	   2225	solo6x10-tw28.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/media/pci/solo6x10/solo6x10-tw28.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-tw28.c b/drivers/media/pci/solo6x10/solo6x10-tw28.c
index 0632d3f7c73c..1c013a03d851 100644
--- a/drivers/media/pci/solo6x10/solo6x10-tw28.c
+++ b/drivers/media/pci/solo6x10/solo6x10-tw28.c
@@ -532,7 +532,7 @@ static void saa712x_write_regs(struct solo_dev *dev, const u8 *vals,
 static void saa712x_setup(struct solo_dev *dev)
 {
 	const int reg_start = 0x26;
-	const u8 saa7128_regs_ntsc[] = {
+	static const u8 saa7128_regs_ntsc[] = {
 	/* :0x26 */
 		0x0d, 0x00,
 	/* :0x28 */
-- 
2.11.0

[toc] | [next] | [standalone]


#1685262 — Re: [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static

FromAndrey Utkin <andrey_utkin@fastmail.com>
Date2017-07-11 20:00 +0200
SubjectRe: [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static
Message-ID<u27C2-5m0-27@gated-at.bofh.it>
In reply to#1684587
On Mon, Jul 10, 2017 at 07:51:03PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate const array saa7128_regs_ntsc on the stack but insteaed make
> it static.  Makes the object code smaller and saves nearly 840 bytes
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    9218	    360	      0	   9578	   256a	solo6x10-tw28.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    8237	    504	      0	   8741	   2225	solo6x10-tw28.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Andrey Utkin <andrey_utkin@fastmail.com>

[toc] | [prev] | [next] | [standalone]


#1685298 — Re: [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static

FromIsmael Luceno <ismael@iodev.co.uk>
Date2017-07-11 21:10 +0200
SubjectRe: [PATCH] [media] solo6x10: make const array saa7128_regs_ntsc static
Message-ID<u28HL-6hz-7@gated-at.bofh.it>
In reply to#1684587
On 10/Jul/2017 19:51, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate const array saa7128_regs_ntsc on the stack but insteaed make
> it static.  Makes the object code smaller and saves nearly 840 bytes
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    9218	    360	      0	   9578	   256a	solo6x10-tw28.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    8237	    504	      0	   8741	   2225	solo6x10-tw28.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/media/pci/solo6x10/solo6x10-tw28.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/pci/solo6x10/solo6x10-tw28.c b/drivers/media/pci/solo6x10/solo6x10-tw28.c
> index 0632d3f7c73c..1c013a03d851 100644
> --- a/drivers/media/pci/solo6x10/solo6x10-tw28.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-tw28.c
> @@ -532,7 +532,7 @@ static void saa712x_write_regs(struct solo_dev *dev, const u8 *vals,
>  static void saa712x_setup(struct solo_dev *dev)
>  {
>  	const int reg_start = 0x26;
> -	const u8 saa7128_regs_ntsc[] = {
> +	static const u8 saa7128_regs_ntsc[] = {
>  	/* :0x26 */
>  		0x0d, 0x00,
>  	/* :0x28 */

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web