Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1300370imm; Wed, 6 Jun 2018 13:46:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKOrZy7L2pR86VQVTkOzAa42exo6THW68TJdcM0JUApSPYq79Zurt5r9FKfFHS4v+Nc+Nx2 X-Received: by 2002:a17:902:8a8c:: with SMTP id p12-v6mr4652017plo.94.1528318003364; Wed, 06 Jun 2018 13:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528318003; cv=none; d=google.com; s=arc-20160816; b=stll09ujAy/2lmAocOhMgQ9hFXLfBdK7cbgQaQModWuG8FuIMr1SHBb9WNPXBmL4Ca t6lGUvuM5iIn9+lqYSegG0apJJKnOWl7t4Ym1YDmtsZ/Fs7ZD9JSwAxO5sirYe+JtcXR 3jzvAbGevLZc5t8yH44CHUEPz+HlBdLoHyj5usaGgcOEUkRY4o0WDJ30wumBs4uI8eAS ZEweuXvo/lyl50S3pArecr1Wb842YmV3+4BR+pt3B7Xwo1bysXXA+epfmXq0D4xixyYP 7G7Xt/pG5l0rcbZNBFSo1Ahp05Nucskc0lC1Koqed+JiaLy+B2PMNWjBL3QQj430cNNU eMNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:arc-authentication-results; bh=8rBB/6ngxFD1kbrJRNYC6JAJVQmfUXkVRqnR7Ig5KK0=; b=DYZVqTZ3Wyj8KzNZvlcK4jxlqAd5rgb1E4VoCM3WOVKllYwef+kBIOqEV+A9PR91zR tA5RQ7zjAB5niEMlTXufIepeuDYM+5YbhTBKsmqQrSiAGBWqu4WlpGdie0ulpBs67wUu D8mqX5W9EU4J31Yrwd0KkdU/sd1RL3Pn5aUbiySvAwk97Py7YL/xK6SSy9+mFXyVEPvY YIoyQbQZ6vHjqnO/cDsxnrvDdXR2j7O97scNcXosFalxEXLLs8qs/xg9RErAG0gfX4WQ bA8mFLx4pJserkmn5UwohVBBDIdngsalp54mbyWgwxsHU06O+UF2tRQtOzcAnbhGG/lQ EwLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73-v6si25452368pld.450.2018.06.06.13.46.29; Wed, 06 Jun 2018 13:46:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932324AbeFFU2Y (ORCPT + 99 others); Wed, 6 Jun 2018 16:28:24 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:47287 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbeFFU2W (ORCPT ); Wed, 6 Jun 2018 16:28:22 -0400 Received: from tanglefoot ([86.19.254.212]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.179]) with ESMTPSA (Nemesis) id 0Lmc9z-1g0ojr3G9j-00aCXb; Wed, 06 Jun 2018 22:28:16 +0200 Date: Wed, 6 Jun 2018 21:28:12 +0100 From: Justin Skists To: Samuel Thibault , "Speakup is a screen review system for Linux." , devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: speakup: refactor synths array to use a list Message-ID: <20180606202812.GA25689@tanglefoot> References: <20180604095212.GA18381@tanglefoot> <20180606132628.fxykchbznrwzgwqt@var.youpi.perso.aquilenet.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline In-Reply-To: <20180606132628.fxykchbznrwzgwqt@var.youpi.perso.aquilenet.fr> User-Agent: Mutt/1.10.0 (2018-05-17) X-Provags-ID: V03:K1:kFFnz8crkv9ZiygJ44AQodX4rtl/eD8eiH1UbXe7zORLfOfP/4W S5SkY5rEUQbLlPZlKfOWWfrkYfYGK9K3xUneBXUaxrmHSYsENvexx5B7U3QLWtZ1+Fklvwm iquQD5Dqdc2lF5UTgviNZeFK8Ogbz/pbf0orcXCJJhXpZUEc+9k9+bNrFpoE05KjB/OqDT2 dxZGD2nvbKrv/XG1ilNGA== X-UI-Out-Filterresults: notjunk:1;V01:K0:zynH3o3dV9g=:N8gVUvpxvXXcOmwTdpeP1C PXolglRKLC1ObF+Jd5HmiBcILb1o3g6axdc6hVsOF61ayLbU+QztjTEFqiqhxUC3Ihe8t4DFf h8LH+XJJ2hZ/ki/3B5QDPm74K8xqV8avf1vmMkR1XC8z9dwdc842emPp2P14HGw+u6L/V2pu3 /5fvbDZnKjaIiFp4S0xmtBYw5f6b7TIBdzptZerbYjEdDY5eeOMmTfrozywOePLWurPWUeSci a1Qplowyr5jHlPwxPagagRH/w7WbRiphkoeNRHGE4XQTzwMewVs0B61APGFk+n1G2MZr9+px9 8ildmHZSuxe7NeTVJk9m7+ZIYQVmVIUzphAJJFBtosQNkqPJFfp71ZtPeBWdkD/waWrIHokoC uIzTnfySowsTzk/O8EiPhpE7Ya1jvrBU57UCxoXJMFcPR36RW5fKxHzrObFDFw0wxjhY1/kR+ ROn9blpgtdcFueiih1PcMkaPTi8Kkbvph2MQBstSkWM/AY33sQhzAhEYlYx2xFYr91JNsOiL1 U+d64vq+xG1zMA0UdYyuwnninlrh9hxg3lbczKXsMxAkPis/ZulY/5pt/bFvVbYtV05zroUaw ALFTTaFRv2yzOVpiE9wzAyACl25Qb1XNC2ZoNWQsi0yAuC66Xg9KRkdRe7TQvErmmABz9Ebvj k+fRwUUUtWesX2oSUb/xm/83iLbNw0mYijzulw061NTxosVbs/Z58VcK2PYGUnLhoUnE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 06, 2018 at 03:26:28PM +0200, Samuel Thibault wrote: > Hello, > > Justin Skists, le lun. 04 juin 2018 10:52:12 +0100, a ecrit: > > The synths[] array is a collection of synths acting like a list. > > There is no need for synths to be an array, so refactor synths[] to use > > standard kernel list_head API, instead, and modify the usages to suit. > > As a side-effect, the maximum number of synths has also become redundant. > > This looks good to me, > > Reviewed-by: Samuel Thibault Thank you. > Did you test to e.g. insmod speakup_soft ; insmod speakup_dummy ; rmmod > speakup_soft ; rmmod speakup_dummy > > to make sure it did work correctly? I did. And I swapped synths via the sysfs interface. As always, it's always good to double-check. So, I've scripted the test sequence that I used and attached the output. > I'd also rather see it tested in the real wild before committing. As it should be. :) Justin --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="evidence.txt" Kernel info ----------- # uname -a Linux buildroot 4.17.0-rc7-next-20180601 #1 SMP Mon Jun 4 09:31:05 BST 2018 x86_64 GNU/Linux insert modules -------------- # modprobe speakup # modprobe speakup_dummy dev=ttyS1 ser=1 start=1 # modprobe speakup_soft # lsmod Module Size Used by Tainted: G speakup_soft 16384 0 speakup_dummy 16384 0 speakup 118784 2 speakup_soft,speakup_dummy switching to soft ----------------- # echo 'soft' > /sys/accessibility/speakup/synth # cat /sys/accessibility/speakup/synth soft switching to dummy ------------------ # echo 'dummy' > /sys/accessibility/speakup/synth # cat /sys/accessibility/speakup/synth dummy Removing modules ---------------- # rmmod speakup_dummy # rmmod speakup_soft # lsmod Module Size Used by Tainted: G speakup 118784 0 view message log ---------------- # tail -25 /var/log/messages Jun 6 20:06:57 buildroot kern.notice kernel: random: ssh-keygen: uninitialized urandom read (32 bytes read) Jun 6 20:06:57 buildroot kern.notice kernel: random: sshd: uninitialized urandom read (32 bytes read) Jun 6 20:06:57 buildroot auth.info sshd[105]: Server listening on :: port 22. Jun 6 20:06:57 buildroot auth.info sshd[105]: Server listening on 0.0.0.0 port 22. Jun 6 20:06:57 buildroot daemon.info : starting pid 107, tty '/dev/tty1': '/sbin/getty -L tty1 0 vt100 ' Jun 6 20:07:00 buildroot auth.info login[107]: root login on 'tty1' Jun 6 20:07:08 buildroot kern.notice kernel: random: crng init done Jun 6 20:07:12 buildroot kern.warn kernel: speakup: module is from the staging directory, the quality is unknown, you have been warned. Jun 6 20:07:13 buildroot kern.info kernel: input: Speakup as /devices/virtual/input/input4 Jun 6 20:07:13 buildroot kern.info kernel: initialized device: /dev/synth, node (MAJOR 10, MINOR 25) Jun 6 20:07:13 buildroot kern.info kernel: speakup 3.1.6: initialized Jun 6 20:07:13 buildroot kern.info kernel: synth name on entry is: (null) Jun 6 20:07:13 buildroot kern.warn kernel: speakup_dummy: module is from the staging directory, the quality is unknown, you have been warned. Jun 6 20:07:13 buildroot kern.warn kernel: synth probe Jun 6 20:07:13 buildroot kern.warn kernel: speakup_soft: module is from the staging directory, the quality is unknown, you have been warned. Jun 6 20:07:13 buildroot kern.info kernel: releasing synth dummy Jun 6 20:07:13 buildroot kern.warn kernel: synth probe Jun 6 20:07:13 buildroot kern.info kernel: initialized device: /dev/softsynth, node (MAJOR 10, MINOR 26) Jun 6 20:07:13 buildroot kern.info kernel: initialized device: /dev/softsynthu, node (MAJOR 10, MINOR 27) Jun 6 20:07:13 buildroot kern.warn kernel: soft already in use Jun 6 20:07:13 buildroot kern.info kernel: releasing synth soft Jun 6 20:07:13 buildroot kern.info kernel: unregistered /dev/softsynth Jun 6 20:07:13 buildroot kern.info kernel: unregistered /dev/softsynthu Jun 6 20:07:13 buildroot kern.warn kernel: synth probe Jun 6 20:07:13 buildroot kern.info kernel: releasing synth dummy --17pEHd4RhPHOinZp--