Thread (33 messages) 33 messages, 7 authors, 2016-09-26

Re: [PATCH 01/13] genirq/msi: Add cpumask allocation to alloc_msi_entry

flat view

From: Thomas Gleixner <hidden>
Date: 2016-09-20 09:00:52
Also in: lkml

On Tue, 20 Sep 2016, Alexander Gordeev wrote:
On Mon, Sep 19, 2016 at 03:50:07PM +0200, Christoph Hellwig wrote:
quoted
On Mon, Sep 19, 2016 at 09:30:58AM +0200, Alexander Gordeev wrote:
quoted
quoted
 	INIT_LIST_HEAD(&desc->list);
 	desc->dev = dev;
+	desc->nvec_used = nvec;
(*)
quoted
quoted
quoted
+	if (affinity) {
+		desc->affinity = kmemdup(affinity,
+			nvec * sizeof(*desc->affinity), GFP_KERNEL);
+		if (!desc->affinity) {
+			kfree(desc);
+			return NULL;
+		}
+	}
nit - should not "desc" initialization follow "desc->affinity" allocation?
I can't parse that sentence.  Do you mean the desc->nvec_used setup?
Yes, the inits above (*) would be useless if desc->affinity allocation failed.
And that matters how?

Thanks,

	tglx
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help