Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3520971pxv; Mon, 19 Jul 2021 02:10:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfN/eax6j1konIYcfg5j6vFdkKtjs6C8n7Y2ghFR9guYOs9A4rngFVQV/vzy4GzBycn77E X-Received: by 2002:a05:6e02:1d15:: with SMTP id i21mr16426713ila.307.1626685847500; Mon, 19 Jul 2021 02:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626685847; cv=none; d=google.com; s=arc-20160816; b=wQpiCGm+c9zM1YQGwydLkx6F+P2wOWMcoKgLjUyYRk2cVhwBvYW8Bnt/EzvocYhqlg 92AVQaO9hdTU2cBQkjIWO6PQhL1wgY8W+g3U67MUJYmqhtoxOI68TRUyfP8W+BWO2cKZ tMGEFQiAbGvEhX9NO6V2bgiX4dn6z6dLLMo9kaU2KaUj3kbd2aEemFuIYHLi4M15K0O9 9AvK4xJZzh9iG3CGjJqiXLixLy7H94oevIvNTk7LgFHilmsJ6wZGLFRde9jwa0Y5L2lC JQcAzywA/MkbVNMwfEEIFverjM9zoizvejcgBbse3PLPfB923fYtdmBchlXIad1qN/sV jqhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yjRQHvlsCIJ3bJqmkTQFq+10zvUVpU3Xu2L4WGZwE3E=; b=mlDr2M67f9oVmOcvbAVDSPWuTHn6syAHNAEpmX5EUGso/G8rvyVe9H/6po0vGvxduO Pl7CBDH1MHtmyRroeF1V52GxYQtqUXKbR3whhwEVu2MPBj3sx7hybuGT0UJLvVlq8KHK VdIfLxrx1sSKcRoxQjxPQ8SXzws2xrRgGxeX9HKnohj2S9g8IqHRDGJReWs7eZKWvhiI JbGk0PZ9e9WjklkIbUDIe6XW1H9xlPUazd232hNmBLO+DZBTGbzwhqYdpD5YTANZ3DBG yF0VjnAVOYKSlhrY7EaWfcnKrWd1UF7Ri6otRjkwJoZXDDr1NaUUySHHa1s2VlMJDLh4 PuUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si11016359iol.91.2021.07.19.02.10.35; Mon, 19 Jul 2021 02:10:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235848AbhGSI2V (ORCPT + 99 others); Mon, 19 Jul 2021 04:28:21 -0400 Received: from mga06.intel.com ([134.134.136.31]:19386 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235235AbhGSI2U (ORCPT ); Mon, 19 Jul 2021 04:28:20 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10049"; a="272132044" X-IronPort-AV: E=Sophos;i="5.84,251,1620716400"; d="scan'208";a="272132044" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2021 01:46:59 -0700 X-IronPort-AV: E=Sophos;i="5.84,251,1620716400"; d="scan'208";a="468350515" Received: from shao2-debian.sh.intel.com (HELO [10.239.13.11]) ([10.239.13.11]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2021 01:46:57 -0700 Subject: Re: [kbuild-all] Re: [linux-stable-rc:linux-4.4.y 1449/1774] drivers/input/joydev.c:485:16: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' To: Dan Carpenter , kernel test robot Cc: Dan Carpenter , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Dmitry Torokhov References: <202107191112.AwqoFW63-lkp@intel.com> <20210719071758.GP1931@kadam> From: Rong Chen Message-ID: <4dee6094-2bec-6afb-38ae-804675c8172c@intel.com> Date: Mon, 19 Jul 2021 16:46:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210719071758.GP1931@kadam> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/19/21 3:17 PM, Dan Carpenter wrote: > On Mon, Jul 19, 2021 at 11:39:16AM +0800, kernel test robot wrote: >> drivers/input/joydev.c: In function 'joydev_handle_JSIOCSAXMAP': >> drivers/input/joydev.c:451:16: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare] >> 451 | for (i = 0; i < len && i < joydev->nabs; i++) { > We should figure out a way to turn this warning off in the compiler. > > It's a stupid warning. It never fixes any bugs. It sometimes > introduces bugs. > > In the kernel if you are in drivers/ and you have a loop which iterates > over 2 million times that's probably a bug. But GCC is very very > stupid and not designed to be a static analysis tool. It does not know > which loops can iterate more than 2 million times. Even when it knows > that the loop only loops up to 5 or 10 times it still warns that maybe > it will loop over 2 million times. INSULTS AND DISPARAGEMENT! > > Seriously, please disable this warning unless you can point to one > single bug that it has fixed. Hi Dan, Thanks for the explanation, we'll stop reporting this warning. Best Regards, Rong Chen > > regards, > dan carpenter