@@ -202,8 +202,7 @@ static struct crash_mem *fill_up_crash_elf_data(void)
202
202
unsigned int nr_ranges = 0 ;
203
203
struct crash_mem * cmem ;
204
204
205
- walk_system_ram_res (0 , -1 , & nr_ranges ,
206
- get_nr_ram_ranges_callback );
205
+ walk_system_ram_res (0 , -1 , & nr_ranges , get_nr_ram_ranges_callback );
207
206
if (!nr_ranges )
208
207
return NULL ;
209
208
@@ -240,10 +239,9 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
240
239
if (ret )
241
240
return ret ;
242
241
243
- if (crashk_low_res .end ) {
242
+ if (crashk_low_res .end )
244
243
ret = crash_exclude_mem_range (cmem , crashk_low_res .start ,
245
- crashk_low_res .end );
246
- }
244
+ crashk_low_res .end );
247
245
248
246
return ret ;
249
247
}
@@ -270,8 +268,7 @@ static int prepare_elf_headers(struct kimage *image, void **addr,
270
268
if (!cmem )
271
269
return - ENOMEM ;
272
270
273
- ret = walk_system_ram_res (0 , -1 , cmem ,
274
- prepare_elf64_ram_headers_callback );
271
+ ret = walk_system_ram_res (0 , -1 , cmem , prepare_elf64_ram_headers_callback );
275
272
if (ret )
276
273
goto out ;
277
274
@@ -281,8 +278,7 @@ static int prepare_elf_headers(struct kimage *image, void **addr,
281
278
goto out ;
282
279
283
280
/* By default prepare 64bit headers */
284
- ret = crash_prepare_elf64_headers (cmem ,
285
- IS_ENABLED (CONFIG_X86_64 ), addr , sz );
281
+ ret = crash_prepare_elf64_headers (cmem , IS_ENABLED (CONFIG_X86_64 ), addr , sz );
286
282
287
283
out :
288
284
vfree (cmem );
@@ -297,8 +293,7 @@ static int add_e820_entry(struct boot_params *params, struct e820_entry *entry)
297
293
if (nr_e820_entries >= E820_MAX_ENTRIES_ZEROPAGE )
298
294
return 1 ;
299
295
300
- memcpy (& params -> e820_table [nr_e820_entries ], entry ,
301
- sizeof (struct e820_entry ));
296
+ memcpy (& params -> e820_table [nr_e820_entries ], entry , sizeof (struct e820_entry ));
302
297
params -> e820_entries ++ ;
303
298
return 0 ;
304
299
}
@@ -353,24 +348,24 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
353
348
cmd .type = E820_TYPE_RAM ;
354
349
flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY ;
355
350
walk_iomem_res_desc (IORES_DESC_NONE , flags , 0 , (1 <<20 )- 1 , & cmd ,
356
- memmap_entry_callback );
351
+ memmap_entry_callback );
357
352
358
353
/* Add ACPI tables */
359
354
cmd .type = E820_TYPE_ACPI ;
360
355
flags = IORESOURCE_MEM | IORESOURCE_BUSY ;
361
356
walk_iomem_res_desc (IORES_DESC_ACPI_TABLES , flags , 0 , -1 , & cmd ,
362
- memmap_entry_callback );
357
+ memmap_entry_callback );
363
358
364
359
/* Add ACPI Non-volatile Storage */
365
360
cmd .type = E820_TYPE_NVS ;
366
361
walk_iomem_res_desc (IORES_DESC_ACPI_NV_STORAGE , flags , 0 , -1 , & cmd ,
367
- memmap_entry_callback );
362
+ memmap_entry_callback );
368
363
369
364
/* Add e820 reserved ranges */
370
365
cmd .type = E820_TYPE_RESERVED ;
371
366
flags = IORESOURCE_MEM ;
372
367
walk_iomem_res_desc (IORES_DESC_RESERVED , flags , 0 , -1 , & cmd ,
373
- memmap_entry_callback );
368
+ memmap_entry_callback );
374
369
375
370
/* Add crashk_low_res region */
376
371
if (crashk_low_res .end ) {
@@ -381,8 +376,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
381
376
}
382
377
383
378
/* Exclude some ranges from crashk_res and add rest to memmap */
384
- ret = memmap_exclude_ranges (image , cmem , crashk_res .start ,
385
- crashk_res .end );
379
+ ret = memmap_exclude_ranges (image , cmem , crashk_res .start , crashk_res .end );
386
380
if (ret )
387
381
goto out ;
388
382
0 commit comments