Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3839759imj; Tue, 12 Feb 2019 05:38:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IZeaAuJwDnBw2ECTPwTceJ50zoMd6zJlIGC5ZNPJt5JVAijBDKrRfYAvRZlTU8pNcIq4y2T X-Received: by 2002:a17:902:584:: with SMTP id f4mr4243853plf.28.1549978709220; Tue, 12 Feb 2019 05:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549978709; cv=none; d=google.com; s=arc-20160816; b=dhL1vdsjphJBISvzE1I9a6b9Rn6Eyq3mg0K8RkYVScrvwhYc2+fpJLXKDUtGb9UKCV vZphpTufyoyn+e4o/TmYMKbCHROdNLC4Rf6bfrcxbfyDUXPEyyk0rmRHe2RFfXRevDMK BHImthDtHrcgCxgNasS2yPuqzn1OegMR9ZohnQZ+FNt509ym3pN2WW354sA2qVqdEsaD I2USX1wG8WpKc+GVLUjnTVxOlEZi2IA0ssWQzoqrU+RfMUnsueqPsdJOyFLSRAPIoNh5 bQIDrN5wujliIddSU7cKRc7tA9S6SJ3ol4RQ/KU8l5nR0rWxCNSjswWBgmn2DVQv/WSB Q3Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=mW0XRprvGGZykYH39S7gVMgCgN87Qz9shxuZaKTT4fE=; b=ecn9CF+vuNFXdWqSS4owJGDGUVlyY6h6W/V9jLgxUBptDEai9lwzRYlcqnnok2Ov3y wKfOIxYQsJPF5ofddmmKJcrxHd9rGn/IUel3QPgPaxyQc2lxthHz/l7GlehHS/pOFIID JML8dEWPuSy1ESIuK63X7tgeNVOg1H++TwFH9ZWBNmTYPHQZ+QMQyyyz+xAWq0Zcata3 7y5IJt7pp4kAd9ZSkBc7XJe07pmCcjCw+I/wM2PFXChEe0JadA3sIOGRPSvmgd/J6ZAX MmOCkqB9w797yr5QNPyGJp6+AGQMHZH8qfCXclhCp1OQPtGl8TW5H0DrLKGvxlp/7Xnq jckg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay7si12889302plb.410.2019.02.12.05.38.13; Tue, 12 Feb 2019 05:38:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729849AbfBLNfj (ORCPT + 99 others); Tue, 12 Feb 2019 08:35:39 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:43354 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbfBLNfj (ORCPT ); Tue, 12 Feb 2019 08:35:39 -0500 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gtYDi-0003rU-5V; Tue, 12 Feb 2019 14:35:30 +0100 Date: Tue, 12 Feb 2019 14:35:29 +0100 (CET) From: Thomas Gleixner To: Ming Lei cc: Christoph Hellwig , Bjorn Helgaas , Jens Axboe , linux-block@vger.kernel.org, Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Keith Busch Subject: Re: [PATCH V2 1/4] genirq/affinity: store irq set vectors in 'struct irq_affinity' In-Reply-To: <20190212130439.14501-2-ming.lei@redhat.com> Message-ID: References: <20190212130439.14501-1-ming.lei@redhat.com> <20190212130439.14501-2-ming.lei@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Feb 2019, Ming Lei wrote: > Currently the array of irq set vectors is provided by driver. > > irq_create_affinity_masks() can be simplied a bit by treating the > non-irq-set case as single irq set. > > So move this array into 'struct irq_affinity', and pre-define the max > set number as 4, which should be enough for normal cases. You really want to add some sanity check which makes sure, that nr_sets is <= IRQ_MAX_SETS. Thanks, tglx