Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1685237 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-07-11 19:30 +0200 |
| Last post | 2017-07-11 19:50 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: fbtft: make const array gamma_par_mask static Colin King <colin.king@canonical.com> - 2017-07-11 19:30 +0200
Re: [PATCH] staging: fbtft: make const array gamma_par_mask static Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-11 19:40 +0200
Re: [PATCH] staging: fbtft: make const array gamma_par_mask static Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-11 19:50 +0200
Re: [PATCH] staging: fbtft: make const array gamma_par_mask static Colin Ian King <colin.king@canonical.com> - 2017-07-11 19:50 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-07-11 19:30 +0200 |
| Subject | [PATCH] staging: fbtft: make const array gamma_par_mask static |
| Message-ID | <u2790-5cu-21@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
Don't populate array gamma_par_mask on the stack but instead make it
static. Makes the object code smaller by 148 bytes:
Before:
text data bss dec hex filename
2993 1104 0 4097 1001 drivers/staging/fbtft/fb_st7789v.o
After:
text data bss dec hex filename
2757 1192 0 3949 f6d drivers/staging/fbtft/fb_st7789v.o
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/usb/gspca/xirlink_cit.c | 2 +-
drivers/staging/fbtft/fb_st7789v.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c
index b600ea6460d3..68656e7986c7 100644
--- a/drivers/media/usb/gspca/xirlink_cit.c
+++ b/drivers/media/usb/gspca/xirlink_cit.c
@@ -1315,7 +1315,7 @@ static int cit_set_sharpness(struct gspca_dev *gspca_dev, s32 val)
break;
case CIT_MODEL1: {
int i;
- const unsigned short sa[] = {
+ static const unsigned short sa[] = {
0x11, 0x13, 0x16, 0x18, 0x1a, 0x8, 0x0a };
for (i = 0; i < cit_model1_ntries; i++)
diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c
index 8935a97ec048..a5d7c87557f8 100644
--- a/drivers/staging/fbtft/fb_st7789v.c
+++ b/drivers/staging/fbtft/fb_st7789v.c
@@ -189,7 +189,7 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
* The masks are the same for both positive and negative voltage
* gamma curves.
*/
- const u8 gamma_par_mask[] = {
+ static const u8 gamma_par_mask[] = {
0xFF, /* V63[3:0], V0[3:0]*/
0x3F, /* V1[5:0] */
0x3F, /* V2[5:0] */
--
2.11.0
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-07-11 19:40 +0200 |
| Message-ID | <u27iG-5fz-19@gated-at.bofh.it> |
| In reply to | #1685237 |
On Tue, Jul 11, 2017 at 06:20:02PM +0100, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Don't populate array gamma_par_mask on the stack but instead make it > static. Makes the object code smaller by 148 bytes: > > Before: > text data bss dec hex filename > 2993 1104 0 4097 1001 drivers/staging/fbtft/fb_st7789v.o > > After: > text data bss dec hex filename > 2757 1192 0 3949 f6d drivers/staging/fbtft/fb_st7789v.o > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > drivers/media/usb/gspca/xirlink_cit.c | 2 +- > drivers/staging/fbtft/fb_st7789v.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Your subject doesn't match the patch :(
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-07-11 19:50 +0200 |
| Message-ID | <u27sl-5iL-3@gated-at.bofh.it> |
| In reply to | #1685247 |
On Tue, Jul 11, 2017 at 06:39:59PM +0100, Colin Ian King wrote: > On 11/07/17 18:30, Greg Kroah-Hartman wrote: > > On Tue, Jul 11, 2017 at 06:20:02PM +0100, Colin King wrote: > >> From: Colin Ian King <colin.king@canonical.com> > >> > >> Don't populate array gamma_par_mask on the stack but instead make it > >> static. Makes the object code smaller by 148 bytes: > >> > >> Before: > >> text data bss dec hex filename > >> 2993 1104 0 4097 1001 drivers/staging/fbtft/fb_st7789v.o > >> > >> After: > >> text data bss dec hex filename > >> 2757 1192 0 3949 f6d drivers/staging/fbtft/fb_st7789v.o > >> > >> Signed-off-by: Colin Ian King <colin.king@canonical.com> > >> --- > >> drivers/media/usb/gspca/xirlink_cit.c | 2 +- > >> drivers/staging/fbtft/fb_st7789v.c | 2 +- > >> 2 files changed, 2 insertions(+), 2 deletions(-) > > > > Your subject doesn't match the patch :( > > Got distracted by the Trump Jnr tweet. Will resend. Dude, the best thing is to just read: https://whatthefuckjusthappenedtoday.com/ once a day, otherwise you will not get any work done ever again...
[toc] | [prev] | [next] | [standalone]
| From | Colin Ian King <colin.king@canonical.com> |
|---|---|
| Date | 2017-07-11 19:50 +0200 |
| Message-ID | <u27sl-5iL-5@gated-at.bofh.it> |
| In reply to | #1685247 |
On 11/07/17 18:30, Greg Kroah-Hartman wrote: > On Tue, Jul 11, 2017 at 06:20:02PM +0100, Colin King wrote: >> From: Colin Ian King <colin.king@canonical.com> >> >> Don't populate array gamma_par_mask on the stack but instead make it >> static. Makes the object code smaller by 148 bytes: >> >> Before: >> text data bss dec hex filename >> 2993 1104 0 4097 1001 drivers/staging/fbtft/fb_st7789v.o >> >> After: >> text data bss dec hex filename >> 2757 1192 0 3949 f6d drivers/staging/fbtft/fb_st7789v.o >> >> Signed-off-by: Colin Ian King <colin.king@canonical.com> >> --- >> drivers/media/usb/gspca/xirlink_cit.c | 2 +- >> drivers/staging/fbtft/fb_st7789v.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) > > Your subject doesn't match the patch :( Got distracted by the Trump Jnr tweet. Will resend. > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web