Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2469550rwi; Sat, 15 Oct 2022 14:53:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4FjeuzxAegAyBdo2qXixdj7THvb+2wmQ2r2EXcTQtVkeus9kEt+/nMIxNZNXAVY+g+/RQw X-Received: by 2002:a17:907:7b86:b0:78d:cb21:da0c with SMTP id ne6-20020a1709077b8600b0078dcb21da0cmr3451548ejc.24.1665870783571; Sat, 15 Oct 2022 14:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665870783; cv=none; d=google.com; s=arc-20160816; b=S1xPpCu2Xg6wGoiUi/2CY0aIiQ37PZKZpVwlyKRYWxqt/v8+f2Nw9JCR9hurjkPDfo u1ZxT9XecGyAAjGtcu6v5iz349KSBylLcgaMN8z0tp0QaBpSRFezX39FAZbsJX1hJTKn e/K0kp7fOpg0gvIBGlZIv7kfqU6+GJqW7TN8j43gW8rVK00DQuVGIDgcHzow1AIG0LPG TM5rZEbYb2voGk0V3AG7fzkB6lT0I3FjONZqN0g85NuFy8hNwQblfO63CtyUEAdMyRku NcgAvtKbRoCcBnzVa2Yx68jKIge4zx4B3p1JK2Bx97YaqnEkUCUPuy7xWqYxZpOf6OsC JGvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:organization:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=bIEL7w8U2ZBnMh4gBj4/Tr7OcD7cC8wvPoWb1x5BKWE=; b=Yn4napW2ujmeeKSHWHZZ33wMfcyc8PqSYbCbNzqTQ3q+YdcUwkpBRWWERM/M4FoAd3 bCWHRrdgnX3cZ7hiHmxQMb+8k0RHY1FHhZxHVyBeEdurpnL2LNLOlgB2OwDRKP+2K9m/ vPwDhAbu7ujxKTziwg6rgzN2FhYW0FFuDeaiGaNJEvwMXEI7v75BuKZADq6J7REXfKFz RC+xehrLXX3N1jo1T0/7SeCakIE+LLmdkgZoHWfmLkARdtPoLTn/Z2NcQwmvjTeNgJcH BcVgorPNhidZKyHnES3oyaT+zBsHTGj1BLOIXlKclryq8PWdUhDjo+jTSvERJsCGjavd sXgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr18-20020a1709073f9200b0073d626e2ef8si5029946ejc.461.2022.10.15.14.52.19; Sat, 15 Oct 2022 14:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbiJOVaR (ORCPT + 99 others); Sat, 15 Oct 2022 17:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbiJOVaP (ORCPT ); Sat, 15 Oct 2022 17:30:15 -0400 Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04720DF13 for ; Sat, 15 Oct 2022 14:30:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id EA3FB2010E; Sat, 15 Oct 2022 23:30:12 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r8jX9eZX9SiD; Sat, 15 Oct 2022 23:30:12 +0200 (CEST) Received: from begin (lfbn-bor-1-376-208.w109-215.abo.wanadoo.fr [109.215.91.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id B0B1A20109; Sat, 15 Oct 2022 23:30:12 +0200 (CEST) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1ojojU-001Tsz-1S; Sat, 15 Oct 2022 23:30:12 +0200 Date: Sat, 15 Oct 2022 23:30:12 +0200 From: Samuel Thibault To: Osama Muhammad Cc: gregkh@linuxfoundation.org, speakup@linux-speakup.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Accessiblity: speakup: specifying the default driver parameters among the module params Message-ID: <20221015213012.zctcugroxehxtjim@begin> Mail-Followup-To: Samuel Thibault , Osama Muhammad , gregkh@linuxfoundation.org, speakup@linux-speakup.org, linux-kernel@vger.kernel.org References: <20221013223024.22708-1-osmtendev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221013223024.22708-1-osmtendev@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Osama Muhammad, le ven. 14 oct. 2022 03:30:24 +0500, a ecrit: > This is an enhancement which allows to specify the default driver > parameters among the module parameters. > > Adding default variables to the speakup_soft module > allows to easily set that at boot, rather than > setting the sys variables after boot. > More details can be found here: > https://github.com/linux-speakup/speakup/issues/7 > > Signed-off-by: Osama Muhammad > > --- > > Changes since v1: > - Added NB_ID as the last member of enum default_vars_id. > - Added NB_ID as the size of array vars. > - Made sure that that the enteries in vars are in correct order. Thanks! It looks almost good to me now. > --- > drivers/accessibility/speakup/speakup_soft.c | 57 ++++++++++++++------ > 1 file changed, 42 insertions(+), 15 deletions(-) > > diff --git a/drivers/accessibility/speakup/speakup_soft.c b/drivers/accessibility/speakup/speakup_soft.c > index 28c8f60370cf..5d8e2c1e7f4c 100644 > --- a/drivers/accessibility/speakup/speakup_soft.c > +++ b/drivers/accessibility/speakup/speakup_soft.c > @@ -33,21 +33,30 @@ static struct miscdevice synth_device, synthu_device; > static int init_pos; > static int misc_registered; > > -static struct var_t vars[] = { > + > +enum default_vars_id { > + DIRECT_ID = 0, CAPS_START_ID, CAPS_STOP_ID, > + PAUSE_ID, RATE_ID, PITCH_ID, INFLECTION_ID, > + VOL_ID, TONE_ID, PUNCT_ID, VOICE_ID, > + FREQUENCY_ID, V_LAST_VAR_ID, > + NB_ID > +}; > + > + > +static struct var_t vars[NB_ID] = { > /* DIRECT is put first so that module_param_named can access it easily */ > - { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } }, > - You can now remove the comment, since now the ordering is not important. Samuel