From: Kalle Valo <kvalo@codeaurora.org>
To: Adam Borowski <kilobyte@angband.pl>
Cc: Luca Coelho <luciano.coelho@intel.com>,
Johannes Berg <johannes.berg@intel.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] iwlwifi: pcie: fix a warning / build failure
Date: Wed, 24 Nov 2021 10:12:35 +0200 [thread overview]
Message-ID: <87wnky55vw.fsf@codeaurora.org> (raw)
In-Reply-To: <20211124011754.22397-1-kilobyte@angband.pl> (Adam Borowski's message of "Wed, 24 Nov 2021 02:17:54 +0100")
Adam Borowski <kilobyte@angband.pl> writes:
> 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 <kilobyte@angband.pl>
> ---
> 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 &&
There's already fix for this:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git/commit/?id=fe785f56ad5886c08d1cadd9e8b4e1ff6a1866f6
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2021-11-24 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 1:17 [PATCH] iwlwifi: pcie: fix a warning / build failure Adam Borowski
2021-11-24 8:12 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnky55vw.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=johannes.berg@intel.com \
--cc=kilobyte@angband.pl \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).