Gentoo Archives: gentoo-commits

From: Alice Ferrazzi <alicef@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.15 commit in: /
Date: Thu, 01 Mar 2018 13:51:31
Message-Id: 1519912026.ea57e40b92f14ab61fb8a8352c4962a324bde09b.alicef@gentoo
1 commit: ea57e40b92f14ab61fb8a8352c4962a324bde09b
2 Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 1 13:46:48 2018 +0000
4 Commit: Alice Ferrazzi <alicef <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 1 13:47:06 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ea57e40b
7
8 fix Allocate buffer on heap rather than globally patch
9 bug #646438
10
11 ...ocate_buffer_on_heap_rather_than_globally.patch | 46 +++++++++++-----------
12 1 file changed, 24 insertions(+), 22 deletions(-)
13
14 diff --git a/2901_allocate_buffer_on_heap_rather_than_globally.patch b/2901_allocate_buffer_on_heap_rather_than_globally.patch
15 index 1912d9f..eb5fecc 100644
16 --- a/2901_allocate_buffer_on_heap_rather_than_globally.patch
17 +++ b/2901_allocate_buffer_on_heap_rather_than_globally.patch
18 @@ -1,6 +1,8 @@
19 ---- dell-laptop.c.orig 2018-02-28 19:24:04.598049000 +0000
20 -+++ linux-4.15.0/drivers/platform/x86/dell-laptop.c 2018-02-28 19:40:00.358049000 +0000
21 -@@ -78,7 +78,6 @@ static struct platform_driver platform_d
22 +diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
23 +index cd4725e7e0b5..6e8071d493dc 100644
24 +--- a/drivers/platform/x86/dell-laptop.c
25 ++++ b/drivers/platform/x86/dell-laptop.c
26 +@@ -78,7 +78,6 @@ static struct platform_driver platform_driver = {
27 }
28 };
29
30 @@ -8,27 +10,27 @@
31 static struct platform_device *platform_device;
32 static struct backlight_device *dell_backlight_device;
33 static struct rfkill *wifi_rfkill;
34 -@@ -286,7 +285,8 @@ static const struct dmi_system_id dell_q
35 +@@ -286,7 +285,8 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
36 { }
37 };
38
39 -void dell_set_arguments(u32 arg0, u32 arg1, u32 arg2, u32 arg3)
40 -+void dell_set_arguments(struct calling_interface_buffer *buffer,
41 -+ u32 arg0, u32 arg1, u32 arg2, u32 arg3)
42 ++static void dell_fill_request(struct calling_interface_buffer *buffer,
43 ++ u32 arg0, u32 arg1, u32 arg2, u32 arg3)
44 {
45 memset(buffer, 0, sizeof(struct calling_interface_buffer));
46 buffer->input[0] = arg0;
47 -@@ -295,7 +295,8 @@ void dell_set_arguments(u32 arg0, u32 ar
48 +@@ -295,7 +295,8 @@ void dell_set_arguments(u32 arg0, u32 arg1, u32 arg2, u32 arg3)
49 buffer->input[3] = arg3;
50 }
51
52 -int dell_send_request(u16 class, u16 select)
53 -+int dell_send_request(struct calling_interface_buffer *buffer,
54 -+ u16 class, u16 select)
55 ++static int dell_send_request(struct calling_interface_buffer *buffer,
56 ++ u16 class, u16 select)
57 {
58 int ret;
59
60 -@@ -432,21 +433,22 @@ static int dell_rfkill_set(void *data, b
61 +@@ -432,21 +433,22 @@ static int dell_rfkill_set(void *data, bool blocked)
62 int disable = blocked ? 1 : 0;
63 unsigned long radio = (unsigned long)data;
64 int hwswitch_bit = (unsigned long)data - 1;
65 @@ -57,7 +59,7 @@
66
67 /* If the hardware switch controls this radio, and the hardware
68 switch is disabled, always disable the radio */
69 -@@ -454,8 +456,8 @@ static int dell_rfkill_set(void *data, b
70 +@@ -454,8 +456,8 @@ static int dell_rfkill_set(void *data, bool blocked)
71 (status & BIT(0)) && !(status & BIT(16)))
72 disable = 1;
73
74 @@ -68,7 +70,7 @@
75 return ret;
76 }
77
78 -@@ -464,9 +466,11 @@ static void dell_rfkill_update_sw_state(
79 +@@ -464,9 +466,11 @@ static void dell_rfkill_update_sw_state(struct rfkill *rfkill, int radio,
80 {
81 if (status & BIT(0)) {
82 /* Has hw-switch, sync sw_state to BIOS */
83 @@ -82,7 +84,7 @@
84 } else {
85 /* No hw-switch, sync BIOS state to sw_state */
86 rfkill_set_sw_state(rfkill, !!(status & BIT(radio + 16)));
87 -@@ -483,21 +487,22 @@ static void dell_rfkill_update_hw_state(
88 +@@ -483,21 +487,22 @@ static void dell_rfkill_update_hw_state(struct rfkill *rfkill, int radio,
89 static void dell_rfkill_query(struct rfkill *rfkill, void *data)
90 {
91 int radio = ((unsigned long)data & 0xF);
92 @@ -141,7 +143,7 @@
93
94 seq_printf(s, "return:\t%d\n", ret);
95 seq_printf(s, "status:\t0x%X\n", status);
96 -@@ -610,22 +616,23 @@ static const struct file_operations dell
97 +@@ -610,22 +616,23 @@ static const struct file_operations dell_debugfs_fops = {
98
99 static void dell_update_rfkill(struct work_struct *ignored)
100 {
101 @@ -171,7 +173,7 @@
102
103 if (wifi_rfkill) {
104 dell_rfkill_update_hw_state(wifi_rfkill, 1, status, hwswitch);
105 -@@ -683,6 +690,7 @@ static struct notifier_block dell_laptop
106 +@@ -683,6 +690,7 @@ static struct notifier_block dell_laptop_rbtn_notifier = {
107
108 static int __init dell_setup_rfkill(void)
109 {
110 @@ -179,7 +181,7 @@
111 int status, ret, whitelisted;
112 const char *product;
113
114 -@@ -698,9 +706,9 @@ static int __init dell_setup_rfkill(void
115 +@@ -698,9 +706,9 @@ static int __init dell_setup_rfkill(void)
116 if (!force_rfkill && !whitelisted)
117 return 0;
118
119 @@ -200,7 +202,7 @@
120 struct calling_interface_token *token;
121 int ret;
122
123 -@@ -860,17 +869,21 @@ static int dell_send_intensity(struct ba
124 +@@ -860,17 +869,21 @@ static int dell_send_intensity(struct backlight_device *bd)
125 if (!token)
126 return -ENODEV;
127
128 @@ -225,7 +227,7 @@
129 struct calling_interface_token *token;
130 int ret;
131
132 -@@ -878,14 +891,17 @@ static int dell_get_intensity(struct bac
133 +@@ -878,14 +891,17 @@ static int dell_get_intensity(struct backlight_device *bd)
134 if (!token)
135 return -ENODEV;
136
137 @@ -292,7 +294,7 @@
138
139 return ret;
140 }
141 -@@ -1233,31 +1251,34 @@ static int kbd_set_level(struct kbd_stat
142 +@@ -1233,31 +1251,34 @@ static int kbd_set_level(struct kbd_state *state, u8 level)
143
144 static int kbd_get_state(struct kbd_state *state)
145 {
146 @@ -338,7 +340,7 @@
147 int ret;
148 u32 input1;
149 u32 input2;
150 -@@ -1270,8 +1291,9 @@ static int kbd_set_state(struct kbd_stat
151 +@@ -1270,8 +1291,9 @@ static int kbd_set_state(struct kbd_state *state)
152 input2 |= (state->level & 0xFF) << 16;
153 input2 |= (state->timeout_value_ac & 0x3F) << 24;
154 input2 |= (state->timeout_unit_ac & 0x3) << 30;
155 @@ -350,7 +352,7 @@
156
157 return ret;
158 }
159 -@@ -1298,6 +1320,7 @@ static int kbd_set_state_safe(struct kbd
160 +@@ -1298,6 +1320,7 @@ static int kbd_set_state_safe(struct kbd_state *state, struct kbd_state *old)
161
162 static int kbd_set_token_bit(u8 bit)
163 {
164 @@ -389,7 +391,7 @@
165
166 if (ret)
167 return ret;
168 -@@ -2046,6 +2070,7 @@ static struct notifier_block dell_laptop
169 +@@ -2046,6 +2070,7 @@ static struct notifier_block dell_laptop_notifier = {
170
171 int dell_micmute_led_set(int state)
172 {