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 BB82FCD37B4 for ; Tue, 19 Sep 2023 04:02:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2704F6B0497; Tue, 19 Sep 2023 00:02:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F9A66B0498; Tue, 19 Sep 2023 00:02:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 09BD16B0499; Tue, 19 Sep 2023 00:02:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E89CA6B0497 for ; Tue, 19 Sep 2023 00:02:38 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 93465120479 for ; Tue, 19 Sep 2023 04:02:38 +0000 (UTC) X-FDA: 81252000396.23.ABC0789 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by imf21.hostedemail.com (Postfix) with ESMTP id 77E6E1C0006 for ; Tue, 19 Sep 2023 04:02:35 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=F8kVnUt2; spf=pass (imf21.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695096156; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=TkApIHAU4wjH+JLbKNIOUL9JVhd5XMVQ4yJhyvIWHF0=; b=GFK3iHpKC+A2jmxLSbtzCy/G/bPi1Ve1FxlrNA0YUHDyRQGTozxYpKy1CAChJtFrDc4Ca4 Q5SF6sK5lm1UsNAGP5CYODkLEJ52xgsEkViUgERrKSoWrfrOXRaosaBHxbMw2CDan/IIm4 TmflmgxWoTIl38Ize1F/Mr0svCnjNJQ= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=F8kVnUt2; spf=pass (imf21.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695096156; a=rsa-sha256; cv=none; b=TjGkadxNRA/cH391M65I1dteCSYir0VZxVwijpZ4OoJf3xk99pBwlWQcFXuUPAK0ALU6pz pWqolegN18UiAZTbQ8JiEMKk/CCM1ksSWI9j22VOaeB+VRiql/ybieJeWJuVy4TSQmnvTi zdK6GT3g8CTvFkOtXlLbBcjeKcRVh04= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695096155; x=1726632155; h=date:from:to:cc:subject:message-id:mime-version; bh=QZtJ169XLNB/hgirj4TxxTNmDKW2Zzz320oct2Pelaw=; b=F8kVnUt2xbJaIETWB8BfrG8N9r7MDNDyLlKG7hbJFeNGnDGTnocCAAMX gkNY816BqV6zOfmwwX4fbWcISxyZVZ5icHy66YT7cdYLwi7OzWJxqwawZ qMdsCcpIvwqoG0Rl7vGXeO3g8KWge2ENiycz8eohzyWhVTXcR28cYU8dF ZFsxbxNrlJQ9ZD2mucMK8i1/RBYt3R2pRjKq3DKc82+f9axoTCfLozeKB nZOaWkkhElvW/r/NKRu46QW5firuupbw8zHjn1+ImhFzzEX/hyuxptfi5 OR0KhOvemFDrpQnoTQtyhIzHw8MgwTSbrsDODdLkNGyAlymorIPI6p7C+ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="446319631" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="446319631" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 21:02:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10837"; a="722713301" X-IronPort-AV: E=Sophos;i="6.02,158,1688454000"; d="scan'208";a="722713301" Received: from lkp-server02.sh.intel.com (HELO 9ef86b2655e5) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 18 Sep 2023 21:02:32 -0700 Received: from kbuild by 9ef86b2655e5 with local (Exim 4.96) (envelope-from ) id 1qiRwT-0006sE-2z; Tue, 19 Sep 2023 04:02:29 +0000 Date: Tue, 19 Sep 2023 12:02:17 +0800 From: kernel test robot To: Baoquan He Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Andrew Morton , Zhen Lei Subject: [linux-next:master 5741/5912] kernel/crash_core.c:214:13: warning: argument 2 null where non-null expected Message-ID: <202309191144.B0MToaPG-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 77E6E1C0006 X-Rspam-User: X-Stat-Signature: hp8z5yzaf7af81cfaggrw9iaq66k9raa X-Rspamd-Server: rspam01 X-HE-Tag: 1695096155-699058 X-HE-Meta: U2FsdGVkX19CfkBqi9khfKhmJL1T55XohYi8uRHxaTi99nzUL8aKqu67myqWLqEZP/PwXpB7gKcfOSht5V6IekczB83ozjTe+gjXg5L/5jrkzWUvw0YaiLqwdZXywDy8/nxHoIvEpvomEOf+hzebqg34kSEDPnul0w6tzg4hUe8hAayvl2LdJhT5iaqBlVhGQju3LOE60fYehhmBSq+FMBgSpXdsx0z1I7cGM9yDTrnypvKH13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/LbhbdcJErud6zC2KdDukdaXLMqS4zLCmCT9szcpSwyoSok4MEPBv2hKrSLSD37ZFHROkfoCgvVUJUe+Ple84yZvHzrxGY4nkyIFgBIyUvUmfoMaEMTyPr0MUXQLx639w== 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 7fc7222d9680366edeecc219c21ca96310bdbc10 commit: 5c322f6aad10f0920f842a4ccf82e9b9f351c0a5 [5741/5912] crash_core.c: remove unneeded functions config: s390-buildonly-randconfig-r006-20220512 (https://download.01.org/0day-ci/archive/20230919/202309191144.B0MToaPG-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230919/202309191144.B0MToaPG-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202309191144.B0MToaPG-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from arch/s390/include/asm/atomic.h:12, from include/linux/atomic.h:7, from include/linux/mm_types_task.h:13, from include/linux/mm_types.h:5, from include/linux/buildid.h:5, from kernel/crash_core.c:7: kernel/crash_core.c: In function 'parse_crashkernel_suffix.constprop': >> kernel/crash_core.c:214:13: warning: argument 2 null where non-null expected [-Wnonnull] 214 | if (strncmp(cur, suffix, strlen(suffix))) { include/linux/compiler.h:68:10: note: in definition of macro '__trace_if_value' 68 | (cond) ? \ | ^~~~ include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var' 55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ kernel/crash_core.c:214:9: note: in expansion of macro 'if' 214 | if (strncmp(cur, suffix, strlen(suffix))) { | ^~ In file included from include/linux/bitmap.h:11, from include/linux/cpumask.h:12, from include/linux/mm_types_task.h:14, from include/linux/mm_types.h:5, from include/linux/buildid.h:5, from kernel/crash_core.c:7: include/linux/string.h:51:12: note: in a call to function 'strncmp' declared 'nonnull' 51 | extern int strncmp(const char *,const char *,__kernel_size_t); | ^~~~~~~ vim +214 kernel/crash_core.c 692f66f26a4c19 Hari Bathini 2017-05-08 193 692f66f26a4c19 Hari Bathini 2017-05-08 194 /* 692f66f26a4c19 Hari Bathini 2017-05-08 195 * That function parses "suffix" crashkernel command lines like 692f66f26a4c19 Hari Bathini 2017-05-08 196 * 692f66f26a4c19 Hari Bathini 2017-05-08 197 * crashkernel=size,[high|low] 692f66f26a4c19 Hari Bathini 2017-05-08 198 * 692f66f26a4c19 Hari Bathini 2017-05-08 199 * It returns 0 on success and -EINVAL on failure. 692f66f26a4c19 Hari Bathini 2017-05-08 200 */ 692f66f26a4c19 Hari Bathini 2017-05-08 201 static int __init parse_crashkernel_suffix(char *cmdline, 692f66f26a4c19 Hari Bathini 2017-05-08 202 unsigned long long *crash_size, 692f66f26a4c19 Hari Bathini 2017-05-08 203 const char *suffix) 692f66f26a4c19 Hari Bathini 2017-05-08 204 { 692f66f26a4c19 Hari Bathini 2017-05-08 205 char *cur = cmdline; 692f66f26a4c19 Hari Bathini 2017-05-08 206 692f66f26a4c19 Hari Bathini 2017-05-08 207 *crash_size = memparse(cmdline, &cur); 692f66f26a4c19 Hari Bathini 2017-05-08 208 if (cmdline == cur) { 692f66f26a4c19 Hari Bathini 2017-05-08 209 pr_warn("crashkernel: memory value expected\n"); 692f66f26a4c19 Hari Bathini 2017-05-08 210 return -EINVAL; 692f66f26a4c19 Hari Bathini 2017-05-08 211 } 692f66f26a4c19 Hari Bathini 2017-05-08 212 692f66f26a4c19 Hari Bathini 2017-05-08 213 /* check with suffix */ 692f66f26a4c19 Hari Bathini 2017-05-08 @214 if (strncmp(cur, suffix, strlen(suffix))) { 692f66f26a4c19 Hari Bathini 2017-05-08 215 pr_warn("crashkernel: unrecognized char: %c\n", *cur); 692f66f26a4c19 Hari Bathini 2017-05-08 216 return -EINVAL; 692f66f26a4c19 Hari Bathini 2017-05-08 217 } 692f66f26a4c19 Hari Bathini 2017-05-08 218 cur += strlen(suffix); 692f66f26a4c19 Hari Bathini 2017-05-08 219 if (*cur != ' ' && *cur != '\0') { 692f66f26a4c19 Hari Bathini 2017-05-08 220 pr_warn("crashkernel: unrecognized char: %c\n", *cur); 692f66f26a4c19 Hari Bathini 2017-05-08 221 return -EINVAL; 692f66f26a4c19 Hari Bathini 2017-05-08 222 } 692f66f26a4c19 Hari Bathini 2017-05-08 223 692f66f26a4c19 Hari Bathini 2017-05-08 224 return 0; 692f66f26a4c19 Hari Bathini 2017-05-08 225 } 692f66f26a4c19 Hari Bathini 2017-05-08 226 :::::: The code at line 214 was first introduced by commit :::::: 692f66f26a4c19d73249736aa973c13a1521b387 crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE :::::: TO: Hari Bathini :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki