Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1434384lql; Tue, 12 Mar 2024 18:26:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX31mvr1JQUg7uxzgCNB3SXye3OdQUcGzMUvLaL/iNmgvjQ9YNAgVCHh+RHrrh+zTQldXRyj69R9jdkqYASJ78oqKFLNeyAojz2MIuhzQ== X-Google-Smtp-Source: AGHT+IGbQJy22/eJ63kmPKSJXD1Dej6uO1pANtrORmzhSlZwpVF6S6wu5wB9GNgBCXbLkOiN0NeO X-Received: by 2002:a17:906:bf44:b0:a46:4799:8f44 with SMTP id ps4-20020a170906bf4400b00a4647998f44mr2560465ejb.54.1710293174863; Tue, 12 Mar 2024 18:26:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710293174; cv=pass; d=google.com; s=arc-20160816; b=FDQRVTspw5VbT/ZUWxFc2gFh3JHswOOePJp0Gn9pZEy5g/qCyzi/93DHsunnDLKSB6 6JRfbL0ycnIYRyPKP1yn/MuBn+K26obNoQQIkTNZl/WuiE0Ed1Sf5ia0DTtYXSl3e5RA di9Uiq3WxRC1qcS7N5OfI/+lpNIIFWGDuug5fQfFM3tdbYQJQ8YlehALLCeiRwpjQCeX WIVQyjR9/Ds0X6rvD3Uu0/jLP01ZZvSCTEq9iPeE/5LakeObCCMUI66+Z23HHOYXxi6N HyfbMcY/O5K+pOUOfxb4fSA1qXHTgrH3CQGLlbjQF7nAezQ9vWlowG6P0nt9ppgWwd/+ ROFw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zgoJ2Cj2+UUPtAnwZcQw+JcHc1DVxxL4Tm75yla0jg4=; fh=S0c2unB+tmmMkxMgPdLrAVyhLzeGsdpbGVECXBycnRw=; b=JcXdCQPUUM9c536um2CxvtNOhKlxNCONIjUit6f8+s2JoJbx2GaeYb0OtnXf+Dbjob sC8RErlPAA7mh/p6SWegS4NLLVdIM2vCvTzzbS6eO0rcBP/X4Rvq46ZuCbFR2k4svBYi S7LrIDfRFQEUUlPPG0C3FonH0B/HKgytew4UwONIAQFZT3QDJjRLqeZcsN1/lcSnd2Hy YyJ6Osjv5ZYkNbtefVaEKWP53m64p77dj8c1PX9Gryk7Z4Teo/XRNLvhkzQ1oG9MmVxA 3dsfZttqYhBFfGRopsxWk1+Qom5doAHg22f8VYgNtjBmCnHCdvSrRdvx5dakbzSd5/Jf jkGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=fvt2DG9i; arc=pass (i=1 spf=pass spfdomain=joelfernandes.org dkim=pass dkdomain=joelfernandes.org); spf=pass (google.com: domain of linux-kernel+bounces-101005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101005-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x12-20020a170906298c00b00a4495c514f0si3970447eje.111.2024.03.12.18.26.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 18:26:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=fvt2DG9i; arc=pass (i=1 spf=pass spfdomain=joelfernandes.org dkim=pass dkdomain=joelfernandes.org); spf=pass (google.com: domain of linux-kernel+bounces-101005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101005-linux.lists.archive=gmail.com@vger.kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7119F1F23B49 for ; Wed, 13 Mar 2024 01:26:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED0E514A93; Wed, 13 Mar 2024 01:25:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="fvt2DG9i" Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 9E56B12E4E for ; Wed, 13 Mar 2024 01:25:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710293117; cv=none; b=l7ULVDAnFuGoMhUMnaV7obUI6D/YMWCMsS68WL+CSMzSVzVAbhWa16+tpb8M3wh6Pv6qkFoxL1Klqsco7lNn39qmIAR4jCfHJn6OEdC/90mfK3X7DLcYyoDu8QNc9bgQzeNiEHth8xrcYDCd9z13ZTF2MRYNAOjiEwuGjhddMKg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710293117; c=relaxed/simple; bh=BdbG0yYlQpcAJTV+cb1BRObS/3sDHMAKLat6xu5MQUI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ky3kREDB4lF+G7cFB3Do90NnlweABiNxcowm8dB6QK7NMbH0Fus6q8ZBQlXJDQ1ggu4xbaKUU8d8OfqIiXRRuL2wW2+hi79RTTRsqeuSAx/3G0nXmGlr80mLJ2XeCGLyojqWXTtdvbK5aw53RVaX8gsS01GXoaIRc84CdkktxAo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org; spf=pass smtp.mailfrom=joelfernandes.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b=fvt2DG9i; arc=none smtp.client-ip=209.85.219.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=joelfernandes.org Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-68f41af71ebso4404396d6.1 for ; Tue, 12 Mar 2024 18:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1710293114; x=1710897914; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zgoJ2Cj2+UUPtAnwZcQw+JcHc1DVxxL4Tm75yla0jg4=; b=fvt2DG9i08ArM6uUdv35//9sTm3nLCxklABUyuAKmRC6TVmgFS9Qono92GNuB4fNmL 6Rp32oN7Hl1NJyDrmtq+Xj9dNNa0rJJV4hHgIfBIqYabgCIHOpa30hxr2rR2tv05VF4T SHPWdf7Zliz3KPDjRpfEUeW6oVV0aS79PxQZU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710293114; x=1710897914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zgoJ2Cj2+UUPtAnwZcQw+JcHc1DVxxL4Tm75yla0jg4=; b=g26RCNzYtSA6BKz97AQ5JMm4Mda4psmeLm6g6n3OUkd46IcTNDwZIOjXlvITzE7nap wSiHUBS9NuanVq1Q+BlrO1uzvME1ipwk+Z8KBs6mkve/8YThJ7nfWZISTQTuZnQubDV2 wWMsrxg+5mf1pgzWdfdnDwwgN15JrvVLgy4lTtlQ39eoIutQI9C+NItewqEVdb6aznzn RLk+m05VhCtkT06E0lbLxCkf37B0RoB+M2vbqBh5hwYp1mn8o3x0ShJjJklZlsXcEFUx 4PvOAZiU03F3A7r2wnHgqO4H0XsJRQTO4iMJNqtNaXrm/h7/qRLcvn5GvBm5gqxqBw4j Jp8Q== X-Gm-Message-State: AOJu0YziTh/G0sVHb18ylnjcbs8QKJK005Wz5Vvgp00ESSJOGoiJv/E9 2YMR8e+UbYhhW7gVH79FjDsSjwRg6g+nTqeygDaz+mIHr8jJQ6roG4AbLcuL7ctg8vbw78hYuCy h X-Received: by 2002:a0c:ecca:0:b0:690:9a95:d8f9 with SMTP id o10-20020a0cecca000000b006909a95d8f9mr1796667qvq.2.1710293113824; Tue, 12 Mar 2024 18:25:13 -0700 (PDT) Received: from joelbox2.. (c-98-249-43-138.hsd1.va.comcast.net. [98.249.43.138]) by smtp.gmail.com with ESMTPSA id u9-20020a05621411a900b00690314356a4sm4162132qvv.80.2024.03.12.18.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 18:25:12 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: Suleiman Souhlal , Youssef Esmat , David Vernet , Thomas Gleixner , "Paul E . McKenney" , joseph.salisbury@canonical.com, Luca Abeni , Tommaso Cucinotta , Vineeth Pillai , Shuah Khan , Phil Auld , "Joel Fernandes (Google)" , llvm@lists.linux.dev Subject: [PATCH v2 05/15] sched/debug: Use unsigned long for cpu variable to prevent cast errors Date: Tue, 12 Mar 2024 21:24:41 -0400 Message-Id: <20240313012451.1693807-6-joel@joelfernandes.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240313012451.1693807-1-joel@joelfernandes.org> References: <20240313012451.1693807-1-joel@joelfernandes.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This avoids compiler errors seen with clang: In file included from kernel/sched/build_utility.c:72: kernel/sched/debug.c:532:47: error: cast to 'void *' from smaller integer type 'unsigned int' [-Werror,-Wint-to-void-pointer-cast] debugfs_create_file("runtime", 0644, d_cpu, (void *) cpu, &fair_server_runtime_fops); Signed-off-by: Joel Fernandes (Google) --- kernel/sched/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index c6c0120ff105..2590041696bc 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -516,7 +516,7 @@ static struct dentry *debugfs_sched; static void debugfs_fair_server_init(void) { struct dentry *d_fair; - unsigned int cpu; + unsigned long cpu; d_fair = debugfs_create_dir("fair_server", debugfs_sched); if (!d_fair) @@ -526,7 +526,7 @@ static void debugfs_fair_server_init(void) struct dentry *d_cpu; char buf[32]; - snprintf(buf, sizeof(buf), "cpu%d", cpu); + snprintf(buf, sizeof(buf), "cpu%lu", cpu); d_cpu = debugfs_create_dir(buf, d_fair); debugfs_create_file("runtime", 0644, d_cpu, (void *) cpu, &fair_server_runtime_fops); -- 2.34.1