Re: [PATCH v6 1/5] x86/tdx: Add TDX Guest attestation interface driver

From: Wander Lairson Costa
Date: Mon May 16 2022 - 14:08:35 EST


On Thu, May 12, 2022 at 03:19:48PM -0700, Kuppuswamy Sathyanarayanan wrote:

[snip]

> +
> +static int __init tdx_attestation_init(void)
> +{
> + long ret;
nit: the type of ret should be int
> +
> + /* Make sure we are in a valid TDX platform */
> + if (!cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
> + return -EIO;
> +
> + miscdev.name = DRIVER_NAME;
> + miscdev.minor = MISC_DYNAMIC_MINOR;
> + miscdev.fops = &tdx_attest_fops;
> +
> + ret = misc_register(&miscdev);
> + if (ret) {
> + pr_err("misc device registration failed\n");
> + return ret;
> + }
> +
> + return 0;
> +}

[snip]