Thread (37 messages) read the whole thread 37 messages, 3 authors, 2016-02-19

Re: [PATCH v4 04/22] kthread: Add create_kthread_worker*()

From: Tejun Heo <tj@kernel.org>
Date: 2016-01-25 18:54:28
Also in: linux-api, lkml

On Mon, Jan 25, 2016 at 04:44:53PM +0100, Petr Mladek wrote:
+struct kthread_worker *
+create_kthread_worker_on_cpu(int cpu, const char namefmt[])
+{
+	if (cpu < 0 || cpu > num_possible_cpus())
+		return ERR_PTR(-EINVAL);
Comparing cpu ID to num_possible_cpus() doesn't make any sense.  It
should either be testing against cpu_possible_mask or testing against
nr_cpu_ids.  Does this test need to be in this function at all?

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help