From patchwork Thu Dec 2 13:20:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562719 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=Z1JgFkNy; 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 4J4c5v74Y7z9sRN for ; Fri, 3 Dec 2021 00:20:51 +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 1msm0x-0001q6-N6; Thu, 02 Dec 2021 13:20:43 +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 1msm0p-0001c7-Bd for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:35 +0000 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (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 AA6423F1B6 for ; Thu, 2 Dec 2021 13:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451233; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z1JgFkNykWI8667b0jZFQIBpwp3yh44w3DGCLJcwrw13aO138qolVuXWue8uHbTG3 hsSGaK0ea6kDeTTil1aCt7yTvXsPldaU3E9qF0D4wfR9l8t0Ujn5pAOZT4u+pFm5tm xjIBdUsnwg+kTKkRM0rZ+F7IcfDa9sLv45zcX1FFreMZktu/uQnNDib8AQ4Vn9wniD cjBug1YSRwU+1TZ79OT8gXUhdmFoHBaR5nKzJJDksgBv/lNPohr9cpVrxiOvRkuazi LBtK+H4ajuRSXfyn/ZhfW17+7sKblNKjzrnXzZqq4bKik8fDM1gWPCNpd8gCMKyGff mWUy4JQpQ/4dw== Received: by mail-pl1-f200.google.com with SMTP id p24-20020a170902a41800b001438d6c7d71so11676977plq.7 for ; Thu, 02 Dec 2021 05:20:33 -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=My+I0PJ3p897om1XsZ6/a/m+5Bv1sGaxooFl1WYDKLZk0TXm1zKbBkX7mNMde23C6x k/5nsgOHDPQSBsYqm2G7OdkfHLlyKwGglKvAVO+jfzr5+xoadcQv5KBNUMgRa+yyUe7t tUsOchhDAzohPky1dLsnq630d/nQKqjl5kWYuJzak1i6RRRJIwIGuPQUnf7BVEOeFG/d 9kAFO2/X45Ahd2UUeADptif8yrmkRIVdgBhIlxaGXOsuxjFOI80EQotq61jHmhzvFCA/ OKdE3H3pC12e7IQVPrntzu8yy/nvCG2s5ZsPtEQxg9RbMSFiYVlrJqP9JSI0zJwMvL+a YD/Q== X-Gm-Message-State: AOAM5319GABTFlgJ4mmB1//a7/L8NuHOSam0C7wV++rk2nBZ6JswcFNM zpsGuE9GCq3LUHdw6AzaJNkPvanZDT3gSAoYFnPADBUo5o7OM541qX+kjaGPncGqO5hLmK7uguI hgN8YO8JXRbQlYx+ZIJvLkN26XuXJq1gysSHVgWZNSQ== X-Received: by 2002:a63:ef58:: with SMTP id c24mr9718431pgk.94.1638451232068; Thu, 02 Dec 2021 05:20:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5V7kKAT1krKNUSuuJQ28MWAllcl36p6N7aQ4cPiQbBLe/pKdWXWiN2pWeGAK3vbpUx8rCyA== X-Received: by 2002:a63:ef58:: with SMTP id c24mr9718407pgk.94.1638451231759; Thu, 02 Dec 2021 05:20:31 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:31 -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:20:15 -0700 Message-Id: <20211202132017.9688-8-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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;