Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdF0G33 (ORCPT ); Tue, 27 Jun 2017 02:29:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44104 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbdF0G3Y (ORCPT ); Tue, 27 Jun 2017 02:29:24 -0400 Date: Tue, 27 Jun 2017 08:29:17 +0200 From: Greg Kroah-Hartman To: Zhongping Tan =?utf-8?B?KOiwreS4reW5syk=?= Cc: Arnd Bergmann , Orson Zhai =?utf-8?B?KOe/n+S6rCk=?= , Linux Kernel Mailing List Subject: Re: =?utf-8?B?562U5aSN?= =?utf-8?Q?=3A?= [RFC PATCH] char: misc: Init misc->list in a safe way Message-ID: <20170627062917.GA10376@kroah.com> References: <20170626093123.23838-1-orson.zhai@spreadtrum.com> <8f919e212d5149e286422d58a5732356@SHMBX02.spreadtrum.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8f919e212d5149e286422d58a5732356@SHMBX02.spreadtrum.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 29 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Tue, Jun 27, 2017 at 02:02:13AM +0000, Zhongping Tan (谭中平) wrote: > Ok, firstly we need to discuss the list usage, for list head we need > do initialization, but for list node we don't need initialization at > all. I don't understand, why is your misc driver touching that field at all? Do I need to go and make it "private" somehow? > And for misc_list head, we use LIST_HEAD to define and initialize > it. So I don't know why we put INIT_LIST_HEAD(&misc->list) in function > misc_register, any bugs when without it? Again, what is wrong with the code today? What driver is this causing problems for? thanks, greg k-h