Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755626AbbFOMq5 (ORCPT ); Mon, 15 Jun 2015 08:46:57 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49986 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754135AbbFOMqr (ORCPT ); Mon, 15 Jun 2015 08:46:47 -0400 Date: Mon, 15 Jun 2015 14:46:40 +0200 From: Petr Mladek To: Tejun Heo Cc: Andrew Morton , Oleg Nesterov , Ingo Molnar , Peter Zijlstra , Richard Weinberger , Steven Rostedt , David Woodhouse , linux-mtd@lists.infradead.org, Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org, Chris Mason , "Paul E. McKenney" , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , live-patching@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 02/18] kthread: Add API for iterant kthreads Message-ID: <20150615124640.GM9409@pathway.suse.cz> References: <1433516477-5153-1-git-send-email-pmladek@suse.cz> <1433516477-5153-3-git-send-email-pmladek@suse.cz> <20150609062349.GW21465@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150609062349.GW21465@mtj.duckdns.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 932 Lines: 30 On Tue 2015-06-09 15:23:49, Tejun Heo wrote: > Hello, Petr. > > On Fri, Jun 05, 2015 at 05:01:01PM +0200, Petr Mladek wrote: > > +static int kthread_iterant_fn(void *kti_ptr) > > +{ > > + struct kthread_iterant *kti = kti_ptr; > > + void *data = kti->data; > > + > > + if (kti->init) > > + kti->init(data); > > + > > + do { > > + if (kti->func) > > + kti->func(data); > > Is supporting kthread_iterant w/o the body function intentional? If > so, did you have anything specific on mind for it? I don't think it > matters either way. Just curious how this came to be. Good question. It might make sense to add a warning for kthreads with empty main function. Best Regards, Petr -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/