From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753502AbcBGH3t (ORCPT ); Sun, 7 Feb 2016 02:29:49 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60366 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbcBGH3s (ORCPT ); Sun, 7 Feb 2016 02:29:48 -0500 Date: Sat, 6 Feb 2016 23:29:47 -0800 From: Greg Kroah-Hartman To: Pan Xinhui Cc: linux-kernel@vger.kernel.org, Jiri Slaby , mnipxh@163.com, yanmin_zhang@linux.intel.com, alan@linux.intel.com Subject: Re: [PATCH V2] tty/n_gsm.c: use gsm->num to remove mux itself from gsm_mux[] Message-ID: <20160207072947.GA1214@kroah.com> References: <568B73FC.7020407@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <568B73FC.7020407@linux.vnet.ibm.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 Tue, Jan 05, 2016 at 03:42:52PM +0800, Pan Xinhui wrote: > From: Pan Xinhui > > There is one filed gsm->num to store mux's index of gsm_mux[]. So use > gsm->num to remove itself from gsm_mux[] instead of the for-loop > traverse in gsm_cleanup_mux(). > > Signed-off-by: Pan Xinhui > Reviewed-by: Alan Cox > --- > change from V1: > lock is also held for the if() > --- > drivers/tty/n_gsm.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) Doesn't apply to my tty-next branch of the tty.git tree :(