Re: [patch V3 01/10] rslib: Add GFP aware init function

From: Thomas Gleixner
Date: Wed Apr 25 2018 - 05:00:04 EST


On Tue, 24 Apr 2018, Kees Cook wrote:
> On Tue, Apr 24, 2018 at 6:16 PM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> > On Sun, 22 Apr 2018 18:23:46 +0200 Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> >> +static inline struct rs_control *init_rs(int symsize, int gfpoly, int fcr,
> >> + int prim, int nroots)
> >> +{
> >> + return init_rs_gfp(symsize, gfpoly, fcr, prim, nroots, GFP_KERNEL);
> >> +}
> >> +
> >
> > The version of this patch that Kees has committed to his kspp tree in linux-next has
> >
> > #include <linux/slab.h>
> >
> > why not just
> >
> > #include <linux/types.h> /* for gpf_t */
> > #include <linux/gpf.h> /* for GFP_KERNEL */
> >
> > ?

Sure

> We could certainly switch to that. (Why doesn't gfp.h include types.h?)

Excellent question.

Thanks,

tglx