Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2670854pxb; Sun, 24 Apr 2022 22:57:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdhCxHn6hZRQqYmhotAEVgsyk9Ob0hkjyFachZYdvsUsMxIq5/8ZN11GjXq+JFpDKP6Wrz X-Received: by 2002:a17:90b:17ce:b0:1d2:75cc:d6c7 with SMTP id me14-20020a17090b17ce00b001d275ccd6c7mr19111978pjb.162.1650866278399; Sun, 24 Apr 2022 22:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650866278; cv=none; d=google.com; s=arc-20160816; b=SYqJlkRZpfZZb3zL5fYkxLGd1cofOYEQP9UNln+S137RSQO8zmM7WwZYfvGqQlutYv fC2z2WjxOvNYKMw8JL/YNuzK5C1n5zeUHUaJyitDhd4N5tLTDU+sjic9+TCXh7437CJ8 XiNuQk0/7SdZzhuQY7qIsvo7GTSNfxjKkTCRpgGTetOWGhwG4R3Mib+CqeStWALVggus Bkf7Qb3YAjLiKiXJVbb4qeZE0ANn6BH7NaidNmU+x32mAseUuugReGBoUPTPm20pCHmF yz/s7X5IGgtfmA9sJBvTXXrtloQXBa/DnE9oLa2bLN8eP9NF78rm4KaUV/QmDg8IG+cr WKKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=4NKhqf8tGNMV8rKXr/cRuorJRCB1rs7ce3VpBg0Tczg=; b=k8Q905Fq0/5UpTZNTHZ3ZoT+7U0FLvRmL3IyPcudVRBhZ4OXan3HYcgGvXDZdPgNVq IR2hzllFt36CUgObRHmaHUNgT9yZloeOM2XL3rpaN3y5+qOf52jPfMo/y8bqalwW8/ia vFsK/6A/1WE979y2RpvuBuIxlwBPLgEaWpXXe1qVRXY8ec78mW4pZq1rD5gEvR1neEEg yr/98tF4TUokkK6PNCHsI5RQSzjZjPqC5q+zmijDCjpHK/YF1cj8eIjtLDfqk0zIW3bB N1IIOHJAPF2bvbSDk5OjQUQA9/unyYCkm2pMgXvDUWpf3ghHCCma1nG1/waz9yI3QlRn D/ng== 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 w10-20020a170902e88a00b00156db89bde3si17052022plg.25.2022.04.24.22.57.42; Sun, 24 Apr 2022 22:57:58 -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 S239070AbiDXKnA (ORCPT + 99 others); Sun, 24 Apr 2022 06:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239108AbiDXKmx (ORCPT ); Sun, 24 Apr 2022 06:42:53 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F71418A61E; Sun, 24 Apr 2022 03:39:50 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 3120D92009C; Sun, 24 Apr 2022 12:39:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 2DAA792009B; Sun, 24 Apr 2022 11:39:50 +0100 (BST) Date: Sun, 24 Apr 2022 11:39:50 +0100 (BST) From: "Maciej W. Rozycki" To: Wan Jiabing cc: "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 In-Reply-To: <20220424092842.101307-1-wanjiabing@vivo.com> Message-ID: References: <20220424092842.101307-1-wanjiabing@vivo.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Sun, 24 Apr 2022, Wan Jiabing wrote: > diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c > index b584ffe38ad6..3edb2e96f763 100644 > --- a/drivers/net/fddi/defxx.c > +++ b/drivers/net/fddi/defxx.c > @@ -585,10 +585,10 @@ static int dfx_register(struct device *bdev) > bp->mmio = false; > dfx_get_bars(bp, bar_start, bar_len); > } > - } > - if (!dfx_use_mmio) > + } else { > region = request_region(bar_start[0], bar_len[0], > bdev->driver->name); > + } 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 Maciej