Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1608863rdd; Thu, 11 Jan 2024 04:31:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEq4dlmJ+xpk27lC6xI/Ew9wn/J/Ja5OCmUZkKf8ubhJSypE8zS3hU5k9nKHKN/mAFmn1/m X-Received: by 2002:a17:902:c412:b0:1d4:50f9:6b4b with SMTP id k18-20020a170902c41200b001d450f96b4bmr1300854plk.94.1704976263429; Thu, 11 Jan 2024 04:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704976263; cv=none; d=google.com; s=arc-20160816; b=H9w6yqOCgdtbaWbS7KvMsxOJ10nPpqz2Ahef+l/OlUMQnFsdXxzOkde5NvqftG9yvq Wjn8vSGUqajLSL+7ugrjKOTDzTzReRn4oyuv16NdUVt4eHsAndDzlWeX1MFGKHCJRjPA 2iGBYYNkhiSXHmCrHMlP5TFzdyjFP96tslLRTNsMjrtWPnEWA4kocWGwl+tRbtrNkdxU wnHoabhI7SYmoufuEdZjHzFzWc1LH69kNxbHn3/7LkQJAgN1EUqXBgRFUAj4PD7X55gL CMpdpaLer3+Rjxx7ptxVi/WVt+cx4atP9m04unLRVpTa7B+AI0ioAcmYZ28AEWKvdZcx hKlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=ysfITMHLSqrN26kdI0LeOQaOenm7EPUzRRHqSOcHC3c=; fh=+Oiw3XZflrn6u9yILS7azsa1iLInaPBAgU1W9wgryFc=; b=MF3IBikia/ItKwcWN818BzmEor8OJ6OQe1HR3q6e9cpOx73VVMGfuNUcUt1m7UJfx3 ZmHlj4ThuSGOt2mzAoERerGDBX+c2NLF5vI7sjlcHN/o0B5Zb9taMmKO6uxI10HQ8c2i aXLdF9Vdv+S26ZJVYvN7QpAVWzT4ODfYOLFLZeRHEc9a4SDR178vqpRFAmwGMvi8Tnb6 uaplzIm9JHhanHPwGPMsdZWwKyNS20xF6CzOvgi1IW2I50ANG1YZriJt1lWLF5F6toNZ H+h6tK4RLGWs4+D2L/rz5uIsqmyX23nTwfPI5Lnt6iN1LbHQgXT84c9wVRlPs58pS9pc jTPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nFPuKTiD; spf=pass (google.com: domain of linux-kernel+bounces-23588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jd3-20020a170903260300b001d54e05a699si954317plb.255.2024.01.11.04.31.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:31:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nFPuKTiD; spf=pass (google.com: domain of linux-kernel+bounces-23588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 699D5B22C0A for ; Thu, 11 Jan 2024 12:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B240215AE5; Thu, 11 Jan 2024 12:30:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nFPuKTiD" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FE8A15ADC for ; Thu, 11 Jan 2024 12:30:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704976211; x=1736512211; h=date:from:to:cc:subject:message-id:mime-version; bh=n5tknuiJOqHvGtIJ6aXYYfROsKwyLjFr33pFTiI9818=; b=nFPuKTiDf2ZIs0+En5uddakDuTrQQiFlegBCPVcuK7IpIZ+8TT3lTyOc zNwDkZIIWZvoJRgXeJ9PHwFtmcSEmetKRwtfmHQ2hI0DTAEjkMm0ChQ/b Nme/qwf6gLkWTIescpNOSZTANQLdKlkVcRlJF3jHoJ85MuYVtHHmIcPiT cPy3+pFZ7SE2wYDv0clPErkgQ05hPRFIz3SA63QC8zMRSu/lQjlmG9PN+ scsDLUYOL+kTjnF5Gv3iULDTriL8IU4vPNYp3MkjFkfe/ki0DZUj+Tw77 7hpm3gXPZbcz+KGPAoVoG1UniTmF+HkWhUFVVDhnvcIWAd+SxoqJAR9sR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="5911827" X-IronPort-AV: E=Sophos;i="6.04,186,1695711600"; d="scan'208";a="5911827" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 04:30:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="782626784" X-IronPort-AV: E=Sophos;i="6.04,186,1695711600"; d="scan'208";a="782626784" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by orsmga002.jf.intel.com with ESMTP; 11 Jan 2024 04:30:08 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rNuCD-0008G1-0C; Thu, 11 Jan 2024 12:30:05 +0000 Date: Thu, 11 Jan 2024 20:29:05 +0800 From: kernel test robot To: Chris Down Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Petr Mladek Subject: include/linux/printk.h:434:44: warning: '%s' directive argument is null Message-ID: <202401112002.AOjwMNM0-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: de927f6c0b07d9e698416c5b287c521b07694cac commit: 337015573718b161891a3473d25f59273f2e626b printk: Userspace format indexing support date: 2 years, 6 months ago config: x86_64-randconfig-002-20240105 (https://download.01.org/0day-ci/archive/20240111/202401112002.AOjwMNM0-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240111/202401112002.AOjwMNM0-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/202401112002.AOjwMNM0-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:19, from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/current.h:6, from include/linux/sched.h:12, from include/linux/blkdev.h:5, from drivers/scsi/scsi_devinfo.c:3: drivers/scsi/scsi_devinfo.c: In function 'scsi_dev_info_list_add_str': >> include/linux/printk.h:434:44: warning: '%s' directive argument is null [-Wformat-overflow=] 434 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) | ^ include/linux/printk.h:430:3: note: in definition of macro 'printk_index_wrap' 430 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~~~~ drivers/scsi/scsi_devinfo.c:551:4: note: in expansion of macro 'printk' 551 | printk(KERN_ERR "%s: bad dev info string '%s' '%s'" | ^~~~~~ drivers/scsi/scsi_devinfo.c:552:14: note: format string is defined here 552 | " '%s'\n", __func__, vendor, model, | ^~ vim +434 include/linux/printk.h 406 407 /* 408 * Some subsystems have their own custom printk that applies a va_format to a 409 * generic format, for example, to include a device number or other metadata 410 * alongside the format supplied by the caller. 411 * 412 * In order to store these in the way they would be emitted by the printk 413 * infrastructure, the subsystem provides us with the start, fixed string, and 414 * any subsequent text in the format string. 415 * 416 * We take a variable argument list as pr_fmt/dev_fmt/etc are sometimes passed 417 * as multiple arguments (eg: `"%s: ", "blah"`), and we must only take the 418 * first one. 419 * 420 * subsys_fmt_prefix must be known at compile time, or compilation will fail 421 * (since this is a mistake). If fmt or level is not known at compile time, no 422 * index entry will be made (since this can legitimately happen). 423 */ 424 #define printk_index_subsys_emit(subsys_fmt_prefix, level, fmt, ...) \ 425 __printk_index_emit(fmt, level, subsys_fmt_prefix) 426 427 #define printk_index_wrap(_p_func, _fmt, ...) \ 428 ({ \ 429 __printk_index_emit(_fmt, NULL, NULL); \ 430 _p_func(_fmt, ##__VA_ARGS__); \ 431 }) 432 433 > 434 #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) 435 #define printk_deferred(fmt, ...) \ 436 printk_index_wrap(_printk_deferred, fmt, ##__VA_ARGS__) 437 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki