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

From: Ira Weiny
Date: Tue Mar 01 2022 - 19:20:40 EST


On Mon, Jan 31, 2022 at 05:16:26PM -0800, Edgecombe, Rick P wrote:
> On Thu, 2022-01-27 at 09:55 -0800, ira.weiny@xxxxxxxxx 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.

Thanks, fixed,
Ira

>
> > +
> > + 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;
> > +}