Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4291599ybi; Sat, 6 Jul 2019 02:06:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBswyfYa0yyzh2qb3hUqbjM3F3q0s5BeQ5iToq8SJfC/+C/msvfEj0G9T8/KWjHM+Gutlj X-Received: by 2002:a65:64cf:: with SMTP id t15mr9733517pgv.88.1562403969014; Sat, 06 Jul 2019 02:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562403969; cv=none; d=google.com; s=arc-20160816; b=IUa67aq+J+JbsfgOgv1ltvq4z1Y/6kRoxpBKbPc6/hayxmD6amoAmTYLe1g6SqwLW9 B9pqX9jNlS2Uv7LiyJrmaT6lPLSljoDHKbzlb2Wirii6gKJus3HhVk6o8IjHwmSMpf17 dkQOuSAR6uYZMvOkyE2AahM5pyZmjvl2QvHiRnahxxJLD0v+hjSB/yrmA1YJ/wxruoxz N40jimVfZvAP15XKGeraB4r/GIDgsRVItDCuyVQxNxk57bDFWiWrcmZOBkhMX4IdrorP GRCeYXhosspjyokvOtWWHDmfVWVp2r8caMYx6I1OkwAh8Q5PMBauc4gdQSr2JMBLwUon rmAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=xRqbsH6ZzTzJD/bb0kXvBy1YnRUuHbkN6yKPr6T17fU=; b=xyLpehCW6CzmIszzRiRi54UqWJjuO+KIO6Jv8N9k9By+9bRosTtV3B+gudF/uMgyTe 2EwKfOP4XjUuYJ3x/RfTA/7a4mKQRVLfonME0CDeN+Z0cwDS05TVS1eByHYl1RWvdY7t 7wHb+U5VYUvH0pfu1a0kdA8rNxpMOfN16S/9RSofgICHo6xvvwhf0zR1AfTIY5/xtLFt u3nVtonmX1vydYLoFynQGgGRH5qJfb5G+3BtxYmxPhOSXuNOGnwC3CWjisrS2/Ackmvc i54tzyIP8L8JUGPi4bf7gaCb0lJK3V/TIoITA8Ej4ppUTYcaZMwWyhhqqFfkEjURHFVr e+8w== 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 g8si10585699plt.273.2019.07.06.02.05.52; Sat, 06 Jul 2019 02:06:08 -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 S1726016AbfGFJFc (ORCPT + 99 others); Sat, 6 Jul 2019 05:05:32 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:51896 "EHLO hera.aquilenet.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbfGFJFc (ORCPT ); Sat, 6 Jul 2019 05:05:32 -0400 X-Greylist: delayed 308 seconds by postgrey-1.27 at vger.kernel.org; Sat, 06 Jul 2019 05:05:32 EDT Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2ED7F6069; Sat, 6 Jul 2019 11:00:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4_8_IRcTvWRm; Sat, 6 Jul 2019 11:00:20 +0200 (CEST) Received: from function (dhcp-64-231.ens-lyon.fr [140.77.64.231]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 73E6A6063; Sat, 6 Jul 2019 11:00:20 +0200 (CEST) Received: from samy by function with local (Exim 4.92) (envelope-from ) id 1hjgYN-0004Wq-Jw; Sat, 06 Jul 2019 11:00:19 +0200 Date: Sat, 6 Jul 2019 11:00:19 +0200 From: Samuel Thibault To: Markus Elfring Cc: speakup@linux-speakup.org, devel@driverdev.osuosl.org, Bhagyashri Dighole , Chris Brannon , Greg Kroah-Hartman , Kirk Reiser , Okash Khawaja , William Hubbs , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] staging: speakup: One function call less in speakup_win_enable() Message-ID: <20190706090019.rivposzrqesodhso@function> Mail-Followup-To: Samuel Thibault , Markus Elfring , speakup@linux-speakup.org, devel@driverdev.osuosl.org, Bhagyashri Dighole , Chris Brannon , Greg Kroah-Hartman , Kirk Reiser , Okash Khawaja , William Hubbs , LKML , kernel-janitors@vger.kernel.org References: <11f79333-25c3-1ad9-4975-58c64821f3fe@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11f79333-25c3-1ad9-4975-58c64821f3fe@web.de> Organization: I am not organized User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Markus Elfring, le sam. 06 juil. 2019 10:15:30 +0200, a ecrit: > From: Markus Elfring > Date: Sat, 6 Jul 2019 10:03:56 +0200 > > Avoid an extra function call by using a ternary operator instead of > a conditional statement. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring Reviewed-by: Samuel Thibault > --- > drivers/staging/speakup/main.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c > index 488f2539aa9a..03bbc9a4dbb3 100644 > --- a/drivers/staging/speakup/main.c > +++ b/drivers/staging/speakup/main.c > @@ -1917,10 +1917,9 @@ static void speakup_win_enable(struct vc_data *vc) > return; > } > win_enabled ^= 1; > - if (win_enabled) > - synth_printf("%s\n", spk_msg_get(MSG_WINDOW_SILENCED)); > - else > - synth_printf("%s\n", spk_msg_get(MSG_WINDOW_SILENCE_DISABLED)); > + synth_printf("%s\n", spk_msg_get(win_enabled > + ? MSG_WINDOW_SILENCED > + : MSG_WINDOW_SILENCE_DISABLED)); > } > > static void speakup_bits(struct vc_data *vc) > -- > 2.22.0 > -- Samuel --- christ gives channel operator status to Dieu -+- #ens-mim and hell -+-