Re: [PATCH V8 39/44] memremap_pages: Add memremap.pks_fault_mode

Edgecombe, Rick P
2022-02-01T01:16:34Z

On Thu, 2022-01-27 at 09:55 -0800, ira.weiny@intel.com wrote:
> +static int param_get_pks_fault_mode(char *buffer, const struct
> kernel_param *kp)
> +{
> + int ret = 0;
This doesn't need to be initialized.

> +
> + switch (pks_fault_mode) {
> + case PKS_MODE_STRICT:
> + ret = sysfs_emit(buffer, "strict\n");
> + break;
> + case PKS_MODE_RELAXED:
> + ret = sysfs_emit(buffer, "relaxed\n");
> + break;
> + default:
> + ret = sysfs_emit(buffer, "<unknown>\n");
> + break;
> + }
> +
> + return ret;
> +}