Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1142559rwd; Wed, 31 May 2023 09:59:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vlowpmE81Esc0AMKJhVD+KMLAxvsYDFEOcuCC9hDQRosRvLjiBYfVyNalupkFExvqwzau X-Received: by 2002:a05:6a21:6da3:b0:105:e434:670b with SMTP id wl35-20020a056a216da300b00105e434670bmr8111748pzb.4.1685552356502; Wed, 31 May 2023 09:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685552356; cv=none; d=google.com; s=arc-20160816; b=HhQPF52oYe6ueqvvejX33mxwTiS9TOrLU1Wa9q4vtkUfPgX2MMuYfS5Tyfk1ZaiJQH DN0ZiBlnrzg4i78eyRrIn0g/a6TTu6dOi3I1Awux3cfoLt4kqbQ3kGcZDBDjAxtDcgf5 Z9QDuElyDH0P6+cLQcjq7R/lKEeQDpWrjSBoI5LlxPGgTLWIZXVr7+2JAD3ovivPIQve 77hOXh++ty7bL31y+MO8LG6tbE5qas8NVKApZRJFEY0rR7O2GSCefjHtaro8NJYQ5F2n 3CpYW+Sjh/I+vU4JlvQ9BX43sQPI7HmFuLivhSlbHmymUEgUHFANcZQcQgU6wTHWGdkg q44g== 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=bT00M46kBvOb0Hm6ZXUB+Dd+HibmvewZO1wWH5Gj5LA=; b=PzJLlZz0Uibal56WhvBMY5wwX5cPtmxvi/97pU7WITg5Haw0Rcf6N3pkbTVpKw8UHW 15AZR4ziynewYGSqYsYLvWPnvfoX859wmxCIt3vK7EUKf4+w7yIICWxXBOt5erdp/eCK hx20XkECN/JkQnh55JK7IeJmBs4yd1+ToEDWHFEy0yXTPwvbVtVqfGbmd/1HCYeFI0w5 d+N6BbqRpxlkYbYjc11+VTId9+DIrTXRbh1SQkIorcK5LK5pv9/LdhpZ188xlu6JmKwE yleKw7fH7HRjgEB90Kd+R38mnLb7A0rc8bUhpViNAwWq+Fv/+gtjXXeIE2tHr7oPXNjN 8Iqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=g1Z+5lbo; 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 o25-20020a637319000000b0052023579876si280303pgc.710.2023.05.31.09.59.08; Wed, 31 May 2023 09:59:16 -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=g1Z+5lbo; 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 S229958AbjEaQvv (ORCPT + 64 others); Wed, 31 May 2023 12:51:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbjEaQvu (ORCPT ); Wed, 31 May 2023 12:51:50 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30D7418C for ; Wed, 31 May 2023 09:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685551906; x=1717087906; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ksb2Rl37zTGPvHJiSgirHeM76PqfidjbTc0/JdyMyC4=; b=g1Z+5lboi7wfUoOn5ePTv9pMJDW3zBD5jq1YLIt5X0WVkfSRiVhJJ+xJ jiqNeRkOTMkLpl6JV+IPynTGRoEvlITSQByM6SDElZyRCjzJ+NYCQ+8ua Otd3+srKSq3m/epagJsJmeL/U4RpqWkytBMGAblPXJ06nBqGJNfzaVwcD d3klfTXsQhs8b9Bn0d28qfxTbfp3KXg0Mzl75K7VDcrI/aBsKrljT5ViW FtY9UyhjIABmMG5YuED8B+IZNQDnEU4gUQA7AjFlq+nIQWTy6kvfsrKds u3c469We479N6qxFv0VLFuIVLTS5Vd130QTJopprsrdbu2yMplR9Dv3oG w==; X-IronPort-AV: E=McAfee;i="6600,9927,10727"; a="339890697" X-IronPort-AV: E=Sophos;i="6.00,207,1681196400"; d="scan'208";a="339890697" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2023 09:50:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10727"; a="706987998" X-IronPort-AV: E=Sophos;i="6.00,207,1681196400"; d="scan'208";a="706987998" Received: from amilman1-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.215.102]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2023 09:50:49 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya , Gregory Greenman Subject: [PATCH 12/14] wifi: iwlwifi: remove dead code in iwl_dump_ini_imr_get_size() Date: Wed, 31 May 2023 19:50:04 +0300 Message-Id: <20230531194630.58eec8d40729.Ifb7d64706eed45726db804f36e785283dff7adab@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230531165006.273284-1-gregory.greenman@intel.com> References: <20230531165006.273284-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: Mukesh Sisodiya Remove the check for the IMR debug data size which leads to dead code. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index d9faaae01abd..3180cabc0212 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -2031,7 +2031,6 @@ static u32 iwl_dump_ini_imr_get_size(struct iwl_fw_runtime *fwrt, struct iwl_dump_ini_region_data *reg_data) { - u32 size = 0; u32 ranges = 0; u32 imr_enable = fwrt->trans->dbg.imr_data.imr_enable; u32 imr_size = fwrt->trans->dbg.imr_data.imr_size; @@ -2041,17 +2040,16 @@ iwl_dump_ini_imr_get_size(struct iwl_fw_runtime *fwrt, IWL_DEBUG_INFO(fwrt, "WRT: Invalid imr data enable: %d, imr_size: %d, sram_size: %d\n", imr_enable, imr_size, sram_size); - return size; + return 0; } - size = imr_size; ranges = iwl_dump_ini_imr_ranges(fwrt, reg_data); - if (!size && !ranges) { - IWL_ERR(fwrt, "WRT: imr_size :=%d, ranges :=%d\n", size, ranges); + if (!ranges) { + IWL_ERR(fwrt, "WRT: ranges :=%d\n", ranges); return 0; } - size += sizeof(struct iwl_fw_ini_error_dump) + + imr_size += sizeof(struct iwl_fw_ini_error_dump) + ranges * sizeof(struct iwl_fw_ini_error_dump_range); - return size; + return imr_size; } /** -- 2.38.1