From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932573AbbJMQb5 (ORCPT ); Tue, 13 Oct 2015 12:31:57 -0400 Received: from mx2.parallels.com ([199.115.105.18]:45853 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932107AbbJMQb4 (ORCPT ); Tue, 13 Oct 2015 12:31:56 -0400 Subject: Re: [PATCH v2 1/2] Provide READ_ONCE_NOCHECK() To: kbuild test robot References: <201510140014.WiiJdkpM%fengguang.wu@intel.com> CC: , , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , , Andrew Morton , Andy Lutomirski , Andrey Konovalov , Kostya Serebryany , Alexander Potapenko , kasan-dev , Borislav Petkov , Denys Vlasenko , Andi Kleen , Dmitry Vyukov , Sasha Levin , Wolfram Gloger From: Andrey Ryabinin Message-ID: <561D31F0.4080106@virtuozzo.com> Date: Tue, 13 Oct 2015 19:31:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510140014.WiiJdkpM%fengguang.wu@intel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: US-EXCH.sw.swsoft.com (10.255.249.47) To US-EXCH.sw.swsoft.com (10.255.249.47) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/2015 07:02 PM, kbuild test robot wrote: > Hi Andrey, > > [auto build test WARNING on tip/auto-latest -- if it's inappropriate base, please suggest rules for selecting the more suitable base] > > url: https://github.com/0day-ci/linux/commits/Andrey-Ryabinin/Provide-READ_ONCE_NOCHECK/20151013-204127 > config: mn10300-allyesconfig (attached as .config) > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=mn10300 > > All warnings (new ones prefixed by >>): > > fs/nfs/filelayout/filelayout.c: In function 'filelayout_read_pagelist': > fs/nfs/filelayout/filelayout.c:476:2: warning: format '%Zu' expects argument of type 'size_t', but argument 5 has type '__u32' [-Wformat=] > dprintk("--> %s ino %lu pgbase %u req %Zu@%llu\n", > ^ So the actual warning is here. And it's not new. > In file included from include/linux/nfs_fs.h:28:0, > from fs/nfs/filelayout/filelayout.c:32: > fs/nfs/filelayout/filelayout.c: In function 'filelayout_write_pagelist': > include/linux/compiler.h:270:8: warning: format '%Zu' expects argument of type 'size_t', but argument 5 has type '__u32' [-Wformat=] > union { typeof(x) __val; char __c[1]; } __u; \ > ^ > include/linux/sunrpc/debug.h:33:24: note: in definition of macro 'dfprintk' > printk(KERN_DEFAULT args); \ > ^ >>> include/linux/compiler.h:274:22: note: in expansion of macro '__READ_ONCE' > #define READ_ONCE(x) __READ_ONCE(x, _check) > ^ And this 'note: in expansion of macro' belongs to the warning above. So it's a false-positive. > include/asm-generic/atomic.h:130:24: note: in expansion of macro 'READ_ONCE' > #define atomic_read(v) READ_ONCE((v)->counter) > ^ > include/linux/sunrpc/debug.h:23:48: note: in expansion of macro 'atomic_read' > #define dprintk(args...) dfprintk(FACILITY, ## args) > ^ > fs/nfs/filelayout/filelayout.c:534:2: note: in expansion of macro 'dprintk' > dprintk("%s ino %lu sync %d req %Zu@%llu DS: %s cl_count %d\n", > ^ > > vim +/__READ_ONCE +274 include/linux/compiler.h > > 264 * with an explicit memory barrier or atomic instruction that provides the > 265 * required ordering. > 266 */ > 267 > 268 #define __READ_ONCE(x, check) \ > 269 ({ \ > > 270 union { typeof(x) __val; char __c[1]; } __u; \ > 271 __read_once_size##check(&(x), __u.__c, sizeof(x)); \ > 272 __u.__val; \ > 273 }) > > 274 #define READ_ONCE(x) __READ_ONCE(x, _check) > 275 #define READ_ONCE_NOCHECK(x) __READ_ONCE(x, _nocheck) > 276 > 277 #define WRITE_ONCE(x, val) \ > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation >