[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60e84dc2-0456-5db6-dd5c-250865fc061f@intel.com>
Date: Fri, 29 Oct 2021 10:59:03 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>, jarkko@...nel.org,
linux-sgx@...r.kernel.org, shuah@...nel.org,
dave.hansen@...ux.intel.com
Cc: seanjc@...gle.com, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 02/15] x86/sgx: Rename fallback labels in sgx_init()
On 10/28/21 1:37 PM, Reinette Chatre wrote:
> -err_provision:
> +err_driver:
> misc_deregister(&sgx_dev_provision);
>
> -err_kthread:
> +err_provision:
> kthread_stop(ksgxd_tsk);
>
> -err_page_cache:
> +err_reclaimer:
> for (i = 0; i < sgx_nr_epc_sections; i++) {
> vfree(sgx_epc_sections[i].pages);
> memunmap(sgx_epc_sections[i].virt_addr);
This isn't the normal pattern we use in the kernel.
Usually, we say what is being *DONE* at the label, almost like we are
calling a function. Here's a random example from one of the most
prolific users of gotos in arch/x86:
ret = kernfs_get_tree(fc);
if (ret < 0)
goto out_psl;
...
out_psl:
rdt_pseudo_lock_release();
See? The "psl" is doing a "pseudo lock release".
I don't particularly like the labels as-is, but this patch makes them
less clear, IMNHO. Let's just drop this patch for now, please.
Powered by blists - more mailing lists