From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757367AbcHWHyf (ORCPT ); Tue, 23 Aug 2016 03:54:35 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35959 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476AbcHWHyb (ORCPT ); Tue, 23 Aug 2016 03:54:31 -0400 Date: Tue, 23 Aug 2016 09:54:01 +0200 From: Johan Hovold To: Mathieu OTHACEHE Cc: Oliver Neukum , johan@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v2 03/22] usb: serial: ti_usb_3410_5052: Use kzalloc instead of kmalloc Message-ID: <20160823075401.GC16896@localhost> References: <1469606944.2408.0.camel@suse.com> <87y44nntdn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y44nntdn.fsf@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 27, 2016 at 02:46:32PM +0200, Mathieu OTHACEHE wrote: > > > in that case, where is the initialisation to 0 you avoid and hence > > can remove from the code? > > Hi, > > In v1, kzalloc was useful to avoid wFlags initialisation to 0 : > > https://lkml.org/lkml/2016/5/12/139 > > In v2 wFlags initialisation has be removed so this patch has no purpose > anymore, my bad. Actually, the kzalloc is now making sure that the cXon and cXoff fields are always initialised. So I think the change is good, but please update commit message. Thanks, Johan