Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1029369imw; Fri, 15 Jul 2022 19:00:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRBRTLb1LZ7eJJNX7orKU8upYwrjPfG9mGMwpP7jwFIYtQAf26vFAGb4/BBLExA96D70Uu X-Received: by 2002:a17:90b:88d:b0:1ef:9182:104a with SMTP id bj13-20020a17090b088d00b001ef9182104amr26206955pjb.74.1657936813469; Fri, 15 Jul 2022 19:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657936813; cv=none; d=google.com; s=arc-20160816; b=rhUuLiUUg5AUEh7WZJq75lxVKd6L7txZBgxlcegpjuwbXvW+NPFXY2h01eIL0MxuiN ytHARVvtLCM/SMCMlmLvfiH76mzHs6Z51O7IIeR2ijBjFMaWOSZOQSO8eq61rJ1Htas8 I1izzPwAM+Zi9qJ7BR5t5j9noAIz0WJYgdAcPuv1zYzLkVHa842HruXC4HHQgpLga5kQ tibIXua+YIbWWCr2Mb5uazs3Gm26IdIogAA8uumwLScQ5n3rmWOzlOSA/i+H5KU9ZPz8 +4vyQEw++KZp3QJDQZtEgRs7qX6mu2NbPDDMLWG1gKd9zVeDv1B7Cf6LG4s4lHeRi9wE L6ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=xck+iVKtCzIIawCmNWz2YEq/IoxcfbvV3UsCeQTb21Q=; b=Darv/OQimANcSZfuYzzViopL+neljTyJhEAp3oIEZSjzWfz+74d/WgHANMTHldDAf4 2rWckFTDKcOzF7CuV+2wjcZasv1FRyIuPkGg+EhBRqBMSjQnMB39mWSfeyTLzPmCBJq+ v6DqsZxBH2SqGs95SgaqCPHkzVYnXb/GGG0NjZmh+ZLMz2mnl+Rcq+VDro/cShuJjhHT j6J3/jEIenkFCX3+4NvZk0UyZCtUEjdFspIk6osqszyJl/uvjy5TSnvwfYLT3vTKIZND jsd5iCm3DD5Z7RnemPGv14nDppjOBIF9uX27B5gnNcdtXiP7cv2gXhzWyQ37EFHDcxm5 xCkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jsK40m8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k22-20020aa788d6000000b0050d8195100bsi8140319pff.7.2022.07.15.18.59.57; Fri, 15 Jul 2022 19:00:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jsK40m8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbiGPBJ4 (ORCPT + 99 others); Fri, 15 Jul 2022 21:09:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiGPBJy (ORCPT ); Fri, 15 Jul 2022 21:09:54 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC68164E1 for ; Fri, 15 Jul 2022 18:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657933792; x=1689469792; h=date:from:to:cc:subject:message-id:mime-version; bh=4GCCSqYfxhMfuUeYnX9yJ1HDie2rP+pCxp6DS8qkcDI=; b=jsK40m8r/Ne6/UnIK1fO+R4JhtyZycuBFjlQjT3r+Ov+eHS7RPr4bKJC JK3bXwALDw3MRwTFJ83qpwpFYQEQ2zjiugsuUsRVFftsfaaAgnES6M5bq BRcZTQU7KR7eFJQ2jFxIk8zZkYO4Bgea8WZLJ2LdV2lTLtv2QxwN9YY5B FJD1RswRzvUxyt4JtFWmzzK8WpW1g94tUG8iXPJ08XRuYlhplb6Mh/A+l 2YT1ROsyM0UzVEquB/OSlopK8hou/7h2ZKKMQUdDrhGk7l1/pRGgthJoQ onrPqMwTOeOoMhAE5rX7jk7cghRO/kxC4+k8/vcdiSUa0ESIMZ28zf7Qp A==; X-IronPort-AV: E=McAfee;i="6400,9594,10409"; a="284692241" X-IronPort-AV: E=Sophos;i="5.92,275,1650956400"; d="scan'208";a="284692241" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2022 18:09:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,275,1650956400"; d="scan'208";a="629306177" Received: from lkp-server02.sh.intel.com (HELO ff137eb26ff1) ([10.239.97.151]) by orsmga001.jf.intel.com with ESMTP; 15 Jul 2022 18:09:50 -0700 Received: from kbuild by ff137eb26ff1 with local (Exim 4.95) (envelope-from ) id 1oCWJZ-0000uk-Rz; Sat, 16 Jul 2022 01:09:49 +0000 Date: Sat, 16 Jul 2022 09:09:15 +0800 From: kernel test robot To: "Steven Rostedt (Google)" Cc: kbuild-all@lists.01.org, Ammar Faizi , GNU/Weeb Mailing List , linux-kernel@vger.kernel.org Subject: [ammarfaizi2-block:rostedt/linux-trace/ftrace/core 30/30] include/linux/cpumask.h:95:42: warning: function 'trace_event_get_offsets_foo_bar' might be a candidate for 'gnu_printf' format attribute Message-ID: <202207160905.GmOfByea-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEXHASH_WORD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://github.com/ammarfaizi2/linux-block rostedt/linux-trace/ftrace/core head: 26b2da5fc0b41a9a6a5e30b858da28572a6f4cbc commit: 26b2da5fc0b41a9a6a5e30b858da28572a6f4cbc [30/30] tracing: Add example and documentation for new __vstring() macro config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220716/202207160905.GmOfByea-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce (this is a W=1 build): # https://github.com/ammarfaizi2/linux-block/commit/26b2da5fc0b41a9a6a5e30b858da28572a6f4cbc git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block rostedt/linux-trace/ftrace/core git checkout 26b2da5fc0b41a9a6a5e30b858da28572a6f4cbc # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash samples/trace_events/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/trace/define_trace.h:102, from samples/trace_events/trace-events-sample.h:608, from samples/trace_events/trace-events-sample.c:12: samples/trace_events/./trace-events-sample.h: In function 'trace_event_get_offsets_foo_bar': >> include/linux/cpumask.h:95:42: warning: function 'trace_event_get_offsets_foo_bar' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 95 | #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask) | ^~~~~~~ include/trace/trace_events.h:263:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 263 | tstruct; \ | ^~~~~~~ include/trace/trace_events.h:43:30: note: in expansion of macro 'PARAMS' 43 | PARAMS(tstruct), \ | ^~~~~~ samples/trace_events/./trace-events-sample.h:277:1: note: in expansion of macro 'TRACE_EVENT' 277 | TRACE_EVENT(foo_bar, | ^~~~~~~~~~~ samples/trace_events/./trace-events-sample.h:285:9: note: in expansion of macro 'TP_STRUCT__entry' 285 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:82:34: note: in expansion of macro '__dynamic_array' 82 | #define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:70:11: note: in expansion of macro '__bitmask_size_in_bytes_raw' 70 | ((__bitmask_size_in_bytes_raw(nr_bits) + \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:83:42: note: in expansion of macro '__bitmask_size_in_longs' 83 | __bitmask_size_in_longs(nr_bits)) | ^~~~~~~~~~~~~~~~~~~~~~~ samples/trace_events/./trace-events-sample.h:290:17: note: in expansion of macro '__bitmask' 290 | __bitmask( cpus, num_possible_cpus() ) | ^~~~~~~~~ include/linux/cpumask.h:915:48: note: in expansion of macro 'cpu_possible_mask' 915 | #define num_possible_cpus() cpumask_weight(cpu_possible_mask) | ^~~~~~~~~~~~~~~~~ samples/trace_events/./trace-events-sample.h:290:41: note: in expansion of macro 'num_possible_cpus' 290 | __bitmask( cpus, num_possible_cpus() ) | ^~~~~~~~~~~~~~~~~ In file included from include/trace/define_trace.h:102, from samples/trace_events/trace-events-sample.h:608, from samples/trace_events/trace-events-sample.c:12: samples/trace_events/./trace-events-sample.h: In function 'trace_event_raw_event_foo_bar': include/trace/trace_events.h:386:16: warning: function 'trace_event_raw_event_foo_bar' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 386 | struct trace_event_raw_##call *entry; \ | ^~~~~~~~~~~~~~~~ include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS' 40 | DECLARE_EVENT_CLASS(name, \ | ^~~~~~~~~~~~~~~~~~~ samples/trace_events/./trace-events-sample.h:277:1: note: in expansion of macro 'TRACE_EVENT' 277 | TRACE_EVENT(foo_bar, | ^~~~~~~~~~~ In file included from include/trace/define_trace.h:103, from samples/trace_events/trace-events-sample.h:608, from samples/trace_events/trace-events-sample.c:12: samples/trace_events/./trace-events-sample.h: In function 'perf_trace_foo_bar': include/trace/perf.h:64:16: warning: function 'perf_trace_foo_bar' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 64 | struct hlist_head *head; \ | ^~~~~~~~~~ include/trace/trace_events.h:40:9: note: in expansion of macro 'DECLARE_EVENT_CLASS' 40 | DECLARE_EVENT_CLASS(name, \ | ^~~~~~~~~~~~~~~~~~~ samples/trace_events/./trace-events-sample.h:277:1: note: in expansion of macro 'TRACE_EVENT' 277 | TRACE_EVENT(foo_bar, | ^~~~~~~~~~~ vim +95 include/linux/cpumask.h ^1da177e4c3f415 Linus Torvalds 2005-04-16 49 ^1da177e4c3f415 Linus Torvalds 2005-04-16 50 /* ^1da177e4c3f415 Linus Torvalds 2005-04-16 51 * The following particular system cpumasks and operations manage b3199c025d1646e Rusty Russell 2008-12-30 52 * possible, present, active and online cpus. ^1da177e4c3f415 Linus Torvalds 2005-04-16 53 * b3199c025d1646e Rusty Russell 2008-12-30 54 * cpu_possible_mask- has bit 'cpu' set iff cpu is populatable b3199c025d1646e Rusty Russell 2008-12-30 55 * cpu_present_mask - has bit 'cpu' set iff cpu is populated b3199c025d1646e Rusty Russell 2008-12-30 56 * cpu_online_mask - has bit 'cpu' set iff cpu available to scheduler b3199c025d1646e Rusty Russell 2008-12-30 57 * cpu_active_mask - has bit 'cpu' set iff cpu available to migration ^1da177e4c3f415 Linus Torvalds 2005-04-16 58 * b3199c025d1646e Rusty Russell 2008-12-30 59 * If !CONFIG_HOTPLUG_CPU, present == possible, and active == online. ^1da177e4c3f415 Linus Torvalds 2005-04-16 60 * b3199c025d1646e Rusty Russell 2008-12-30 61 * The cpu_possible_mask is fixed at boot time, as the set of CPU id's b3199c025d1646e Rusty Russell 2008-12-30 62 * that it is possible might ever be plugged in at anytime during the b3199c025d1646e Rusty Russell 2008-12-30 63 * life of that system boot. The cpu_present_mask is dynamic(*), b3199c025d1646e Rusty Russell 2008-12-30 64 * representing which CPUs are currently plugged in. And b3199c025d1646e Rusty Russell 2008-12-30 65 * cpu_online_mask is the dynamic subset of cpu_present_mask, b3199c025d1646e Rusty Russell 2008-12-30 66 * indicating those CPUs available for scheduling. b3199c025d1646e Rusty Russell 2008-12-30 67 * b3199c025d1646e Rusty Russell 2008-12-30 68 * If HOTPLUG is enabled, then cpu_possible_mask is forced to have ^1da177e4c3f415 Linus Torvalds 2005-04-16 69 * all NR_CPUS bits set, otherwise it is just the set of CPUs that ^1da177e4c3f415 Linus Torvalds 2005-04-16 70 * ACPI reports present at boot. ^1da177e4c3f415 Linus Torvalds 2005-04-16 71 * b3199c025d1646e Rusty Russell 2008-12-30 72 * If HOTPLUG is enabled, then cpu_present_mask varies dynamically, ^1da177e4c3f415 Linus Torvalds 2005-04-16 73 * depending on what ACPI reports as currently plugged in, otherwise b3199c025d1646e Rusty Russell 2008-12-30 74 * cpu_present_mask is just a copy of cpu_possible_mask. ^1da177e4c3f415 Linus Torvalds 2005-04-16 75 * b3199c025d1646e Rusty Russell 2008-12-30 76 * (*) Well, cpu_present_mask is dynamic in the hotplug case. If not b3199c025d1646e Rusty Russell 2008-12-30 77 * hotplug, it's a copy of cpu_possible_mask, hence fixed at boot. ^1da177e4c3f415 Linus Torvalds 2005-04-16 78 * ^1da177e4c3f415 Linus Torvalds 2005-04-16 79 * Subtleties: ^1da177e4c3f415 Linus Torvalds 2005-04-16 80 * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode ^1da177e4c3f415 Linus Torvalds 2005-04-16 81 * assumption that their single CPU is online. The UP b3199c025d1646e Rusty Russell 2008-12-30 82 * cpu_{online,possible,present}_masks are placebos. Changing them ^1da177e4c3f415 Linus Torvalds 2005-04-16 83 * will have no useful affect on the following num_*_cpus() ^1da177e4c3f415 Linus Torvalds 2005-04-16 84 * and cpu_*() macros in the UP case. This ugliness is a UP ^1da177e4c3f415 Linus Torvalds 2005-04-16 85 * optimization - don't waste any instructions or memory references ^1da177e4c3f415 Linus Torvalds 2005-04-16 86 * asking if you're online or how many CPUs there are if there is ^1da177e4c3f415 Linus Torvalds 2005-04-16 87 * only one CPU. ^1da177e4c3f415 Linus Torvalds 2005-04-16 88 */ ^1da177e4c3f415 Linus Torvalds 2005-04-16 89 4b804c85dc37db6 Rasmus Villemoes 2016-01-20 90 extern struct cpumask __cpu_possible_mask; 4b804c85dc37db6 Rasmus Villemoes 2016-01-20 91 extern struct cpumask __cpu_online_mask; 4b804c85dc37db6 Rasmus Villemoes 2016-01-20 92 extern struct cpumask __cpu_present_mask; 4b804c85dc37db6 Rasmus Villemoes 2016-01-20 93 extern struct cpumask __cpu_active_mask; e40f74c535b8a0e Peter Zijlstra 2021-01-19 94 extern struct cpumask __cpu_dying_mask; 5aec01b834fd6f8 Rasmus Villemoes 2016-01-20 @95 #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask) 5aec01b834fd6f8 Rasmus Villemoes 2016-01-20 96 #define cpu_online_mask ((const struct cpumask *)&__cpu_online_mask) 5aec01b834fd6f8 Rasmus Villemoes 2016-01-20 97 #define cpu_present_mask ((const struct cpumask *)&__cpu_present_mask) 5aec01b834fd6f8 Rasmus Villemoes 2016-01-20 98 #define cpu_active_mask ((const struct cpumask *)&__cpu_active_mask) e40f74c535b8a0e Peter Zijlstra 2021-01-19 99 #define cpu_dying_mask ((const struct cpumask *)&__cpu_dying_mask) b3199c025d1646e Rusty Russell 2008-12-30 100 :::::: The code at line 95 was first introduced by commit :::::: 5aec01b834fd6f8ca49d1aeede665b950d0c148e kernel/cpu.c: eliminate cpu_*_mask :::::: TO: Rasmus Villemoes :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://01.org/lkp