Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2305712pxa; Fri, 7 Aug 2020 08:06:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQhiZ+ibx5ck8c98NGw28ozdnRwT6zcwgZoZar4kfV3PaRIHguIVav27rVpogHsy2Yekb7 X-Received: by 2002:a17:906:1c84:: with SMTP id g4mr9695807ejh.59.1596812791626; Fri, 07 Aug 2020 08:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596812791; cv=none; d=google.com; s=arc-20160816; b=b2UOcOZx5LyKUG6EN0gMmVxsDlsiJqit5bmWoeXRqOe5sEZ+rYJyCCcqQcQdKOqOU+ ZNRcpeMpFDktxanX8adnoBN3v4zw18tHuMCTzzj/3tVmnwqYx92wNW6AcgwJkmS9tFSG SpOMk0/8swrCPp+4jWLOCjp11/Q4sWL156u8CnQIvQB6QpozlwLgZk57yVuLnLDD01SH say9KBgF+UiN7gEDjgKQ6e3WK4cHG9xh8bJUzQt+zZjsmB//90shJejavIamtpN+g67y Pi0wbfnnfesBXg1ftmzOQEYJ5Z2fCL4MHWncKo7tcRSdr8L5+dCd6DoXeLu1mf5H0V4B 5ImA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ndkXqoYXV4SRjcjs22mzin/GG9waZBtSgJal0L6r/yk=; b=nkt+sxQl728fksZut3OnhJSSFEqmHnJFHRZqRoL/4OLE6NIRzxJSGKt39xrT7mXTLD LgXtCfGHsAnPLjG4uXiNinD2kCnsBTuDgLWoNNhibns+QE4P4c6frh5+UreSvS6pcdJk x4cxSmXosWB3WQEiDPXFBgMJHTyEsVEQHv+pBcV4Db3+S0Q2loxao70nhWDfiXYWhTRY aaCdDuXwAJAP0SfFN8g/5jK2l6E0TkV9TOt6c2GSGwMVHarRL4dyJNakI9pREH5X4YSh VdyNd5j/Ol0yftlZoPPGqOXQ6je9sAuxZLXI4oBdsg/ox0igV8k0OSMV/7il4sy0m5xH R0eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cpp0i421; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r28si4942203edc.150.2020.08.07.08.06.05; Fri, 07 Aug 2020 08:06:31 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cpp0i421; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbgHGPFc (ORCPT + 99 others); Fri, 7 Aug 2020 11:05:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbgHGPFb (ORCPT ); Fri, 7 Aug 2020 11:05:31 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D71AC061756 for ; Fri, 7 Aug 2020 08:05:31 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id o23so2443619ejr.1 for ; Fri, 07 Aug 2020 08:05:31 -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; bh=ndkXqoYXV4SRjcjs22mzin/GG9waZBtSgJal0L6r/yk=; b=cpp0i421XHrpqv9BHWnksM3Y8nY1WTLJuOWw1ohGMXGpoLu3SbZ9hi707ZAw4pwd/c /+ygev/hR8olZUEVF7weNEW+i63CRwJDRoO2Jir57xfi+T8akwxkNaRDlrHBH8mSYF55 7UKeGVq6pBKKDP30sFiJ9cZ11VGMJq1fMXsdM0Ih+OUGqmchqxVCgmgQSD24QcYEujkh QezX74PVkvalNZ1T8oFsaKll7GcuQZaIjk9GxQHCiED+OcBAo+rrYC8fLxOAXqv18gih eF9FC4cESf3S86DNGBKanFI/bzX3hbEhIqdWQJ5Knm+h88M2Nl5X4YLhSmrKkngHnpp8 BLZA== 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; bh=ndkXqoYXV4SRjcjs22mzin/GG9waZBtSgJal0L6r/yk=; b=LMGO/GIrKOggr8yvJtZnBFTyyXtB716+Z3HwIENXZDNGJf5rrDmANc/OPsEHmRj3BE Gbe59o0wev0i2EWkxX0/l9dR2ld2QSj6gHLngFa7dnCYPgEloSzbI2T5zQlGbjx/6NuQ FWzu90Ioaohh+JOlnSccoGLYAXwgwqBMShKGuojfW2WqOM91kIGS6PuVogLDbUpVlgVz IzN9gAw1rvyjRz3PXbE+n8BmayhJofmUwDwX16e9AQJmuBDG1g9S23QfdcvZZoqx2jWW pYC5sSN2qcrRywFNRWaHMUrlB2X8Euou8xjVOeMPMdjwfbUM56eBSqqw1DLZn0Wkz09V PFuw== X-Gm-Message-State: AOAM533yGMk56d/zHOOzTwqqRPYlL90X8YewxaT3WPIxBVZSAOTW0ll6 o38qAoPbrHNw22PWW4+ZyEA= X-Received: by 2002:a17:906:f847:: with SMTP id ks7mr10245835ejb.402.1596812729607; Fri, 07 Aug 2020 08:05:29 -0700 (PDT) Received: from ltop.local ([2a02:a03f:a7fb:e200:5975:4576:7691:7d5b]) by smtp.gmail.com with ESMTPSA id dm5sm5706647edb.32.2020.08.07.08.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 08:05:28 -0700 (PDT) Date: Fri, 7 Aug 2020 17:05:26 +0200 From: Luc Van Oostenryck To: Gao Xiang Cc: kernel test robot , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: fs/erofs/zdata.c:198:22: sparse: sparse: non size-preserving integer to pointer cast Message-ID: <20200807150526.vkbkslhiyy7gb6dc@ltop.local> References: <202008072005.Myrby1lg%lkp@intel.com> <20200807144801.GA30258@hsiangkao-HP-ZHAN-66-Pro-G1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200807144801.GA30258@hsiangkao-HP-ZHAN-66-Pro-G1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 07, 2020 at 10:48:12PM +0800, Gao Xiang wrote: > On Fri, Aug 07, 2020 at 08:08:10PM +0800, kernel test robot wrote: > > sparse warnings: (new ones prefixed by >>) > > > > >> fs/erofs/zdata.c:198:22: sparse: sparse: non size-preserving integer to pointer cast > > fs/erofs/zdata.c:282:22: sparse: sparse: non size-preserving integer to pointer cast > > fs/erofs/zdata.c:1094:24: sparse: sparse: non size-preserving integer to pointer cast > > I don't think these are valid warnings. Indeed, they're not. > All these three lines are using cmpxchg struct page * (which is equivalent to unsigned long > in these cmpxchg macros) and nothing special at all in my opinion (Especially the last two > lines). What is special is that s390 use __sync_val_compare_and_swap() to implement cmpxchg(). This builtin has a return type which depends on its arguments while sparse was always using 'int' as the return type. A patch is on the way. Regards, -- Luc Van Oostenryck