From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbdB1JHo (ORCPT ); Tue, 28 Feb 2017 04:07:44 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:52049 "EHLO hera.aquilenet.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbdB1JH0 (ORCPT ); Tue, 28 Feb 2017 04:07:26 -0500 Date: Tue, 28 Feb 2017 10:05:40 +0100 From: Samuel Thibault To: "Pranay Kr. Srivastava" Cc: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH SPEAKUP v2 2/3] remove unecessary initial allocation of vc Message-ID: <20170228090540.wrgm52x72zbter63@var.youpi.perso.aquilenet.fr> Mail-Followup-To: Samuel Thibault , "Pranay Kr. Srivastava" , w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20170228082755.53396-1-pranjas@gmail.com> <20170228082755.53396-3-pranjas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170228082755.53396-3-pranjas@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pranay Kr. Srivastava, on mar. 28 févr. 2017 13:57:54 +0530, wrote: > This patch removes the unnecessary allocation of > current foreground vc during initialization. > > This initialization is already handled in the loop > that follows it for all available virtual consoles. > > Signed-off-by: Pranay Kr. Srivastava Reviewed-by: Samuel Thibault > --- > drivers/staging/speakup/main.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c > index a1d5b66..ca817ca 100644 > --- a/drivers/staging/speakup/main.c > +++ b/drivers/staging/speakup/main.c > @@ -2317,7 +2317,6 @@ static int __init speakup_init(void) > { > int i; > long err = 0; > - struct st_spk_t *first_console; > struct vc_data *vc = vc_cons[fg_console].d; > struct var_t *var; > > @@ -2342,15 +2341,6 @@ static int __init speakup_init(void) > if (err) > goto error_virtkeyboard; > > - first_console = kzalloc(sizeof(*first_console), GFP_KERNEL); > - if (!first_console) { > - err = -ENOMEM; > - goto error_alloc; > - } > - > - speakup_console[vc->vc_num] = first_console; > - speakup_date(vc); > - > for (i = 0; i < MAX_NR_CONSOLES; i++) > if (vc_cons[i].d) { > err = speakup_allocate(vc_cons[i].d); > @@ -2412,7 +2402,6 @@ static int __init speakup_init(void) > for (i = 0; i < MAX_NR_CONSOLES; i++) > kfree(speakup_console[i]); > > -error_alloc: > speakup_remove_virtual_keyboard(); > > error_virtkeyboard: > -- > 2.10.2 > -- Samuel ben oui ce serait idiot, mais osb -+- m'en fous de faire un truc débile ! -+-