From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: [PATCH] net: stmmac_tc: use 64-bit arithmetic instead of 32-bit Date: Mon, 2 Jul 2018 16:19:23 +0100 Message-ID: <32c70751-9083-5c59-1e0e-c4ba69c18d80@synopsys.com> References: <20180702120932.GA13079@embeddedor.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: , To: "Gustavo A. R. Silva" , Giuseppe Cavallaro , Alexandre Torgue , "Jose Abreu" , "David S. Miller" Return-path: In-Reply-To: <20180702120932.GA13079@embeddedor.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 02-07-2018 13:09, Gustavo A. R. Silva wrote: > Add suffix UL to constant 1024 in order to give the compiler complete > information about the proper arithmetic to use. Notice that this > constant is used in a context that expects an expression of type > u64 (64 bits, unsigned) and following expressions are currently > being evaluated using 32-bit arithmetic: > > qopt->idleslope * 1024 * ptr > qopt->hicredit * 1024 * 8 > qopt->locredit * 1024 * 8 > > Addresses-Coverity-ID: 1470246 ("Unintentional integer overflow") > Addresses-Coverity-ID: 1470248 ("Unintentional integer overflow") > Addresses-Coverity-ID: 1470249 ("Unintentional integer overflow") > Signed-off-by: Gustavo A. R. Silva > Acked-by: Jose Abreu Thanks! Best Regards, Jose Miguel Abreu