Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A6DFC433F5 for ; Wed, 24 Nov 2021 01:58:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239452AbhKXCBF (ORCPT ); Tue, 23 Nov 2021 21:01:05 -0500 Received: from tartarus.angband.pl ([51.83.246.204]:45544 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239402AbhKXCBA (ORCPT ); Tue, 23 Nov 2021 21:01:00 -0500 X-Greylist: delayed 2239 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Nov 2021 21:01:00 EST Received: from 89-73-149-240.dynamic.chello.pl ([89.73.149.240] helo=barad-dur.angband.pl) by tartarus.angband.pl with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mpgvH-00D8oj-Ld; Wed, 24 Nov 2021 02:18:10 +0100 Received: from [2a02:a31c:8245:f980::4] (helo=valinor.angband.pl) by barad-dur.angband.pl with esmtp (Exim 4.94.2) (envelope-from ) id 1mpgvG-0001mD-9C; Wed, 24 Nov 2021 02:18:06 +0100 Received: from kilobyte by valinor.angband.pl with local (Exim 4.95) (envelope-from ) id 1mpgvD-0005px-0j; Wed, 24 Nov 2021 02:18:03 +0100 From: Adam Borowski To: Luca Coelho , Kalle Valo , Johannes Berg , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Cc: Adam Borowski Date: Wed, 24 Nov 2021 02:17:54 +0100 Message-Id: <20211124011754.22397-1-kilobyte@angband.pl> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 89.73.149.240 X-SA-Exim-Mail-From: kilobyte@angband.pl Subject: [PATCH] iwlwifi: pcie: fix a warning / build failure X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on tartarus.angband.pl) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org drivers/net/wireless/intel/iwlwifi/pcie/drv.c: In function ‘iwl_pci_find_dev_info’: ./include/linux/kernel.h:46:25: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘18446744073709551615’ to ‘-1’ [-Werror=overflow] Signed-off-by: Adam Borowski --- Another option would be to #ifdef away iwl_pci_find_dev_info(). drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index c574f041f096..81e8f2fc4982 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1341,7 +1341,7 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device, { int i; - for (i = ARRAY_SIZE(iwl_dev_info_table) - 1; i >= 0; i--) { + for (i = (int)ARRAY_SIZE(iwl_dev_info_table) - 1; i >= 0; i--) { const struct iwl_dev_info *dev_info = &iwl_dev_info_table[i]; if (dev_info->device != (u16)IWL_CFG_ANY && -- 2.34.0