Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1675835lqg; Sun, 3 Mar 2024 23:21:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXkHDnpRUHx2DO1IRwe85rTWfLenot69s+7a9uX5izI0a4EPqSXsn63nzMITloFjfDZZU5V4xERdFZA3Gk/tnlhKN7F6XqAb+uKNwgqAQ== X-Google-Smtp-Source: AGHT+IGY6pihCBtnPV1eqYaINrn3l5I+3iT30qrl7JwdTZZuFkc5JcPtpbjO3ZGRpD08JZDl2o+L X-Received: by 2002:a17:902:d2c9:b0:1dc:df24:e321 with SMTP id n9-20020a170902d2c900b001dcdf24e321mr10172624plc.6.1709536865962; Sun, 03 Mar 2024 23:21:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709536865; cv=pass; d=google.com; s=arc-20160816; b=rR5+hs7wEXUDyAF3dox3l+0359gICmw9q6p1UrlBoaOQ+mVlRmD5J9sspzvwrgehHn ykoBrgiOzW+2o9TZVmR05P/+qUhhjE4Lzgi2fhq2v9JyrhlDlkIkkHaP+5Ld28oWPh0C H5EKK2GAz8z7UdRKM2zzWZG+m9dTt9goODwqThJlyme2erXHppn1xFm8jp4KhiGOvXHP d7nJVTl6KxC9vPn4nDNINauqeAgwtF5/KgIa+bSyMkWVrmj4hIMpaBbocxBcLxXyr5wK 6o+YpvPaN63Exyo3P9LtUZPW7p4DgL/L6SUbEhJM0M8m3tBEPUtAJGZPdrwWUvkRjfhO uh+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ut2KpnnZ5CESsPKC15Vq3psWgxNiIKdUmLqL7tGXlBk=; fh=N91VQgEttZOmMQQaYVVm3hXdRf4zGd20JxNTx6NzVh0=; b=Kh5TeZRGyCtGY4NkBUqiSbPc0vtLz3AKB40qhHdPOhFRZGxM5w8qNfEBjydqvtZG/X 2Mec0yOlom7T/KcPZM18e9/YNJ7Il3lT7/l/7WHo6rFKIZnr0RtCsFqqGFa/0l++MJuh DB5TQ7vXnh4zJmofKKJW9UKX/PVPna4otFpytPGNgOFW89IBONTsldX1lC8fdi/b1kNh UyaTsxlSwxAmYSDYYbKAQ6RaVomI1g1PKnkZXvXfPHDzpFs+pGHYfGm/1Qj6GJFHEurq wGb4C9K/zR5osKmRIvvascytjrLHeB+GHlrCEMr/mvVpjf6ML0DAVY+Xvn+ajDHs4485 y7UQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PkDCOzX8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-90119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90119-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q7-20020a170902eb8700b001dccdf670c4si8007532plg.403.2024.03.03.23.21.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 23:21:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PkDCOzX8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-90119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90119-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A43642816F7 for ; Mon, 4 Mar 2024 07:21:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FB43134D1; Mon, 4 Mar 2024 07:20:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PkDCOzX8" Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA21C12B6F for ; Mon, 4 Mar 2024 07:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709536857; cv=none; b=ehXlgWN8U/u6GgKgVLQSuV+QDKz2CakJJoKIzoE64yODkSZ5UmSu8I8m+X30mFd3+OFnLeocspRTzy07vHnzZ9KBijvo7WA2QS9EwbrKp09K2SitGWMMRp5M1FIHwC0Thl5aITRtyAkpq8xPfWQ9KVfjQsHohqPnjyzJalNGs6M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709536857; c=relaxed/simple; bh=5hqiPwoVJKj8ISdmfSbD73jyVkhgdqtuBQYeN7WhxaU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kJAKxDtrVg8k2/vm78tQirVjHLUwKvAxUP1ZJpwe6+D0T5sp7erobNAoyWt7yAeyR9SlYrPucjVX1Gc7SOypYu4hhe/Z6bZylCibtzj+uPFuII3wdkKksrute4jTXw1jL1NjwWWqM5+bA4K3szzvXCCgK3sXmiLaE9D7LBnxZKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PkDCOzX8; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6e55731af5cso3083241b3a.0 for ; Sun, 03 Mar 2024 23:20:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709536855; x=1710141655; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ut2KpnnZ5CESsPKC15Vq3psWgxNiIKdUmLqL7tGXlBk=; b=PkDCOzX8L5ZFn9XTHFCJHpVxRMhoHCRil0zbqxzOhEaqgimYoywNQmKp5/OgVxr53B PrUGlNZfwu4AvbdjGP24kX7nFRESn2GCBYMuRTLtu+uEaTC5i8M2xAf7+KMT8VbMmHUD 0ngQYCxgFqnAvryiNvidM3An5PvqdPnhq2UUVogJLLeh744uUO11oStNpogXay/kYCYn RhiERuyr++N+32pNH6Qy+Qe5T+K1IcxhZdu5wIxXXEyajpGLBpNcwevjMDkIkDWiWY+z mZfsN0T5Wt+hwJqeDbBCmsJaKGzhwayNYnxSwElo5+mvh7CBHJzSKM5QYWEARqj/2QGP sFxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709536855; x=1710141655; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ut2KpnnZ5CESsPKC15Vq3psWgxNiIKdUmLqL7tGXlBk=; b=j69NxW2uJ508gfP07zpLG3yPKs4qN990O9FSzjrg+8DPYhodQuaFCobrrShiMB64ZM QYexsZkgQaKfmJoHtrYdEm5cmKv9IZnWDdcGFEO4XuV6PyBfP5xyZFmPgse0dljHSLSx wAF4k0azTYKeO6hlRY0PUhvpvBId/GO6J3MqSuKtMoJhO+0fuX9iPqVn9gDqlkeMQc0V AuBsNG24w5sMrcx68t5tgcJ21W2zebIRpN5DvALwc1sKLuW/Q869Qjc/udXgzsKkOpPr GFDeDfu6St+0YjQzgcWCinPHxGIiiTb3b/YSvKn/Wg1LswuXC/g0PHOuxZdwlZcf5Bsv bkeg== X-Forwarded-Encrypted: i=1; AJvYcCXbqI7/VDHhNJEiLeXFMrD1ACBgRENDqkFini2/akle6BmPFIESUB5mWUPAtWQzi98g+GNgEPUuo77SUHjQSDdiZ1VimXdxX6nTezoh X-Gm-Message-State: AOJu0Yyk5Aqld84ROiF1wahR2S0A0ZspyP4ADTdhRadYtr+jbjq9npRO EBfpSy/S5ZeYZZMIDwuOoY7G9JrpRjJc3KFRl+3cbKaSOEdMTkKX5revkNcxBmI= X-Received: by 2002:a05:6a20:144b:b0:1a1:476b:818e with SMTP id a11-20020a056a20144b00b001a1476b818emr3125377pzi.25.1709536855331; Sun, 03 Mar 2024 23:20:55 -0800 (PST) Received: from localhost ([122.172.85.206]) by smtp.gmail.com with ESMTPSA id l3-20020a170902e2c300b001db82fdc89asm7798615plc.305.2024.03.03.23.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 23:20:54 -0800 (PST) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , kernel test robot , linux-kernel@vger.kernel.org Subject: [PATCH] OPP: debugfs: Fix warning with W=1 builds Date: Mon, 4 Mar 2024 12:50:50 +0530 Message-Id: <50a1a0f23efdc261844a306f5e611051843b4e52.1709536847.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit We currently get the following warning: debugfs.c:105:54: error: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] snprintf(name, sizeof(name), "supply-%d", i); ^~ debugfs.c:105:46: note: directive argument in the range [-2147483644, 2147483646] snprintf(name, sizeof(name), "supply-%d", i); ^~~~~~~~~~~ debugfs.c:105:17: note: 'snprintf' output between 9 and 19 bytes into a destination of size 15 snprintf(name, sizeof(name), "supply-%d", i); Fix this and another potential issue it by increasing size of the arrays. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402141313.81ltVF5g-lkp@intel.com/ Signed-off-by: Viresh Kumar --- drivers/opp/debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/opp/debugfs.c b/drivers/opp/debugfs.c index ec030b19164a..96313aa55db6 100644 --- a/drivers/opp/debugfs.c +++ b/drivers/opp/debugfs.c @@ -78,7 +78,7 @@ static void opp_debug_create_clks(struct dev_pm_opp *opp, struct opp_table *opp_table, struct dentry *pdentry) { - char name[12]; + char name[19]; int i; if (opp_table->clk_count == 1) { @@ -100,7 +100,7 @@ static void opp_debug_create_supplies(struct dev_pm_opp *opp, int i; for (i = 0; i < opp_table->regulator_count; i++) { - char name[15]; + char name[19]; snprintf(name, sizeof(name), "supply-%d", i); -- 2.31.1.272.g89b43f80a514