On Wed, Aug 03, 2016 at 02:37:21PM -0400, ira.weiny@xxxxxxxxx wrote: > From: Tadeusz Struk <tadeusz.struk@xxxxxxxxx> > > If CONFIG_FRAME_WARN is small (1K) and CONFIG_NR_CPUS big > then a frame size warning is triggered during build. > Allocate the cpu mask dynamically to silence the warning. > > Reviewed-by: Sebastian Sanchez <sebastian.sanchez@xxxxxxxxx> > Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx> > Signed-off-by: Tadeusz Struk <tadeusz.struk@xxxxxxxxx> > --- > drivers/infiniband/hw/hfi1/affinity.c | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > > diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/hfi1/affinity.c > index 79575ee873f2..62be2eda1b96 100644 > --- a/drivers/infiniband/hw/hfi1/affinity.c > +++ b/drivers/infiniband/hw/hfi1/affinity.c > @@ -682,7 +682,7 @@ int hfi1_set_sdma_affinity(struct hfi1_devdata *dd, const char *buf, > size_t count) > { > struct hfi1_affinity_node *entry; > - struct cpumask mask; > + cpumask_var_t mask; > int ret, i; > > spin_lock(&node_affinity.lock); > @@ -692,19 +692,24 @@ int hfi1_set_sdma_affinity(struct hfi1_devdata *dd, const char *buf, > if (!entry) > return -EINVAL; > > - ret = cpulist_parse(buf, &mask); > - if (ret) > + ret = zalloc_cpumask_var(&mask, GFP_KERNEL); > + if (!ret) > return ret; Ira, Are you aware that before this change you returned value different from zero in case of error and now you will return zero? Thanks
Attachment:
signature.asc
Description: Digital signature