Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1732240rda; Tue, 24 Oct 2023 01:13:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnOeOP7eufbEids8FZKqsDbvhh/HosCND1WquZZyfEJ3j30qe6NjPwsgVg8QuAQ64uwl23 X-Received: by 2002:a17:902:f14b:b0:1c9:e95a:9d5a with SMTP id d11-20020a170902f14b00b001c9e95a9d5amr8872763plb.17.1698135190415; Tue, 24 Oct 2023 01:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698135190; cv=none; d=google.com; s=arc-20160816; b=HO/hCp9CXUW88qRqPlFttKW16ZIruVQFI0QU2papNPMoUtabEBB54zvVyUGn9X1uU2 p0claEwR/7Xli80jLQf1ZuG9Iz03XSDVqpLme3MhQuaBhDBFAU27qdVDllHWiCKS67iD 5Dc+IlEfSzObIjsT6g6rfqx5IVXpLAC7EjvBYDXH2YcApiTV7HCdY708r8IC9aUT9/xH F6i2/QxiWkLck2zxRk0aSus39y4nkCDJ7gm0jacbwe1tmAIfTpGG92zSAp+OqCHXisGB +u070k7KObegRrRZ8GgSpjyDSV2kTjy0xCV708AA9xzCjqmaaLrqXMowZE21fCbB0N8N aF/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M4KgBKcWnOf+HdfkmOB81ZgiYiCuChuxsC6xnZ9eoT8=; fh=TBqWIXs8FIbUacMHlyq40e9cES7/5hSGWTWgMJKbBl4=; b=IJCyQsLybCcRplTo27LKV1smGEv4jDf3jUfnSQtwF3u/ybNj2z2HVkH0ADK5hkH7tF 4qCWOqJRN3MBa69FI+5fkpFRukpBS3l3VIcsLqYpoVZxlnBUfEBbztNztQwkj/ZYNjsE nYJkTVJk4AqXpXYJQjMsaydAA/pC2idwYKtYmlYftR8beoLIAwfM1PN0zu2A/QdDgIey 5Km1pc91JEjVwLO+1JXzA1G0YgmWtbeLCZhvSmI73ufJsOMWPRYSKOvthQn/g3uXGCAI 7Jf9X9FNINGPLbEmbnggm6kAg3B8kb2AT64udz1azz09oY0Cb7EsGbxTS3sUHZrI2liN VUiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bTU90w11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x6-20020a170902a38600b001c9bf064b1bsi7566038pla.285.2023.10.24.01.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 01:13:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bTU90w11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 36C7B8031AE2; Tue, 24 Oct 2023 01:13:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233823AbjJXINF (ORCPT + 99 others); Tue, 24 Oct 2023 04:13:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233813AbjJXINE (ORCPT ); Tue, 24 Oct 2023 04:13:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1137E99 for ; Tue, 24 Oct 2023 01:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698135140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=M4KgBKcWnOf+HdfkmOB81ZgiYiCuChuxsC6xnZ9eoT8=; b=bTU90w113xYeBiYVUg5N32q7w+IAMf2gkWePy47mOuutuniySuNAvn2ob86UUK5oq8cqOl C6IvOxoO1oaVZ5hfe/uz8Sbif++Uo5dx2Ozgq1Sb9CIfeaGC8n3xCPeU0F/Hptxia+cZxq Ys4Ii9toQ6HKg3WJgNta1ZPbZh9erxU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-277-yxYj-cPHOz2shsJQt_URWg-1; Tue, 24 Oct 2023 04:12:16 -0400 X-MC-Unique: yxYj-cPHOz2shsJQt_URWg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D73231019C86; Tue, 24 Oct 2023 08:12:15 +0000 (UTC) Received: from p1.luc.com (unknown [10.43.2.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC239492BFB; Tue, 24 Oct 2023 08:12:13 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, Jacob Keller , mschmidt@redhat.com, dacampbe@redhat.com, poros@redhat.com Subject: [PATCH iwl-next v2 0/3] i40e: Add and use version check helpers Date: Tue, 24 Oct 2023 10:12:08 +0200 Message-ID: <20231024081211.677502-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 24 Oct 2023 01:13:09 -0700 (PDT) The series moves an existing check for AQ API version to header file, adds another ones for firmware version check and use them to refactor existing open-coded version checks. Series content: Patch 1: Moves i40e_is_aq_api_ver_ge() helper to header file Patch 2: Adds another helpers to check running FW version Patch 3: Re-factors existing open-coded checks to use the new helpers Changes: v2 - Fixed indentation Ivan Vecera (3): i40e: Move i40e_is_aq_api_ver_ge helper i40e: Add other helpers to check version of running firmware and AQ API i40e: Use helpers to check running FW and AQ API versions drivers/net/ethernet/intel/i40e/i40e_adminq.c | 56 ++++++--------- drivers/net/ethernet/intel/i40e/i40e_common.c | 48 +++++-------- drivers/net/ethernet/intel/i40e/i40e_dcb.c | 7 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 68 +++++++++++++++++++ 5 files changed, 108 insertions(+), 77 deletions(-) -- 2.41.0