Skip to content

Commit 68d68ff

Browse files
Zhiyuan Daitorvalds
authored andcommitted
mm/mempool: minor coding style tweaks
Various coding style tweaks to various files under mm/ [[email protected]: mm/swapfile: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/sparse: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/vmscan: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/compaction: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/oom_kill: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/shmem: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/page_alloc: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/filemap: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/mlock: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/frontswap: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/vmalloc: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/memory_hotplug: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: mm/mempolicy: minor coding style tweaks] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Zhiyuan Dai <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9727688 commit 68d68ff

File tree

14 files changed

+27
-23
lines changed

14 files changed

+27
-23
lines changed

mm/compaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,7 @@ void wakeup_kcompactd(pg_data_t *pgdat, int order, int highest_zoneidx)
28852885
*/
28862886
static int kcompactd(void *p)
28872887
{
2888-
pg_data_t *pgdat = (pg_data_t*)p;
2888+
pg_data_t *pgdat = (pg_data_t *)p;
28892889
struct task_struct *tsk = current;
28902890
unsigned int proactive_defer = 0;
28912891

mm/filemap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,7 +3267,7 @@ const struct vm_operations_struct generic_file_vm_ops = {
32673267

32683268
/* This is used for a general mmap of a disk file */
32693269

3270-
int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
3270+
int generic_file_mmap(struct file *file, struct vm_area_struct *vma)
32713271
{
32723272
struct address_space *mapping = file->f_mapping;
32733273

@@ -3292,11 +3292,11 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
32923292
{
32933293
return VM_FAULT_SIGBUS;
32943294
}
3295-
int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
3295+
int generic_file_mmap(struct file *file, struct vm_area_struct *vma)
32963296
{
32973297
return -ENOSYS;
32983298
}
3299-
int generic_file_readonly_mmap(struct file * file, struct vm_area_struct * vma)
3299+
int generic_file_readonly_mmap(struct file *file, struct vm_area_struct *vma)
33003300
{
33013301
return -ENOSYS;
33023302
}
@@ -3724,7 +3724,7 @@ EXPORT_SYMBOL(generic_perform_write);
37243724
ssize_t __generic_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
37253725
{
37263726
struct file *file = iocb->ki_filp;
3727-
struct address_space * mapping = file->f_mapping;
3727+
struct address_space *mapping = file->f_mapping;
37283728
struct inode *inode = mapping->host;
37293729
ssize_t written = 0;
37303730
ssize_t err;

mm/frontswap.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,20 @@ static u64 frontswap_succ_stores;
6060
static u64 frontswap_failed_stores;
6161
static u64 frontswap_invalidates;
6262

63-
static inline void inc_frontswap_loads(void) {
63+
static inline void inc_frontswap_loads(void)
64+
{
6465
data_race(frontswap_loads++);
6566
}
66-
static inline void inc_frontswap_succ_stores(void) {
67+
static inline void inc_frontswap_succ_stores(void)
68+
{
6769
data_race(frontswap_succ_stores++);
6870
}
69-
static inline void inc_frontswap_failed_stores(void) {
71+
static inline void inc_frontswap_failed_stores(void)
72+
{
7073
data_race(frontswap_failed_stores++);
7174
}
72-
static inline void inc_frontswap_invalidates(void) {
75+
static inline void inc_frontswap_invalidates(void)
76+
{
7377
data_race(frontswap_invalidates++);
7478
}
7579
#else

mm/memory_hotplug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ static inline struct zone *default_zone_for_pfn(int nid, unsigned long start_pfn
834834
return movable_node_enabled ? movable_zone : kernel_zone;
835835
}
836836

837-
struct zone * zone_for_pfn_range(int online_type, int nid, unsigned start_pfn,
837+
struct zone *zone_for_pfn_range(int online_type, int nid, unsigned start_pfn,
838838
unsigned long nr_pages)
839839
{
840840
if (online_type == MMOP_ONLINE_KERNEL)

mm/mempolicy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
330330
else if (pol->flags & MPOL_F_RELATIVE_NODES)
331331
mpol_relative_nodemask(&tmp, &pol->w.user_nodemask, nodes);
332332
else {
333-
nodes_remap(tmp, pol->v.nodes,pol->w.cpuset_mems_allowed,
333+
nodes_remap(tmp, pol->v.nodes, pol->w.cpuset_mems_allowed,
334334
*nodes);
335335
pol->w.cpuset_mems_allowed = *nodes;
336336
}
@@ -1161,7 +1161,7 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
11611161

11621162
tmp = *from;
11631163
while (!nodes_empty(tmp)) {
1164-
int s,d;
1164+
int s, d;
11651165
int source = NUMA_NO_NODE;
11661166
int dest = 0;
11671167

mm/mempool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ EXPORT_SYMBOL(mempool_init);
251251
mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
252252
mempool_free_t *free_fn, void *pool_data)
253253
{
254-
return mempool_create_node(min_nr,alloc_fn,free_fn, pool_data,
254+
return mempool_create_node(min_nr, alloc_fn, free_fn, pool_data,
255255
GFP_KERNEL, NUMA_NO_NODE);
256256
}
257257
EXPORT_SYMBOL(mempool_create);

mm/mlock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
559559
vm_flags_t flags)
560560
{
561561
unsigned long nstart, end, tmp;
562-
struct vm_area_struct * vma, * prev;
562+
struct vm_area_struct *vma, *prev;
563563
int error;
564564

565565
VM_BUG_ON(offset_in_page(start));
@@ -737,7 +737,7 @@ SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len)
737737
*/
738738
static int apply_mlockall_flags(int flags)
739739
{
740-
struct vm_area_struct * vma, * prev = NULL;
740+
struct vm_area_struct *vma, *prev = NULL;
741741
vm_flags_t to_add = 0;
742742

743743
current->mm->def_flags &= VM_LOCKED_CLEAR_MASK;

mm/oom_kill.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ static void oom_kill_process(struct oom_control *oc, const char *message)
993993
if (oom_group) {
994994
mem_cgroup_print_oom_group(oom_group);
995995
mem_cgroup_scan_tasks(oom_group, oom_kill_memcg_member,
996-
(void*)message);
996+
(void *)message);
997997
mem_cgroup_put(oom_group);
998998
}
999999
}

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8808,7 +8808,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
88088808
ret = __alloc_contig_migrate_range(&cc, start, end);
88098809
if (ret && ret != -EBUSY)
88108810
goto done;
8811-
ret =0;
8811+
ret = 0;
88128812

88138813
/*
88148814
* Pages from [start, end) are within a MAX_ORDER_NR_PAGES

mm/shmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3508,7 +3508,7 @@ static int shmem_parse_options(struct fs_context *fc, void *data)
35083508
}
35093509
}
35103510
if (*this_char) {
3511-
char *value = strchr(this_char,'=');
3511+
char *value = strchr(this_char, '=');
35123512
size_t len = 0;
35133513
int err;
35143514

0 commit comments

Comments
 (0)