Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1288694rdb; Fri, 16 Feb 2024 10:43:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW4RsZriibb4hGOFzZ8VZgUf8A905T3VcSHTOuv9CrUmGkeW45rmdBRd8dgSG63tfPh3chuThyihv+NLZZMWLf0SSTyCN5sQPTSJrSmFw== X-Google-Smtp-Source: AGHT+IFr1n51+Khj0Y9aylugon2CeEMKottIww6pHTsoDnbVJ8nGFQ+YNCyBILFTg8vWZUvu9DD4 X-Received: by 2002:a17:902:ef43:b0:1db:92e1:2e4e with SMTP id e3-20020a170902ef4300b001db92e12e4emr6033107plx.30.1708109003643; Fri, 16 Feb 2024 10:43:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708109003; cv=pass; d=google.com; s=arc-20160816; b=0WZ/LBHTnxHV7gvOM6OOmnZyBa3qhXZT5lWjz6GHVzxZotUdtTBE6gyyNd/x0XTI8R vnox7J8KOQx5mUqIvCtli67+sZnKgGEe80IOnZvqgdK1Pxi5JFL9wNi55c7VY124hYov m9PszZ9BiOLz1orORzd/FUs46GnjlDEmMySzPxzffUYcbbvJChmCupI6M7DQGX7mzdd8 vQyDh4Xuc+RcJ75W2ZoAUw4O2MPeZ/2YIYn8dK39lW0a83XO/tweU0zA8uw1v4uDbOjb btrybhTf9/8Jq6zI0SeN005Ec5hWxA1QaNwgnrBj4zL3SwqTd9+zqjgJmJoEJpBBcsgI KF9w== 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=MwlvHQ5C/YrchyIDa+W4Bxrqqwbziaap8FU304aBL+89IzBHqTnAhfrgYyKGadG8G/ 8LOl6QjCF+6VgcwfkVxiZiPpZzSDza3Znwdw9lb66/kY2v1w2XKx5gp44RFv8VnNsZun Q+4MJMxjK8mSZnNRRVcUqrsdxK1k9rRqejiKooHs00DctEmuaLsI/n5yIjmlYDJq3KhA TkrHM87EmN8u0jeUOWbhSkakqyc/piBZlo/woCLd3KQGqw6+O7FTjo/AM9vbLQJmK394 G0xNxEuzIHjiEhsRqZaP+vpfxwYLv1YJ+vyiVPZE/F8G0LEz7oOy+l8cA6WB9Ef158pa IlYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=bCBBuWpQ; arc=pass (i=1 spf=pass spfdomain=joelfernandes.org dkim=pass dkdomain=joelfernandes.org); spf=pass (google.com: domain of linux-kernel+bounces-69164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69164-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id iz20-20020a170902ef9400b001db78534cd4si236675plb.256.2024.02.16.10.43.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:43:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69164-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=@joelfernandes.org header.s=google header.b=bCBBuWpQ; arc=pass (i=1 spf=pass spfdomain=joelfernandes.org dkim=pass dkdomain=joelfernandes.org); spf=pass (google.com: domain of linux-kernel+bounces-69164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69164-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B5559B20E39 for ; Fri, 16 Feb 2024 18:32:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DD6E136985; Fri, 16 Feb 2024 18:31:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="bCBBuWpQ" Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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 DC7B6135A7F for ; Fri, 16 Feb 2024 18:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708108310; cv=none; b=At77EbsyA+4PQQ1JAaw5YZa6hfPQvNTphInLJfu3Il+v8G88A7Um4qV2/vQf6KGxUGmYLJUGBg0Ijfbur00mYSzXZjtYBfUekMeIZoqvlcSmhHdWhDj4c9Hs+SWLal+N995qjucWLYU+b8BRjSw77n1Z+uwo2OahxT91+KwNTOg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708108310; c=relaxed/simple; bh=BdbG0yYlQpcAJTV+cb1BRObS/3sDHMAKLat6xu5MQUI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ka16JsMSJnsUFTpR33OIX1S3Yss8+la4r1xVm3GpkaDezPn2WY71I9nR78GSQOPrEQ58etLWvW2KemEHE3Jeg/HxPb7ozXOv90JqJ7MgRDoLQFv1iitnjYCSSjCD/Aq74jhiN7xzAdbHXULMz/fa/JGrAC+0GErYixXnaYGOAvM= 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=bCBBuWpQ; arc=none smtp.client-ip=209.85.219.41 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-f41.google.com with SMTP id 6a1803df08f44-68f429f55b7so559466d6.1 for ; Fri, 16 Feb 2024 10:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1708108307; x=1708713107; 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=bCBBuWpQNaNjqeDmb9JQNQd6M4Tf5qyq3qj4KuPzKpG6UNtipEGWIVqM0AWhnRJoJP j/mCSmz0i2+Av6GXBWugAl5tLOrNHQzc3QzFLw0UyoPGwZ+FVj+0y427MX1eQ+O/O+o9 5JXEjxER3QIn4nmdrGrrkTUqcYjZO+eC1y6zs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708108307; x=1708713107; 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=vbCEcHvy5ga77oqRDNo6tT5LOjo7YIB7h8UEwt3nRIqE47F8zfwZY8vEGLSR78HLgb qJpZDX6mWGc/zuBNOy8ouPzPDECN7wL6Zg9h2sSeMa9DqoxqzjidRl3igI0KA2+3xgwh HMTbBpQiy7FspANSxGI6v8OsHuipzKzm2wH+jAmjxb+pwS6pQcVOJ6ztsq3E5aQW98mh IhryW3lFbZ+HbFyQ5h1BjSe9WC9pkztwVUpGQwoVx0xI0k+lXGJpBu0niXgykLJUGZkV zYntrQYZt+Z8/wp54jtCHd4ghiR5TCJa3T/kHSmMS7ARjCnUsJ6I3Trl0fPuuwdlCPpR TU4g== X-Gm-Message-State: AOJu0YxMIMgWlML+juUMIKHxBEamQ3tyS/fXdm5NItiC+kO8di/VoTQ2 Py7HqYVpvc3Zm1SCTqyiXdqwI3800+ayn5X4xWXgHnpHFlcR7HOu4xDSZu89B9cJEfNvFlbrRWa 6 X-Received: by 2002:a0c:f0ce:0:b0:68e:f036:f5dc with SMTP id d14-20020a0cf0ce000000b0068ef036f5dcmr5456748qvl.15.1708108307279; Fri, 16 Feb 2024 10:31:47 -0800 (PST) Received: from joelbox2.. (c-98-249-43-138.hsd1.va.comcast.net. [98.249.43.138]) by smtp.gmail.com with ESMTPSA id nd13-20020a056214420d00b0068cdadb5e7esm159722qvb.31.2024.02.16.10.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:31:46 -0800 (PST) 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 05/10] sched/debug: Use unsigned long for cpu variable to prevent cast errors Date: Fri, 16 Feb 2024 13:31:03 -0500 Message-Id: <20240216183108.1564958-6-joel@joelfernandes.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216183108.1564958-1-joel@joelfernandes.org> References: <20240216183108.1564958-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