Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nitro_enclaves: Add fixes for checkpatch match open parenthesis reports

Update the codebase formatting to fix the reports from the checkpatch
script, to match the open parenthesis.

Reviewed-by: George-Aurelian Popescu <popegeo@amazon.com>
Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
Link: https://lore.kernel.org/r/20210827154930.40608-6-andraprs@amazon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andra Paraschiv and committed by
Greg Kroah-Hartman
02bba596 e3cba4d2

+9 -8
+9 -8
drivers/virt/nitro_enclaves/ne_misc_dev.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 4 */ 5 5 6 6 /** ··· 284 284 ne_cpu_pool.nr_parent_vm_cores = nr_cpu_ids / ne_cpu_pool.nr_threads_per_core; 285 285 286 286 ne_cpu_pool.avail_threads_per_core = kcalloc(ne_cpu_pool.nr_parent_vm_cores, 287 - sizeof(*ne_cpu_pool.avail_threads_per_core), 288 - GFP_KERNEL); 287 + sizeof(*ne_cpu_pool.avail_threads_per_core), 288 + GFP_KERNEL); 289 289 if (!ne_cpu_pool.avail_threads_per_core) { 290 290 rc = -ENOMEM; 291 291 ··· 735 735 * * Negative return value on failure. 736 736 */ 737 737 static int ne_sanity_check_user_mem_region(struct ne_enclave *ne_enclave, 738 - struct ne_user_memory_region mem_region) 738 + struct ne_user_memory_region mem_region) 739 739 { 740 740 struct ne_mem_region *ne_mem_region = NULL; 741 741 ··· 771 771 u64 userspace_addr = ne_mem_region->userspace_addr; 772 772 773 773 if ((userspace_addr <= mem_region.userspace_addr && 774 - mem_region.userspace_addr < (userspace_addr + memory_size)) || 774 + mem_region.userspace_addr < (userspace_addr + memory_size)) || 775 775 (mem_region.userspace_addr <= userspace_addr && 776 776 (mem_region.userspace_addr + mem_region.memory_size) > userspace_addr)) { 777 777 dev_err_ratelimited(ne_misc_dev.this_device, ··· 836 836 * * Negative return value on failure. 837 837 */ 838 838 static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave, 839 - struct ne_user_memory_region mem_region) 839 + struct ne_user_memory_region mem_region) 840 840 { 841 841 long gup_rc = 0; 842 842 unsigned long i = 0; ··· 1014 1014 * * Negative return value on failure. 1015 1015 */ 1016 1016 static int ne_start_enclave_ioctl(struct ne_enclave *ne_enclave, 1017 - struct ne_enclave_start_info *enclave_start_info) 1017 + struct ne_enclave_start_info *enclave_start_info) 1018 1018 { 1019 1019 struct ne_pci_dev_cmd_reply cmd_reply = {}; 1020 1020 unsigned int cpu = 0; ··· 1574 1574 mutex_unlock(&ne_cpu_pool.mutex); 1575 1575 1576 1576 ne_enclave->threads_per_core = kcalloc(ne_enclave->nr_parent_vm_cores, 1577 - sizeof(*ne_enclave->threads_per_core), GFP_KERNEL); 1577 + sizeof(*ne_enclave->threads_per_core), 1578 + GFP_KERNEL); 1578 1579 if (!ne_enclave->threads_per_core) { 1579 1580 rc = -ENOMEM; 1580 1581