On 11-Dec-18 19:03, Jason Gunthorpe wrote: > On Tue, Dec 11, 2018 at 06:31:09PM +0200, Gal Pressman wrote: >> On 11-Dec-18 18:22, Jason Gunthorpe wrote: >>> On Tue, Dec 11, 2018 at 10:59:25AM +0200, Gal Pressman wrote: >>> >>>> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h >>>> index 85021451eee0..499d96302262 100644 >>>> +++ b/include/rdma/ib_verbs.h >>>> @@ -2374,6 +2374,7 @@ struct ib_device { >>>> int (*dealloc_pd)(struct ib_pd *pd); >>>> struct ib_ah * (*create_ah)(struct ib_pd *pd, >>>> struct rdma_ah_attr *ah_attr, >>>> + bool sleepable, >>>> struct ib_udata *udata); >>> >>> I think the Linux style consensus here is that these should be a flag with a >>> enum name not a bool >> >> Will change. >> I'm familiar with the no bool fields in structs >> (https://lkml.org/lkml/2017/11/21/384), good to know it applies to function >> parameters as well. > > I think it is under the rational that > > foo(true) > > tells the user nothing, while > > foo(DO_SOMETHING) > > Should be more informative > > Same argument applies to 'int' pretending to be bool > > At least a struct member has a name.. > > Jason > That makes sense, thanks for the explanation.