Received: by 10.192.165.148 with SMTP id m20csp3130167imm; Mon, 23 Apr 2018 00:43:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+AGHhxuEu1qP5rJiCL/AjBTYymBbjwnfjJEcfSr8C/Bcoqc0ARupX92OCZWhG4ZHXl4WEw X-Received: by 10.99.160.25 with SMTP id r25mr15710434pge.95.1524469423596; Mon, 23 Apr 2018 00:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524469423; cv=none; d=google.com; s=arc-20160816; b=ws/XcPHq3wPSQk/h5PoKzzOuAKlBavv0cOv9IrMywYXGDxA9EyuN6UahF6nMbgq5FJ MB6BMljDBUUtkvx/w6ZoT84FMs9jwXolVHroFgkzTz4/0uuVzYOQuhdiV4ZPgGyD+yB1 XeTEgXQQXQ0B5KeM2P1YypOcgmWbGzj0ptciCUKfoInvxa6khLwWrIIYBLgLILIj/KgP IV5b+jvBteD0K6nkXu3ue1mA8C5O1i5hT6HlxoDFArJ9BWyfROKYQM5qztD43ejawNPB fxsgRziS+BMmURUX/H2yMO8dOCbvJ+fbtA1XI/+EPJmA4TghpyyEtMMtaBkkxBM3Vg6T jsxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=lC7nRi44PJ/nLvWJsA8jUfrobXMgXLw5x6ICdtKntsU=; b=JO6xYh7SVMn2OGtggr/of/K+Xtq/kd6M1+f36iMzDYzPg0IzU2k6Ahy6ANfU6uHm1h RUdpuKUUcH39fmsHaJ3C0Ttr18kZ5lfIuGPOfND5XNeTJ0QCh7r5QGSoK/zLxQ/swBNP xNdeP0Qlu52XLMIGzBV6mJ4zNeTTPhOd+ZSosgCqModDot8uhMVBuxlA0cwnwlFrpHou Fy3bugLqG2/vdKglyDS265DDcNVKH+E3fI/NSEyb3VpZfGdaMWA7p2ux8jm/E57ZzE+T Dql4kjL1T19xMj4hwmDvH+rdhXAwBhjjldJdXNkyECtRr5SzueEPctA0/GFxPpYIRk60 Nl7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NAZTDF7M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24si10676892pfh.162.2018.04.23.00.43.29; Mon, 23 Apr 2018 00:43:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NAZTDF7M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754289AbeDWHl5 (ORCPT + 99 others); Mon, 23 Apr 2018 03:41:57 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33157 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356AbeDWHly (ORCPT ); Mon, 23 Apr 2018 03:41:54 -0400 Received: by mail-pf0-f172.google.com with SMTP id f15so8566133pfn.0; Mon, 23 Apr 2018 00:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lC7nRi44PJ/nLvWJsA8jUfrobXMgXLw5x6ICdtKntsU=; b=NAZTDF7MWn6OB8vGhG8xvHYTb/KacW35uGJF3WgzfJooIcpoRdz+KC++Evb5+mQyMw 3BCNam7GdtPl1JbkuZKg2vvzQgXbj0b52EyomPBBe26HCAW5DPnRlYK318vxaNshT9HL T64w7zLY+fpsbagnHPGWcsiwYQyPeaQ6DAjuOkPllBWL+HaY06knNYxTVbH4CYD5hDVv Ee4QoACjQHltPaMHrfdDfcCbEFWyLLQAHx0xzwwYPbJrspx3IbhvhXMU/tFJjcemMD57 4R2nLdbua0cNbsOADqNpNJDMgxovBXWsWH3c52ggtogqz+SKUcX4Wv4yJWKa14MMevAB e8bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lC7nRi44PJ/nLvWJsA8jUfrobXMgXLw5x6ICdtKntsU=; b=fyg+xqNduvi7DuAr3EwzgWTuCw0l5/apOlgEBan8ssCSeTzqB1dBzSnUSV1+uJNNOF ZjeTgtjkyD5k4YD0hZxjfHDKNn6QA+ASnDneUy4F88eUbfzfjCkPPtu67xBQVVP6pNWy mL2H6fnzGtqkUGnMEgSttdVntyVrOCbl9i0UtrgsHiYb1QL/mu8wnfc8ipM+U+KGigmA xj1HBXf2mD+1onnSI9FVipkC+JEI1MLFbQ+AkG29byxD1Zgmf9TiyQbUFloC7h7m9o9i DC1XedsrO/d6XSy0n0gf3BJ/XtDwPLV+WswiV3WLp4iVv4OGu76r9j4DJTWlZEO+dKvx W9sQ== X-Gm-Message-State: ALQs6tA+cl7bNamGdiMbMdBIWtfafS2Kr02hwxi7YWuMSB+4WSnlELhO JtMDAvNetGX2L2o1ODzGfK8= X-Received: by 10.101.98.138 with SMTP id f10mr10755897pgv.6.1524469313588; Mon, 23 Apr 2018 00:41:53 -0700 (PDT) Received: from gmail.com ([2605:e000:1117:c0e3:2e0:1bff:fe70:ea]) by smtp.gmail.com with ESMTPSA id n86sm24780943pfk.178.2018.04.23.00.41.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Apr 2018 00:41:52 -0700 (PDT) Date: Sun, 22 Apr 2018 21:41:50 -1000 From: Joey Pabalinas To: Luciano Coelho Cc: Kalle Valo , Joey Pabalinas , Kees Cook , Linus Torvalds , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Subject: Re: New sparse warning from min_t(): expression using sizeof(void) Message-ID: <20180423074150.cc4nrr4ogfql43fx@gmail.com> References: <87a7txf15w.fsf@kamboji.qca.qualcomm.com> <20180421082444.i4eyw2zxl6tipt6i@gmail.com> <87604ley7t.fsf@kamboji.qca.qualcomm.com> <4777fb12da0a71e030cc7b0cf47d5391be2a3efd.camel@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tdqvskbjew4jxvmc" Content-Disposition: inline In-Reply-To: <4777fb12da0a71e030cc7b0cf47d5391be2a3efd.camel@intel.com> User-Agent: NeoMutt/20180323-62-378db9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tdqvskbjew4jxvmc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 23, 2018 at 09:20:14AM +0300, Luciano Coelho wrote: > Thanks, this solves the problem for me, but I'm still getting a lot of > this: >=20 > ./include/linux/mm.h:533:24: warning: constant 0xffffc90000000000 is so b= ig it is unsigned long >=20 > Is there a patch in sparse to solve this one as well? Or is this an > actual error that must be fixed in mm.h? This is definitely a valid warning in the general case (integer promotion rules can cause *incredibly* difficult to find bugs if you overlook them, so it's very useful to get a warning when a promotion occurs implicitly to integer constants). In this case though, you are comparing it against `unsigned long addr` which is exactly the same type, so there's no bug. It could possibly be argued that in: > arch/x86/include/asm/pgtable_64_types.h:122: # define VMALLOC_START __VMA= LLOC_BASE_L4 > arch/x86/include/asm/pgtable_64_types.h:108: #define __VMALLOC_BASE_L4 0x= ffffc90000000000 __VMALLOC_BASE_L4 would be better written as 0xffffc90000000000UL, which wo= uld indeed shut up sparse. --=20 Cheers, Joey Pabalinas --tdqvskbjew4jxvmc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKlZXrihdNOcUPZTNruvLfWhyVBkFAlrdjj4ACgkQruvLfWhy VBl2SRAA1ZhpBw7wGVNBK2AUmd+nP2L4xMOO9ypDVbe71AB4mvxNiE1oN/VveiOO YDSXAxmQgwpIgiExUcgZYXqLC1RWa7wiuGXg9c8aP6up3hci70vVxanu9teng25O OS8sKULzrg9v5sekC2mka4lncHgnrk0jLyM6wd5PQfEaV73ekPJpg/UkZSGYEjCQ NCUjOoHq1v8G/kpAxOpSzkK/n2Fnd/BGxEqX8aWqhiu+7Z4hkwnpGkBGYNCDbICL Qh618wFPsfZkg2uSgpNGLSjsVmooKRT4RJoQk0xpsWbk4e1U0xI5VWcqoFbkew+i 4TNW7R8sf0iOTy2Bm9rJClkp6niq5WUgGm0XvuwxeDgkDpWkgaK6THvxCgPoo6mn 9I+1g07WuQV01H1oSbwwsb6ZIcE6Bb1XmkGDPBaPFh5knk86OGZQeyvMcrXcL9ir zi95T3LIA5T3WJE56//pyBwATqXGX9Qoymvjdvyb+feuH3YJ8AtRtljWWJlYlpiw br9cVu9yO2kDgy8a2YeNHLsH/V98lQbtnCp/n3gWOQCGNbKjDk/uyK9UfoDL8th2 i+xkAQz3ZvnEnJuSpZWolQ/KH9FtIdi4Ajh3+YrOgW44y3XsXfv1tHvsDwz1lPRD H/QW85wrV6CEQhsTOPFHi1jQWesFke3q5bgae4qTTAvlj5R8E/M= =9+LS -----END PGP SIGNATURE----- --tdqvskbjew4jxvmc--