Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3661476ioa; Tue, 26 Apr 2022 07:45:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3xpwZTttJrjP0+2p7JI+YZ2xnhsHoSCWhQvy/e3asiUUuAEhKcgfRd2TOUIzxJ8vDoZ4k X-Received: by 2002:a05:6402:2995:b0:425:d3a1:28aa with SMTP id eq21-20020a056402299500b00425d3a128aamr18066414edb.247.1650984328902; Tue, 26 Apr 2022 07:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650984328; cv=none; d=google.com; s=arc-20160816; b=oZMWblSpw8Y/zCVza9JJ44K0qlTP6ZGFHk1l4TGIrSfmvpSKUJyRsfNRvyjM5m+jNF WMq3rRa2TlW225reZKgHcsdxXYM4tRYtOcHjWk3qPjlcBywtzdlSbCg/dezHNPa+gHr0 dlwnX8CKHC7CfnYGi/hfjO71VWwLoORTY8ZhGcf/FnP9YBony9ImDRWk45BBTpQHNiAg DhkuzIGpYtFiywYy+635xJEQ8+9wtY+wO6zGKFH9xJ4Hd92sSpYpmKZDPu4VP7RTlXmz qcR7PhBvZjkBPsIANNyMwdj7jSMI/i/iQOSuxzjrsgaWJbwIFTVGDT+KMjZp7HaMcHSz j86g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F+wEY33ANWUtYg71aqPrc+AB1BTI6Adh9M1qs1IIjjs=; b=As6gxzkBOM8tiO5zQxgYXrIjb73zRva9WCxSuaqfXinDJItTuB0J//M0hm0CHgP3XJ WXeb2MGETjSeYhy7vK/VmQNoQEKZg1f6gkX2yxYawBGC5wJO/TuaKHGjUFkuMr1CuJAN UrDABIIFduD4QdVPMToGjaFZU1fNQSWWGNsdtddakAKHqU/UCdI43I+a0j+7sck0Moa1 wjTS7N51mDlYYHztI3lJrbpGUN3qngwBtKQxeh4lUi39kRPLyk9HROWB7LBx9ZZ2fLUA 79pQfVsbKPM1j556lHYXSWkXF+ne6OAq1Ayxgy3k6iWiuYl+KrX9K1FUvyaOuapAYObG GizQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=5nhbs9GY; 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 l6-20020aa7c3c6000000b00425b5e18b44si9833284edr.172.2022.04.26.07.45.03; Tue, 26 Apr 2022 07:45:28 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=5nhbs9GY; 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 S239639AbiDYMKD (ORCPT + 99 others); Mon, 25 Apr 2022 08:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiDYMKB (ORCPT ); Mon, 25 Apr 2022 08:10:01 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6557C4C43C; Mon, 25 Apr 2022 05:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=F+wEY33ANWUtYg71aqPrc+AB1BTI6Adh9M1qs1IIjjs=; b=5nhbs9GYvPdZxBd8ZMwJvFd37R 1TAIliDayrCvWbT6U+AjG2ydOccbVTtmQf2h1TLEY5xzBDbYBLfc9PnI8YWAuC+quDvBW39V7vmJ8 tO5a0to474WxsEE92DyxQ1OTSusUZTUjR1boABsz0NeOqXZP7LpmKtqxY0HoBQBQfSF4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nixUG-00HOZ3-3x; Mon, 25 Apr 2022 14:06:40 +0200 Date: Mon, 25 Apr 2022 14:06:40 +0200 From: Andrew Lunn To: "Maciej W. Rozycki" Cc: Wan Jiabing , "David S. Miller" , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kael_w@yeah.net Subject: Re: [PATCH] FDDI: defxx: simplify if-if to if-else Message-ID: References: <20220424092842.101307-1-wanjiabing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Mon, Apr 25, 2022 at 12:26:10AM +0100, Maciej W. Rozycki wrote: > On Mon, 25 Apr 2022, Andrew Lunn wrote: > > > > NAK. The first conditional optionally sets `bp->mmio = false', which > > > changes the value of `dfx_use_mmio' in some configurations: > > > > > > #if defined(CONFIG_EISA) || defined(CONFIG_PCI) > > > #define dfx_use_mmio bp->mmio > > > #else > > > #define dfx_use_mmio true > > > #endif > > > > Which is just asking for trouble like this. > > > > Could i suggest dfx_use_mmio is changed to DFX_USE_MMIO to give a hint > > something horrible is going on. > > There's legacy behind it, `dfx_use_mmio' used to be a proper variable and > references were retained not to obfuscate the changes that ultimately led > to the current arrangement. I guess at this stage it could be changed to > a function-like macro or a static inline function taking `bp' as the > argument. Yes, something like that would be good. > > It probably won't stop the robots finding this if (x) if (!x), but > > there is a chance the robot drivers will wonder why it is upper case. > > Well, blindly relying on automation is bound to cause trouble. Unfortunately, there are a number of bot drivers who do blindly rely on automation. We have had to undo the same broken bot driven changes a few times, and ended up adding extra comments to catch the eye of the bot drivers. Andrew