Skip to content

Commit 3d3af6a

Browse files
IoanaCiorneigregkh
authored andcommitted
drivers: base: memory: Fix switch indent
Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2e4fabe commit 3d3af6a

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

drivers/base/memory.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,20 @@ static ssize_t show_mem_state(struct device *dev,
152152
* so that they're not open-coded
153153
*/
154154
switch (mem->state) {
155-
case MEM_ONLINE:
156-
len = sprintf(buf, "online\n");
157-
break;
158-
case MEM_OFFLINE:
159-
len = sprintf(buf, "offline\n");
160-
break;
161-
case MEM_GOING_OFFLINE:
162-
len = sprintf(buf, "going-offline\n");
163-
break;
164-
default:
165-
len = sprintf(buf, "ERROR-UNKNOWN-%ld\n",
166-
mem->state);
167-
WARN_ON(1);
168-
break;
155+
case MEM_ONLINE:
156+
len = sprintf(buf, "online\n");
157+
break;
158+
case MEM_OFFLINE:
159+
len = sprintf(buf, "offline\n");
160+
break;
161+
case MEM_GOING_OFFLINE:
162+
len = sprintf(buf, "going-offline\n");
163+
break;
164+
default:
165+
len = sprintf(buf, "ERROR-UNKNOWN-%ld\n",
166+
mem->state);
167+
WARN_ON(1);
168+
break;
169169
}
170170

171171
return len;
@@ -232,19 +232,19 @@ memory_block_action(unsigned long phys_index, unsigned long action, int online_t
232232
first_page = pfn_to_page(start_pfn);
233233

234234
switch (action) {
235-
case MEM_ONLINE:
236-
if (!pages_correctly_reserved(start_pfn))
237-
return -EBUSY;
238-
239-
ret = online_pages(start_pfn, nr_pages, online_type);
240-
break;
241-
case MEM_OFFLINE:
242-
ret = offline_pages(start_pfn, nr_pages);
243-
break;
244-
default:
245-
WARN(1, KERN_WARNING "%s(%ld, %ld) unknown action: "
246-
"%ld\n", __func__, phys_index, action, action);
247-
ret = -EINVAL;
235+
case MEM_ONLINE:
236+
if (!pages_correctly_reserved(start_pfn))
237+
return -EBUSY;
238+
239+
ret = online_pages(start_pfn, nr_pages, online_type);
240+
break;
241+
case MEM_OFFLINE:
242+
ret = offline_pages(start_pfn, nr_pages);
243+
break;
244+
default:
245+
WARN(1, KERN_WARNING "%s(%ld, %ld) unknown action: "
246+
"%ld\n", __func__, phys_index, action, action);
247+
ret = -EINVAL;
248248
}
249249

250250
return ret;

0 commit comments

Comments
 (0)