From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 266CAC433F5 for ; Sun, 31 Oct 2021 07:06:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE70261027 for ; Sun, 31 Oct 2021 07:06:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbhJaHJW (ORCPT ); Sun, 31 Oct 2021 03:09:22 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:38816 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbhJaHJW (ORCPT ); Sun, 31 Oct 2021 03:09:22 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1635664011; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=7ckvcDMeC7GDOMMzohJOy6GujWaqizd0Yp409GD+ucs=; b=EHyZlfRuMOAiL6tJnstyHuyVuGFGx4dknM0P55ZiI6l9X53B7efFQnTBX7vXxiF4Yd4gnMMy Qi5OD+GIjBhjGJ95SuIcdmzTzmU/b5o+HwOKzOOzUKFoJs/4k0u4oPfoueZEsEsLycEgEuEb Xm3IPQLfYOkWeGFvJO1+YOuwZ8U= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 617e407bf6a3eeacf913aeb1 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 31 Oct 2021 07:06:35 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 78977C4361A; Sun, 31 Oct 2021 07:06:34 +0000 (UTC) Received: from tykki (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 69394C4338F; Sun, 31 Oct 2021 07:06:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 69394C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Kalle Valo To: Arnd Bergmann Cc: Johannes Berg , Arnd Bergmann , Luca Coelho , "David S. Miller" , Jakub Kicinski , Nathan Chancellor , Nick Desaulniers , Yaara Baruch , Matti Gottlieb , Emmanuel Grumbach , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] iwlwifi: pcie: fix constant-conversion warning References: <20211029154253.3824677-1-arnd@kernel.org> Date: Sun, 31 Oct 2021 09:06:28 +0200 In-Reply-To: <20211029154253.3824677-1-arnd@kernel.org> (Arnd Bergmann's message of "Fri, 29 Oct 2021 17:42:29 +0200") Message-ID: <87tugx3c7f.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Arnd Bergmann writes: > From: Arnd Bergmann > > clang points out a potential issue with integer overflow when > the iwl_dev_info_table[] array is empty: > > drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1344:42: error: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551615 to -1 [-Werror,-Wconstant-conversion] > for (i = ARRAY_SIZE(iwl_dev_info_table) - 1; i >= 0; i--) { > ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > > This is still harmless, as the loop correctly terminates, but adding > an (int) cast makes that clearer to the compiler. > > Fixes: 3f7320428fa4 ("iwlwifi: pcie: simplify iwl_pci_find_dev_info()") > Signed-off-by: Arnd Bergmann Luca, can I take this to wireless-drivers? Ack? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches