From patchwork Thu Dec 2 13:46:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562730 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Hfe7KGjB; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4chF2lNBz9s1l for ; Fri, 3 Dec 2021 00:47:09 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1msmQL-0006Uu-4f; Thu, 02 Dec 2021 13:46:57 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1msmQ3-0006Dj-7v for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:39 +0000 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 14E743F1F4 for ; Thu, 2 Dec 2021 13:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452798; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Hfe7KGjBZNy7t7DAca0BaVn+XbKCYKzYhnups+XLpCGku9z0Y4/QuioIjNrDkj5qM 40yyNpnz5/+zuvgwi5Hw6LjhvW/l37lkGvw3Adqe1f8lU9jEQBdvEgcfQ4zriGd+C/ t5J8t4oEiGQ8qyeyhbkaUl7F8bEBUuxs0E6OsZQlEMg15BvzmO6w7y2IIGS1b5sosL bZ3ofLivZaygR7pbj9EwNcDhtbNw3I4G63xcOVBARp5AFpuOpZyoTxKZhdbQwPyLmk ooHKe8ntN6Vnj7knV7Aw3Sr56bcYLNPeu5u7jivW6VCdSanWt9Q/eb5xC+iY0fteO1 LXxEChp0GSG9w== Received: by mail-pj1-f71.google.com with SMTP id h15-20020a17090a648f00b001a96c2c97abso10631615pjj.9 for ; Thu, 02 Dec 2021 05:46:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; b=0LVBPG64tV4ZK8GhLAGriLKWpaj4lE4WIbJ2m59s3DagQPhmK/O6eGZk9v8jEWlJNo qZDSZbAFzt7XOWGvv5o8JUHRkilBs5GJgNWmN3ycmsKy5ZU3GANlKW4btN8trouufN6t LdSpCo8X6P7qjJ1EJmKT9Wj7TPtNjSTI23X5u8hjf12uamS5u5LqjK/cJW5Y12MxlfeE Ok4/SzKxocqZfLfDqYsPnX7vXclumv7yvyiWwKHjNdjBExq3EFkid484N8gNhTVe7Kmq 7ow0eqUgctJp/BAFtXrIrYDqt9kEnujN+kSrxoaf3sfOAgDZ8p43DqDmJRi9YKRUwfaK YxQA== X-Gm-Message-State: AOAM53003/dtmEOQtqx2cqNLqgv7vY0dp88bkT/S575k22tzVzrVFREc I2SJPfnddWvM3mIEwmJQ9wYpNyJNX4EOYQf2EJrU4v9cggp0GjbM14Grba+4D5by6S3BlViS1op lAwaNKGeKrQFpoXOuE80SGpZmKnbAVxD2C38o1OdzAg== X-Received: by 2002:a63:2b88:: with SMTP id r130mr9716786pgr.80.1638452796305; Thu, 02 Dec 2021 05:46:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLU25anA3fyp42sSVM1Z3ldPpzjUji9gi1bc1heXNfD/pNHQ9AgeLCjVN8LnKhdO42Uz+Hyw== X-Received: by 2002:a63:2b88:: with SMTP id r130mr9716771pgr.80.1638452796058; Thu, 02 Dec 2021 05:46:36 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:35 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 7/9] nitro_enclaves: Add fixes for checkpatch match open parenthesis reports Date: Thu, 2 Dec 2021 06:46:20 -0700 Message-Id: <20211202134622.14875-8-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 Update the codebase formatting to fix the reports from the checkpatch script, to match the open parenthesis. Reviewed-by: George-Aurelian Popescu Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-6-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 02bba596de19c0b951b2843ebcd7a9da6e0938d4) Signed-off-by: Tim Gardner --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c b/drivers/virt/nitro_enclaves/ne_misc_dev.c index e21e1e86ad15..8939612ee0e0 100644 --- a/drivers/virt/nitro_enclaves/ne_misc_dev.c +++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ /** @@ -284,8 +284,8 @@ static int ne_setup_cpu_pool(const char *ne_cpu_list) ne_cpu_pool.nr_parent_vm_cores = nr_cpu_ids / ne_cpu_pool.nr_threads_per_core; ne_cpu_pool.avail_threads_per_core = kcalloc(ne_cpu_pool.nr_parent_vm_cores, - sizeof(*ne_cpu_pool.avail_threads_per_core), - GFP_KERNEL); + sizeof(*ne_cpu_pool.avail_threads_per_core), + GFP_KERNEL); if (!ne_cpu_pool.avail_threads_per_core) { rc = -ENOMEM; @@ -735,7 +735,7 @@ static int ne_add_vcpu_ioctl(struct ne_enclave *ne_enclave, u32 vcpu_id) * * Negative return value on failure. */ static int ne_sanity_check_user_mem_region(struct ne_enclave *ne_enclave, - struct ne_user_memory_region mem_region) + struct ne_user_memory_region mem_region) { struct ne_mem_region *ne_mem_region = NULL; @@ -771,7 +771,7 @@ static int ne_sanity_check_user_mem_region(struct ne_enclave *ne_enclave, u64 userspace_addr = ne_mem_region->userspace_addr; if ((userspace_addr <= mem_region.userspace_addr && - mem_region.userspace_addr < (userspace_addr + memory_size)) || + mem_region.userspace_addr < (userspace_addr + memory_size)) || (mem_region.userspace_addr <= userspace_addr && (mem_region.userspace_addr + mem_region.memory_size) > userspace_addr)) { dev_err_ratelimited(ne_misc_dev.this_device, @@ -836,7 +836,7 @@ static int ne_sanity_check_user_mem_region_page(struct ne_enclave *ne_enclave, * * Negative return value on failure. */ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave, - struct ne_user_memory_region mem_region) + struct ne_user_memory_region mem_region) { long gup_rc = 0; unsigned long i = 0; @@ -1014,7 +1014,7 @@ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave, * * Negative return value on failure. */ static int ne_start_enclave_ioctl(struct ne_enclave *ne_enclave, - struct ne_enclave_start_info *enclave_start_info) + struct ne_enclave_start_info *enclave_start_info) { struct ne_pci_dev_cmd_reply cmd_reply = {}; unsigned int cpu = 0; @@ -1574,7 +1574,8 @@ static int ne_create_vm_ioctl(struct ne_pci_dev *ne_pci_dev, u64 __user *slot_ui mutex_unlock(&ne_cpu_pool.mutex); ne_enclave->threads_per_core = kcalloc(ne_enclave->nr_parent_vm_cores, - sizeof(*ne_enclave->threads_per_core), GFP_KERNEL); + sizeof(*ne_enclave->threads_per_core), + GFP_KERNEL); if (!ne_enclave->threads_per_core) { rc = -ENOMEM;