Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4951621ybi; Sat, 6 Jul 2019 17:55:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPnAx66ypWJdEbMFXwaaiY044+WbeSBu8nKykqBG4ATEtQAvTIgx+JJ/y7GJkdjT52p1An X-Received: by 2002:a17:90a:8b98:: with SMTP id z24mr7120685pjn.77.1562460901043; Sat, 06 Jul 2019 17:55:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562460901; cv=none; d=google.com; s=arc-20160816; b=wMYLtHrtrokn699UkTd1GpMeFZgoXZWn3iA03whQBiIN8JqPdRDbvicl4by5hUdgoI zvF1iUOXHIpH7mhdJSVVTQOgokNc0pNool+LuaqcSTdao307jd0H2+GYjqZlKeJqDlmR W6OYoamjgGq0iaxy6DtirQuYy+FgHw6dTsY8o8V/2POc8RlpFogxU1uegQowJDC7M3O7 pElZORGyQsvo34aqggOhswWTzdMnoJo41AxZDvifg0H3j5gK42X5DsqoobjOrMP/mnjl QZ/z4K+fTDlIy+Khrr5+wI+OXbtgX9VSQpWWn41NJApxSqYFPqp6wzTIyCEWS1qN0sux YpyQ== 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:cc :to:from:date; bh=4wZmfGjqwFSqNhInLDV9lRy2txF1wxfEW4rEjIBTqnk=; b=Zp5lUkn/V6TvujudQfF6xjx94rYaDG/aIh7dMojg+FzpSSdsosE21DMO/uaCNk70lK SmRz0ZLE4jTHoZdR6Fpw4cEolFHuFfYnMHdpTfjDp3bUkrZCpzgLqE0TZLRpaL7q9U/B P054bKrhRxJDRuBVTMVCgQRR9iuszxKtJdPR/Fb9Cu2L5ruBi1mrY39zj6UDOW/3vM42 VeKmsgZAfxk111cettjpdX24MF+EjY2fADPt4m8aCMU13MwF9+VIM/mXWFB0oq2sffiC W2A7aOrGmGbhMzog/e6uZ7doklMu5i2RYp516+T/gC8YooGKNMXUB2cvj30OHa2sZqbw cHyA== 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 91si12726554ply.196.2019.07.06.17.54.44; Sat, 06 Jul 2019 17:55:01 -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 S1727054AbfGGAxF (ORCPT + 99 others); Sat, 6 Jul 2019 20:53:05 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:33828 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726927AbfGGAxE (ORCPT ); Sat, 6 Jul 2019 20:53:04 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hjvQD-0001lt-C2; Sun, 07 Jul 2019 00:52:58 +0000 Date: Sun, 7 Jul 2019 01:52:53 +0100 From: Al Viro To: Markus Elfring Cc: kernel-janitors@vger.kernel.org, Lee Jones , LKML Subject: Re: [PATCH] mfd: asic3: One function call less in asic3_irq_probe() Message-ID: <20190707005251.GQ17978@ZenIV.linux.org.uk> References: <01f6a8cd-0205-8d34-2aa3-e4b691e7eb95@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01f6a8cd-0205-8d34-2aa3-e4b691e7eb95@web.de> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 05, 2019 at 08:30:08PM +0200, Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 5 Jul 2019 20:22:26 +0200 > > Avoid an extra function call by using a ternary operator instead of > a conditional statement. Which is a good thing, because...? > This issue was detected by using the Coccinelle software. Oh, I see - that answers all questions. "Software has detected an issue", so of course an issue it is. > - if (irq < asic->irq_base + ASIC3_NUM_GPIOS) > - irq_set_chip(irq, &asic3_gpio_irq_chip); > - else > - irq_set_chip(irq, &asic3_irq_chip); > - > + irq_set_chip(irq, > + (irq < asic->irq_base + ASIC3_NUM_GPIOS) > + ? &asic3_gpio_irq_chip > + : &asic3_irq_chip); ... except that the result is not objectively better by any real criteria. It's not more readable, it conveys _less_ information to reader (the fact that calls differ only by the last argument had been visually obvious already, and logics used to be easier to see), it (obviously) does not generate better (or different) code. What the hell is the point? May I politely inquire what makes you so determined to avoid any not-entirely-mechanical activity?