backends/hostmem: Fix block comments style (checkpatch.pl warnings)
PATCH 1/1 backends/hostmem: Fix block comments style (checkpatch.pl warnings)
While re-indenting code in host_memory_backend_memory_complete(), we triggered various "Block comments use a leading /* on a separate line" warnings from checkpatch.pl. Correct the comments style.
Fixes e199f7ad4d ("backends: Simplify host_memory_backend_memory_complete()")
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- backends/hostmem.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
backends/hostmem.c +8 -4
@@ -344,9 +344,11 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)unsigned long lastbit =find_last_bit (backend->host_nodes,MAX_NODES );/* lastbit == MAX_NODES means maxnode = 0 */ unsigned long maxnode = (lastbit +1 ) % (MAX_NODES +1 ); -/* ensure policy won't be ignored in case memory is preallocated +/* +* Ensure policy won't be ignored in case memory is preallocated * before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so -* this doesn't catch hugepage case. */ +* this doesn't catch hugepage case. +*/ unsigned flags =MPOL_MF_STRICT |MPOL_MF_MOVE ;int mode = backend->policy;
@@ -363,7 +365,8 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)return ; } -/* We can have up to MAX_NODES nodes, but we need to pass maxnode+1 +/* +* We can have up to MAX_NODES nodes, but we need to pass maxnode+1 * as argument to mbind() due to an old Linux bug (feature?) which * cuts off the last specified node. This means backend->host_nodes * must have MAX_NODES+1 bits available.
@@ -391,7 +394,8 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp) } }#endif -/* Preallocate memory after the NUMA policy has been instantiated. +/* +* Preallocate memory after the NUMA policy has been instantiated. * This is necessary to guarantee memory is allocated with * specified NUMA policy in place. */
Signature · 1 line
2.41.0
Quoted 6 lines · Philippe Mathieu-Daudé
While re-indenting code in
host_memory_backend_memory_complete(), we triggered various "Block comments use a leading /* on a separate line" warnings from checkpatch.pl. Correct the comments style.Fixes e199f7ad4d ("backends: Simplify host_memory_backend_memory_complete()")Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Reviewed-by Xiaoyao Li <[email protected]>
Quoted 42 lines
--- backends/hostmem.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)backends/hostmem.c +8
-4@@ -344,9 +344,11 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)unsigned long lastbit =find_last_bit (backend->host_nodes,MAX_NODES );/* lastbit == MAX_NODES means maxnode = 0 */ unsigned long maxnode = (lastbit +1 ) % (MAX_NODES +1 ); -/* ensure policy won't be ignored in case memory is preallocated +/* +* Ensure policy won't be ignored in case memory is preallocated * before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so -* this doesn't catch hugepage case. */ +* this doesn't catch hugepage case. +*/ unsigned flags =MPOL_MF_STRICT |MPOL_MF_MOVE ;int mode = backend->policy;@@ -363,7 +365,8 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)return ; } -/* We can have up to MAX_NODES nodes, but we need to pass maxnode+1 +/* +* We can have up to MAX_NODES nodes, but we need to pass maxnode+1 * as argument to mbind() due to an old Linux bug (feature?) which * cuts off the last specified node. This means backend->host_nodes * must have MAX_NODES+1 bits available. @@ -391,7 +394,8 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp) } }#endif -/* Preallocate memory after the NUMA policy has been instantiated. +/* +* Preallocate memory after the NUMA policy has been instantiated. * This is necessary to guarantee memory is allocated with * specified NUMA policy in place. */