nvme driver will add 4 sets for supporting NVMe weighted round robin, and some of these sets may be empty(depends on user configuration), so each particular set is assigned one static index for avoiding the management trouble, then the empty set will be been by irq_create_affinity_masks(). This patch make API more compatible. Signed-off-by: Weiping Zhang <zhangweiping@xxxxxxxxxxxxxx> --- kernel/irq/affinity.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index 4d89ad4fae3b..83154615cc9d 100644 --- a/kernel/irq/affinity.c +++ b/kernel/irq/affinity.c @@ -462,6 +462,10 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd) unsigned int this_vecs = affd->set_size[i]; int ret; + /* skip empty affinity set */ + if (this_vecs == 0) + continue; + ret = irq_build_affinity_masks(curvec, this_vecs, curvec, masks); if (ret) { -- 2.14.1