Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2038042pxv; Sat, 26 Jun 2021 07:31:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3qyYLldVfevcxknA0PMoylG2gg3A42AMp5F9XuG1qJVvFiVMAExA94WiFnBamglCjwvVX X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr16232933ejb.285.1624717891195; Sat, 26 Jun 2021 07:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624717891; cv=none; d=google.com; s=arc-20160816; b=IliD2NalsZpH/9b9bkLKM/1DxA+PoYfvrK2L7WKBdNXAw3DL9naR3GBv0z+Yppz7Uh MTiHa9coJ+DiCHmr6f2uZGUqF0zecYLlTKI613z6+pM3Yq5En73XRDGtBCKRpX3EgM38 iuhiZLFPPjySF/u6M+IEs96uS91BP49HIWx/X4gk/SYiG8IMFd+wc3n+2nyuuwCsNZBS 6KslG8KoQflRnG/HtCxXafhoIzN7/dd02/5/dSJzHKE953bsTC91F2if2cUdt6qKh76j t6blYUt6X1iHD+YK0feNntZ6jF60JGqWVuCwsAt0fO3ND1E6CN5AX8wHKX0p4OUIyUQ1 dj8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=q1xyXqBOrhwD5gZND37RRmGI/O0LWaj0MVp1LAHNDn4=; b=mwOv2Y5dR33pbETTuNFSu1ufUohZ7z88jd1GbGDxmAb4fvPsORKDLy2IpJr9YJXndN o9zMYR4QAMh1P032k3jqHJwLoatW60UPmNbVpuOejS7fq9PXtaOgDiHAvkiLYA89+jGL DaGG3xgyNAE+/FQM8PBkoFdwVOnZ6RQ4bq+7e34Fuxi6QdHrLstXAd2Qb5JgurQBBLmx hpTbCU1vgR9zjveQjzDR6pIUQkTg4MbcuQzjHr4hc5FHzGPlktp1Lbgrgk5yCmswVTsr mFv3jRkb3/FLXtseBsK2v9Fv6A12Fw20xuODZSpAuvzzmgQNQ4bY61I13chiQQ0wm8MJ 9yPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="RjDUK6/a"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si5689568ede.452.2021.06.26.07.31.03; Sat, 26 Jun 2021 07:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="RjDUK6/a"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbhFZOdU (ORCPT + 99 others); Sat, 26 Jun 2021 10:33:20 -0400 Received: from mout.gmx.net ([212.227.15.15]:53779 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbhFZOdU (ORCPT ); Sat, 26 Jun 2021 10:33:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624717836; bh=q1xyXqBOrhwD5gZND37RRmGI/O0LWaj0MVp1LAHNDn4=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=RjDUK6/aVKCvYOhjUFv7aMo1lVWjjkl5D/8hsweHavk+Sy7yjn6Uc/vUvsW985/Us CCcZmOgChG0cUF3wlyhM5SVDwymVLAWSIlLkX9ZuSskqhmgvo7Ct2tEo79Mui0gtkm akX5OsLabmN95G/TL2W8QATq+qHchvt4Y3pjCq0o= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ubuntu ([83.52.228.41]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MTAFh-1loedI3rVn-00Ua6O; Sat, 26 Jun 2021 16:30:36 +0200 Date: Sat, 26 Jun 2021 16:30:10 +0200 From: John Wood To: Felix Fietkau , Lorenzo Bianconi , Ryder Lee Cc: John Wood , Kalle Valo , "David S. Miller" , Jakub Kicinski , Matthias Brugger , Shayne Chen , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mt76/mt7915: Fix unsigned compared against zero Message-ID: <20210626143010.GA2936@ubuntu> References: <20210612143505.7637-1-john.wood@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210612143505.7637-1-john.wood@gmx.com> X-Provags-ID: V03:K1:tQ2f+TzIa4cFuYvRr3c0vPwUbF+5UbFFSq+mpcgXQdaJ2U//YOI QOyCOm+E6AURnA+9aCQ31jRi8UiTJl8lE1yyJjyZhckYBRACLhoKYME+3IQn9CCh+ek0WVH NSTlQAUrpM90MAeFRndo8hdW8bXh5pS2UXh0CXaE64VlrKCvoj8a9XhB1MAVT1h70Bl8p1R Va3BYV6ljtqROkiyeT9IQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:d10Rb6Q5FAg=:kA+y8IL3xQ9/OlFRJewcGQ p7/uCmxRHhAaqwnaSZqFKwWckGdZJY51F+MwAiaXdbR/OQ4q+X6Xyoha1JJCgmoLG3AJUqUsU o2/Io9kSfF19KQ3XGyWqioK3iA9orJNmrmePk+/c7hPSz42JoW+Z+dQOnh4iR/d3zOeN3SwQE inrZjvAFA3jr5g9CbK+JzDbhfw9YrxGhfmeYABPMiIq6aAB453dwF8jh0fUIiaSzUDm3xyxZo ExgyBLWekuyPy+gYSV5uRXgk3DckvDVrjvphtev5I/EMn4jOd9T/paCfwbIy2Gais9qYApNGQ +TJ8tCLtGznnw7iYoBKjbztv2CLv/6w97/s6p8c2FJX1YeJjc/fx1lcfxuyGuJUjlIS0ARNpJ DKR433pFX3bUcgSXi8UA8nUZoPDGxjFEGFts0MSIDgY7lPvq6RGwLRUvxkIRmQajzHz1H9CIv HX645b1SxR0FC0Pny3wZN0CWYRfnxjXt6s6PaPJCmnAx3D8GnAQcwm0fGaFsvZiFhs1sYrcV5 yKoInr3F1Etu7EY2tBYKV6CmD+IdHrG1lTUY1IS6qmiiaG79nuyOVBeL66wAPnTyAzJ5wDgDY fXvHY0b0NNQg55CHrtZ9aCOGQASkM7IPJp5Ye/em+RAVgB3wzlHfN30kqlp6N6zxdeNdhqJYB Rar9hOYq1cK7VVGs+2p0p0b8NOyIi5PlJT4gxOJeraxHleXzUZZ58Fj0e5LADoXs3F+YG7QIQ axxKz89rAgEB+cRQgRpXPJS/Ir+dG2sQZT3O2HxHItfzwehqtAagw95QFd6J/Vt918NQbOQRZ PUpB2cs594tUX4mv7Jr9BuYCeKHtw2TOICM/+3t3Qu0lykswrmZTD3ffgtMX1rNd41yTVkdNK ldiHZOPLHuEzeriwhxNQqoe8I+CwQVsea3O+PL6j4f4mj1xdIJgkhkkw38Un1ksF8sf0j0t1W XgxIuvS/czpvBeiI4BQy3Njbuu9nGvPVxuqLvhFjQsXNWFiErxYCID6Ima5DJuAKQQCmPW2yL FIdla+obJH26Iep49T/huw3wJpNwbsdTpb4UUfrOkzj9ES3sxJkeExD+HE8XVIRUAM5jlg3EN rM/elr9C8s+mU2nnzgCeZM0oFltmMc1FlIP Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, Jun 12, 2021 at 04:35:05PM +0200, John Wood wrote: > The mt7915_dpd_freq_idx() function can return a negative value but this > value is assigned to an unsigned variable named idx. Then, the code > tests if this variable is less than zero. This can never happen with an > unsigned type. > > So, change the idx type to a signed one. > > Addresses-Coverity-ID: 1484753 ("Unsigned compared against 0") > Fixes: 495184ac91bb8 ("mt76: mt7915: add support for applying pre-calibr= ation data") Has anyone had time to review this patch?. Any comment on this? Thanks, John Wood