Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1174208rwd; Tue, 13 Jun 2023 06:01:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7qukW/h1TkMvXzTGo8J4gf5Ib+Egdx3SvGfqMsFCeVeETr+LBXqAFRMPIJEF4QUE4UrhK/ X-Received: by 2002:a17:907:741:b0:958:801b:9945 with SMTP id xc1-20020a170907074100b00958801b9945mr12328587ejb.31.1686661288324; Tue, 13 Jun 2023 06:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686661288; cv=none; d=google.com; s=arc-20160816; b=ITqbZSHZ4N+FnhUVhBOSYEOOLhtcqeNMvEqKiG2UfEhmN3EmYJd91guqx3C5NNhFEJ RfV2hsusuj2SRFo5kV1IU4GWbrSeurvsTbICrlIhYFVPAQlJu2OtuaCUtOXzw985LYLB Q2YSF0Gx/lkQAq5WzY57o7IU9603oQOWRPb+fVrvYTauFuWGHvETcxmJRzx0nSFVI4W2 v4+e1VlbkhBZoUbkEmMWlEwu51kQnpwLuaQiny6MqJd4FLXmeYsMo7ZdyTagb3N4zfh+ m6DSzc6881s+eclo+0PVJgE0lrvSTtC1zCRZyuPVoYMQa78Jx/NWO6hMpgzTq8TMtUt1 5M6g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sOhF/I0P/wldROvzgSYyh+XDuulkE1rETJoEfLc4p7c=; b=z1UuelIUFpRGD1wgU+nQD4O9DROsPOoJbt/F46ZNoBmxXv9/fNQXj41mznu0oT+CPU oV2+zTnkZ63N5fKKbP7yAO1/nakZLtuqXEerEFxTseiV2Cp5ejYamB/I0hSX6KwAEcWA rz2Su/LSCEQTBizrL4CGreU65r7IWB3MWmpoRToflKEo8G6n39ZhMDs0R1aWdg41sKQ1 qtO92Na5sNv+k//963bygE3VLWU2q3uY7VH8aLnpQSxHgATopZ9sofme75hpY+FzxtIj bSpA8vD7B1Qa7zUoW9uWFzbU+mQgwxwd4irL9k0p06Vpvsf/mK+piWdusqrQXZ2aJc8W F1MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=S+RuZoPV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 x16-20020a170906b09000b00977ecfcec57si3600576ejy.221.2023.06.13.06.01.12; Tue, 13 Jun 2023 06:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=S+RuZoPV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S242005AbjFMM6a (ORCPT + 61 others); Tue, 13 Jun 2023 08:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241693AbjFMM62 (ORCPT ); Tue, 13 Jun 2023 08:58:28 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E6119B5 for ; Tue, 13 Jun 2023 05:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686661095; x=1718197095; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2sNM0bZ5K9wSo3V6c8lbIcfatOmHyY5gur/FQ4wBckQ=; b=S+RuZoPVAEMCPziY9gCm9aIZ3hKvCjHe8LOH0LBbRAzVhvfxtoeg9Q8e tYvz/TsYT1UqVK2NAU0PVzxFXm26SyYeGmW0M332xSryd+yBubE8jnLuC 65VDFjM6Fp64g22sHu82UPgSnCMalOrALm7ErCLx8E1xEJBvIYvGSKowe DniEtkbZma8zgr5jZse5Kqu7yy54EfJ0KYGzW8Csk83sYQePaYjM+NTUa oslN421i4h/JfZiW8GJBBzeeOpCzNaJEjoF82cYxjgHrV44BPPHU/ZQMt AVdjssfEDJ4z8zdoKqimLp9KcVMrZCACC7XJ6zWpwswPItlqBhAgXlbW7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="347973778" X-IronPort-AV: E=Sophos;i="6.00,239,1681196400"; d="scan'208";a="347973778" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 05:58:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="835880846" X-IronPort-AV: E=Sophos;i="6.00,239,1681196400"; d="scan'208";a="835880846" Received: from slerer-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.249.90.17]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 05:58:06 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 13/14] wifi: iwlwifi: pcie: remove redundant argument Date: Tue, 13 Jun 2023 15:57:26 +0300 Message-Id: <20230613155501.737c153e8259.Ibe6250ca812cfa2f00ac47e5e0d1595c6b9b4875@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230613125727.300445-1-gregory.greenman@intel.com> References: <20230613125727.300445-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-wireless@vger.kernel.org From: Johannes Berg The iwl_pcie_alloc_fw_monitor_block() function has an argument that's only ever hard-coded to 11, remove it and hard-code the value into the function itself with a comment. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 84e832fdfa83..3e88bbdb1f82 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -163,7 +163,7 @@ static void iwl_pcie_free_fw_monitor(struct iwl_trans *trans) } static void iwl_pcie_alloc_fw_monitor_block(struct iwl_trans *trans, - u8 max_power, u8 min_power) + u8 max_power) { struct iwl_dram_data *fw_mon = &trans->dbg.fw_mon; void *block = NULL; @@ -176,7 +176,8 @@ static void iwl_pcie_alloc_fw_monitor_block(struct iwl_trans *trans, return; } - for (power = max_power; power >= min_power; power--) { + /* need at least 2 KiB, so stop at 11 */ + for (power = max_power; power >= 11; power--) { size = BIT(power); block = dma_alloc_coherent(trans->dev, size, &physical, GFP_KERNEL | __GFP_NOWARN); @@ -217,7 +218,7 @@ void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans, u8 max_power) max_power)) return; - iwl_pcie_alloc_fw_monitor_block(trans, max_power, 11); + iwl_pcie_alloc_fw_monitor_block(trans, max_power); } static u32 iwl_trans_pcie_read_shr(struct iwl_trans *trans, u32 reg) -- 2.38.1