Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp365016rdh; Tue, 13 Feb 2024 21:44:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgVMfHjQCSp1+cz6lFx2cjm8BPTuKV6EJ7u3FY9vgmOs8s3C50qib4uqQTr0eEnHXXO3huaibGk3mvx3GJZbRv/fNlAAOQ6rSJPdIlaw== X-Google-Smtp-Source: AGHT+IFFC0q167xlO2BLv7PaEVvvB6y72hRrQUFY4Ak07qPbZ32TE2gag5nGo6qeq990Dxl3BfzE X-Received: by 2002:a05:620a:29c8:b0:787:15b8:bbb4 with SMTP id s8-20020a05620a29c800b0078715b8bbb4mr2139335qkp.20.1707889468434; Tue, 13 Feb 2024 21:44:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707889468; cv=pass; d=google.com; s=arc-20160816; b=RMYACD0ZPgdPgY7Ii6EWRJNIJnNQ2nJ3PgEgwuVK1xOh/o6sj3MRYZ8vXDpm1yyGwo iceWWW8UgCMDoWiMF1OeoD6V77TLCsYBUIwlkmiYRs4utIhtJP1zqrLO2q5hkywAed10 JU9LOGnrcLY6+eOGFBQmRTBZK/mA9BCp8bQ/TVsGv0GPxFSyp8bqirxtsM8pxkbpt+0j UT2uLlSQsD31zFMGWYA2Q6s8JZ+7kLhPqDKK4hBdNDDbxYg9ydI8nmv0p2byRtY01VL4 8ZJXXmb7B1EsxoLyyAO/9wI7pL7RLwUV/1uKTQ3guFEHIh6/2jC7LjHAFRktfmJS1EYE Jo6Q== ARC-Message-Signature: i=2; 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=omqDAHL/tQPxzzRHE8le2m6MfUUmOZGWZaZvKfHQIm8=; fh=EXmmoEKKvj892kseMowqfc6ieq+oFpbx80fqHComgac=; b=nFOk7sUSLgEn3ibrjNY/6mQ6TdbuBHYltZX8rwng2liOdxBpG3wjFdKwkxQip6a70m VG9ASxim6QGcTMTnkQUYrNC7Su1+jQv9IG18bJcuyZH1aXl6QKsk//x9V3QGNWyx321D I4of0Z83vyDcTW/2s+zpqKXhoAqG1k7AniZlHIt8QqkDmaUurl0/FAFvRbfMh6e9JwX7 MLfzSVeFrySQjzEeBBnrsAhqZLC6bfCPQ+n24xdkucqR5peYTDln4L0ydVFY0HeDdhdD N3BUeDo3vSYamNtW1fNzwRnngc3SvIyMDp091QtGeOIURXmQTOHarQPOAYcdm5p1lSY0 Hr9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gHLncSwx; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-64757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVqlYyKGmYIfnL3JOe0JpLxQ6WWSL9hmjvE3vKb6IfmTZ4lQFwT/Bd5qVMnFaqLbh/OZj6jQdXKSePcy/uGuI39qpqjJwaqhO7Idx6I8g== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t1-20020a05620a0b0100b0078633c24de6si4881179qkg.90.2024.02.13.21.44.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 21:44:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gHLncSwx; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-64757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64757-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1D1421C23F1B for ; Wed, 14 Feb 2024 05:44:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05074D510; Wed, 14 Feb 2024 05:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gHLncSwx" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 88B80C8DD for ; Wed, 14 Feb 2024 05:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707889459; cv=none; b=T+Pb9JYH5nd8BkH0idg8mIkeLJ5xaTyzqGzW7yTpyt/tSlY41qByS8xZwMyck/EBUXSD95aqH5YWOMGBu3MZNV/3/kF/1S2hCvBnE363KKNcrmmkgLX3jVUlg0GJUgo/jYjt369GkOAuPAoH+V4aPdxl6O3D98BwmCTG3XXqlT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707889459; c=relaxed/simple; bh=H3x+Tu/KUfIIvKBCAtwFdznjT/Eao+QusDRfpypQgsg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=G/12rV4So39YLHCYE9BDQpIO/tcJ6YRphscd4yxQ+TnJD42ZkLwr9Lb2dG5KxYuVi8VFkJFo8sybZEG0UDx2Yq9H8DZbIxGNsYdu1Wv79ljpgz1r7ObvoGP7bKRV+SyVl5EpCt1TplnGMyjy3BZL9tKBiPwyldMSZ/MkwsyeP0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gHLncSwx; arc=none smtp.client-ip=198.175.65.20 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=1707889457; x=1739425457; h=date:from:to:cc:subject:message-id:mime-version; bh=H3x+Tu/KUfIIvKBCAtwFdznjT/Eao+QusDRfpypQgsg=; b=gHLncSwx8AYBFYIy9fAWnWPvGHIdsRDGwKEK2Yv3p8/DxXofeSs4CgWG 48UHBIfL84Hvc/lu+/ufsl12YIW+PceLXa4yDrhXMiBBLynrgzjUlRSXy /3F0B4/obIo/77gKIbcaRfd7tbl8u2csikgQXY05HCDM+cHsgIDPS9ttz GXHnj4JfFQr3pyLCd1S8Q4lOv44c+VqsqAStDNq+6KeQowzF1UIQgkBme ZsPBnRBBZzq08cm0G9oh3uOBeupvTJij+zAkqhOBj1F+8akCkE7QXc5NX OFigXq6xT/t+r9EZGFoS1xP1z42X62JBUjNfvP1jy/RcGqYmfVm01v5JU w==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="1792426" X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="1792426" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 21:44:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="7741521" Received: from lkp-server01.sh.intel.com (HELO 01f0647817ea) ([10.239.97.150]) by fmviesa005.fm.intel.com with ESMTP; 13 Feb 2024 21:44:14 -0800 Received: from kbuild by 01f0647817ea with local (Exim 4.96) (envelope-from ) id 1ra844-0008Vs-1b; Wed, 14 Feb 2024 05:44:12 +0000 Date: Wed, 14 Feb 2024 13:43:24 +0800 From: kernel test robot To: Viresh Kumar Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org Subject: drivers/opp/debugfs.c:48:54: warning: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 8 Message-ID: <202402141313.81ltVF5g-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 Hi Viresh, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7e90b5c295ec1e47c8ad865429f046970c549a66 commit: 46f48aca2e5aef3f430e95d1a5fb68227ec8ec85 OPP: Fix missing debugfs supply directory for OPPs date: 5 years ago config: x86_64-buildonly-randconfig-001-20231012 (https://download.01.org/0day-ci/archive/20240214/202402141313.81ltVF5g-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240214/202402141313.81ltVF5g-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/202402141313.81ltVF5g-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/opp/debugfs.c: In function 'opp_debug_create_one': >> drivers/opp/debugfs.c:48:54: warning: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Wformat-truncation=] 48 | snprintf(name, sizeof(name), "supply-%d", i); | ^~ In function 'opp_debug_create_supplies', inlined from 'opp_debug_create_one' at drivers/opp/debugfs.c:119:7: drivers/opp/debugfs.c:48:46: note: directive argument in the range [-2147483644, 2147483646] 48 | snprintf(name, sizeof(name), "supply-%d", i); | ^~~~~~~~~~~ drivers/opp/debugfs.c:48:17: note: 'snprintf' output between 9 and 19 bytes into a destination of size 15 48 | snprintf(name, sizeof(name), "supply-%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +48 drivers/opp/debugfs.c deaa51465105a7 drivers/base/power/opp/debugfs.c Viresh Kumar 2015-11-11 37 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 38 static bool opp_debug_create_supplies(struct dev_pm_opp *opp, dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 39 struct opp_table *opp_table, dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 40 struct dentry *pdentry) dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 41 { dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 42 struct dentry *d; 1fae788ed640e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2017-05-23 43 int i; dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 44 1fae788ed640e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2017-05-23 45 for (i = 0; i < opp_table->regulator_count; i++) { d741029a239040 drivers/opp/debugfs.c Arvind Yadav 2017-09-21 46 char name[15]; d741029a239040 drivers/opp/debugfs.c Arvind Yadav 2017-09-21 47 d741029a239040 drivers/opp/debugfs.c Arvind Yadav 2017-09-21 @48 snprintf(name, sizeof(name), "supply-%d", i); dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 49 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 50 /* Create per-opp directory */ dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 51 d = debugfs_create_dir(name, pdentry); dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 52 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 53 if (!d) dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 54 return false; dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 55 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 56 if (!debugfs_create_ulong("u_volt_target", S_IRUGO, d, dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 57 &opp->supplies[i].u_volt)) dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 58 return false; dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 59 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 60 if (!debugfs_create_ulong("u_volt_min", S_IRUGO, d, dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 61 &opp->supplies[i].u_volt_min)) dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 62 return false; dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 63 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 64 if (!debugfs_create_ulong("u_volt_max", S_IRUGO, d, dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 65 &opp->supplies[i].u_volt_max)) dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 66 return false; dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 67 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 68 if (!debugfs_create_ulong("u_amp", S_IRUGO, d, dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 69 &opp->supplies[i].u_amp)) dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 70 return false; 1fae788ed640e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2017-05-23 71 } dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 72 dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 73 return true; dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 74 } dfbe4678d709e2 drivers/base/power/opp/debugfs.c Viresh Kumar 2016-12-01 75 :::::: The code at line 48 was first introduced by commit :::::: d741029a2390406d4d94279ae5b346831a9e61e6 PM / OPP: Use snprintf() to avoid kasprintf() and kfree() :::::: TO: Arvind Yadav :::::: CC: Rafael J. Wysocki -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki