From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3E6EC433EF for ; Tue, 1 Mar 2022 12:11:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F08768D0002; Tue, 1 Mar 2022 07:11:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EB7C38D0001; Tue, 1 Mar 2022 07:11:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA6DD8D0002; Tue, 1 Mar 2022 07:11:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id C95B48D0001 for ; Tue, 1 Mar 2022 07:11:30 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 948B324175 for ; Tue, 1 Mar 2022 12:11:30 +0000 (UTC) X-FDA: 79195702740.06.3EA7B4D Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf01.hostedemail.com (Postfix) with ESMTP id 6B57240009 for ; Tue, 1 Mar 2022 12:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646136689; x=1677672689; h=date:from:to:cc:subject:message-id:mime-version; bh=Uj5sc++QVz/F+wkCeTHqry3yPvtFGaqcbyp4J5mvpns=; b=LqvUYhqVe1KH1sjdBlDJNUvlQ9xMrPQXNhC5RZ//DPNQppSpdnrmb7vq 0G3Tfm7alm/p4JynbLX51zc+KEA0AvslaXMhlV7Y0ZUWQg6IQGytl76es UqptR+2HPCwFORAhBg8h8skC7spybpK6xSQkmY7iCdzixI5NRhZGRT3NG PLSW/e/5vibfg9jS+uupChYBPUgIwknvdgmXK/95NQXVhT7nLdwOgQFFX xUO/euiPH6dTFW9L/k+q6TpgYIRgzXCvO5pXrLrgqf9fj8WvbCJHavl/L 2qs2+NRTE52q1BZc0/wbnRrQdebPWSdm2RkAJik0i0sFY/WhslEifv1Kj Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="236627339" X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="236627339" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 04:11:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="709032440" Received: from lkp-server01.sh.intel.com (HELO 2146afe809fb) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 01 Mar 2022 04:11:25 -0800 Received: from kbuild by 2146afe809fb with local (Exim 4.92) (envelope-from ) id 1nP1Lh-0000O6-0X; Tue, 01 Mar 2022 12:11:25 +0000 Date: Tue, 1 Mar 2022 20:11:04 +0800 From: kernel test robot To: Maninder Singh Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Johannes Weiner , Vaneet Narang , Andrew Morton , Linux Memory Management List Subject: [hnaz-mm:master 272/379] lib/vsprintf.c:991:13: warning: variable 'modbuildid' set but not used Message-ID: <202203012040.uFWGm3My-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 6B57240009 X-Stat-Signature: kkqwkjifyi4bfiuqb9cirqr1bmzyuyz4 X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=LqvUYhqV; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf01.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam03 X-HE-Tag: 1646136689-969828 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://github.com/hnaz/linux-mm master head: a46912c14343fd3269cc133494988af90b377d9f commit: b314f622e664eb263ea03ef7f4580e37146f123f [272/379] kallsyms: enhance %pS/s/b printing when KALLSYSMS is disabled config: arm-eseries_pxa_defconfig (https://download.01.org/0day-ci/archive/20220301/202203012040.uFWGm3My-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/hnaz/linux-mm/commit/b314f622e664eb263ea03ef7f4580e37146f123f git remote add hnaz-mm https://github.com/hnaz/linux-mm git fetch --no-tags hnaz-mm master git checkout b314f622e664eb263ea03ef7f4580e37146f123f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): lib/vsprintf.c: In function 'sprint_module_info': >> lib/vsprintf.c:991:13: warning: variable 'modbuildid' set but not used [-Wunused-but-set-variable] 991 | int modbuildid = 0; | ^~~~~~~~~~ lib/vsprintf.c: In function 'va_format': lib/vsprintf.c:1759:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 1759 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va); | ^~~ vim +/modbuildid +991 lib/vsprintf.c 981 982 #if !defined(CONFIG_KALLSYMS) && defined(CONFIG_MODULES) 983 static int sprint_module_info(char *buf, char *end, unsigned long value, 984 const char *fmt) 985 { 986 struct module *mod; 987 unsigned long offset = 1; 988 unsigned long base; 989 int ret = 0; 990 const char *modname; > 991 int modbuildid = 0; 992 int len; 993 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) 994 const unsigned char *buildid = NULL; 995 #endif 996 997 if (is_ksym_addr(value)) 998 return 0; 999 1000 if (*fmt == 'B' && fmt[1] == 'b') 1001 modbuildid = 1; 1002 else if (*fmt == 'S' && (fmt[1] == 'b' || (fmt[1] == 'R' && fmt[2] == 'b'))) 1003 modbuildid = 1; 1004 else if (*fmt != 's') { 1005 /* 1006 * do nothing. 1007 */ 1008 } else 1009 offset = 0; 1010 1011 preempt_disable(); 1012 mod = __module_address(value); 1013 if (mod) { 1014 ret = 1; 1015 modname = mod->name; 1016 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) 1017 if (modbuildid) 1018 buildid = mod->build_id; 1019 #endif 1020 if (offset) { 1021 base = (unsigned long)mod->core_layout.base; 1022 offset = value - base; 1023 } 1024 } 1025 1026 preempt_enable(); 1027 if (!ret) 1028 return 0; 1029 1030 /* address belongs to module */ 1031 if (offset) 1032 len = sprintf(buf, "0x%lx+0x%lx", base, offset); 1033 else 1034 len = sprintf(buf, "0x%lx", value); 1035 1036 len += sprintf(buf + len, " [%s", modname); 1037 #if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID) 1038 if (modbuildid && buildid) { 1039 /* build ID should match length of sprintf */ 1040 static_assert(sizeof(typeof_member(struct module, build_id)) == 20); 1041 len += sprintf(buf + len, " %20phN", buildid); 1042 } 1043 #endif 1044 len += sprintf(buf + len, "]"); 1045 1046 return len; 1047 } 1048 #else 1049 static inline int sprint_module_info(char *buf, char *end, unsigned long value, 1050 const char *fmt) 1051 { 1052 return 0; 1053 } 1054 #endif 1055 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org