Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp467967rwn; Thu, 8 Sep 2022 04:33:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR7E23enMBJvuMOinPEeNNMXvn3gvw3zjwjBGOtmZRlf8Tk4bTN7s1865sdWjPPd1PtafTDq X-Received: by 2002:a63:cf0b:0:b0:419:f140:2876 with SMTP id j11-20020a63cf0b000000b00419f1402876mr7404686pgg.303.1662636833055; Thu, 08 Sep 2022 04:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662636833; cv=none; d=google.com; s=arc-20160816; b=hc/EFEe9rFbSCy+zKYewHgDWXz/zj6zXL2C+ZsYllkUbvg3/kOTh3397h0qPw8H61I vmcryfplPNBnIraP6nuHrUt40C/n3SIykCAGSnjk3SBjtjCCQ7uKCDxEw/P5JSGHrR0x XohvXr8zd3l9gQUgHW6heZ7XdVoBmksoBjS3zjNOreS5ZGI2CyzEfzIsvBPHWvFQAfjD ymcSDEz6IR5m92R7hcUkec9PXqEcnpWlldqkzC+a9qAsVtuTw73ak2HpX/HGIWUmC25q 5VimAi0QQN7tnEKOWnXxyZ/TogVaguv7NbP/qyA4b98sGiJ3KEayGDmC52oNaETVMx8d GcBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YQ8GOYIef5hg/Tl/l9Bb42WbV0g7PrathKXfQl5En1o=; b=OKGyPAjpMFTGW+WzTN5wo4twCFcbmdPF5KNX1B9WuPCrQJnZQSQd22/TIr2dWGfwaJ l8Dz7pHj/oZFAID2lQGUOg0PCciHFIF1EMKHQ+Vkd5YQ/I4HdbvB6t1a7OHSv9eKvrBz szJhcnSdjejD2LAMylvthKyuYHajh8Y28h1RXOQAMp1WBXVZY/agEXGh7wysznkbhZN8 1d3O43rgutL92t8qDun1wKK1f+WYSvh1efJ/nYAn5v0dEA34eEs+asTTQFMMSQVLkUbm 0NOsAEQWYEBlLkNgbC5ZldN03g+yavNvmzPUFd+SzXhB+IZGTWikTu7oJsei0B6yJey3 133Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P5A11Smu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a170902d4cb00b00174eef66680si21325901plg.120.2022.09.08.04.33.40; Thu, 08 Sep 2022 04:33:53 -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=@intel.com header.s=Intel header.b=P5A11Smu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbiIHLEa (ORCPT + 99 others); Thu, 8 Sep 2022 07:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbiIHLEW (ORCPT ); Thu, 8 Sep 2022 07:04:22 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89C6E138; Thu, 8 Sep 2022 04:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662635061; x=1694171061; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fqkHwC0iOprBEufOeKlcg21ZbXtIUhGHzIz0tLHzfq8=; b=P5A11Smug85abEfoYrdeSWYKEViuicI7UnU0Cr0Wq2tBs/4DdY7cyXcu djZjon6WvvkWf8BDIe20s3BNBs9X8tV50IGLyEG9XwNu++pF68TLcEryk pH6Q/+HITs3PjIpnJ5dXB+3I28GBwHE5q3/w+CIDRl2AMwiiHsoo+ndwU pqeIdHtFVYbDuvLMaYDv7AfL6aqnGFEWoTlWCPwWISWW+8MnCwzFkGJcg Thlef21zmZ+5+aLOXYzRydArQD9OOdUb4woPPr9kuQ6mWzz3zhDeMyO6g G3kn/t4U+w7SZTZDUFecmsSXG9E+Fni1RCIV9hZRF2B+Znr3RTE4HqSRB g==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="361098738" X-IronPort-AV: E=Sophos;i="5.93,299,1654585200"; d="scan'208";a="361098738" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 04:04:21 -0700 X-IronPort-AV: E=Sophos;i="5.93,299,1654585200"; d="scan'208";a="740634993" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 04:04:16 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oWFKO-00A5Z7-2n; Thu, 08 Sep 2022 14:04:12 +0300 Date: Thu, 8 Sep 2022 14:04:12 +0300 From: Andy Shevchenko To: matthew.gerlach@linux.intel.com Cc: hao.wu@intel.com, yilun.xu@intel.com, russell.h.weight@intel.com, basheer.ahmed.muddebihal@intel.com, trix@redhat.com, mdf@kernel.org, linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tianfei.zhang@intel.com, corbet@lwn.net, gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, jirislaby@kernel.org, geert+renesas@glider.be, niklas.soderlund+renesas@ragnatech.se, phil.edworthy@renesas.com, macro@orcam.me.uk, johan@kernel.org, lukas@wunner.de Subject: Re: [PATCH v1 4/5] fpga: dfl: add generic support for MSIX interrupts Message-ID: References: <20220906190426.3139760-1-matthew.gerlach@linux.intel.com> <20220906190426.3139760-5-matthew.gerlach@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Wed, Sep 07, 2022 at 02:37:32PM -0700, matthew.gerlach@linux.intel.com wrote: > On Tue, 6 Sep 2022, Andy Shevchenko wrote: > > On Tue, Sep 06, 2022 at 12:04:25PM -0700, matthew.gerlach@linux.intel.com wrote: ... > > > + if (fid != FEATURE_ID_AFU && fid != PORT_FEATURE_ID_ERROR && > > > + fid != PORT_FEATURE_ID_UINT && fid != FME_FEATURE_ID_GLOBAL_ERR) { > > > + v = readq(base); > > > + v = FIELD_GET(DFH_VERSION, v); > > > + > > > + if (v == 1) { > > > + v = readq(base + DFHv1_CSR_SIZE_GRP); > > > > I am already lost what v keeps... > > > > Perhaps > > > > v = readq(base); > > switch (FIELD_GET(DFH_VERSION, v)) { > > case 1: > > ... > > break; > > } > > How about? > if (FIELD_GET(DFH_VERSION, readq(base)) == 1) { > ... > } This one tends to be expanded in the future, so I would keep it switch case. -- With Best Regards, Andy Shevchenko