Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp163612lqd; Tue, 23 Apr 2024 19:58:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOgT/6UaK+ETSXj4h5+6H5G8+h7X4y0KACE6NeXwB8C6mzhbCNcZBbDkyFsI6OyGLIz1nkdkjcPbiH3an5seak9Iuew7TmB9UQO6EXOw== X-Google-Smtp-Source: AGHT+IHJA5L+8ewkAcvs9u1idLlveVoUFLGnsoh351aWs6MPytscgUDrDiJa2J7Otdb7yu/gHdJN X-Received: by 2002:a05:620a:170b:b0:790:8106:e8ad with SMTP id az11-20020a05620a170b00b007908106e8admr2523293qkb.5.1713927503233; Tue, 23 Apr 2024 19:58:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713927503; cv=pass; d=google.com; s=arc-20160816; b=d6Q10bbzoZ9aaiKwOcNJFEzVBGwYjMw27u1U59OUajLV0fVNVnlWYrPA/EWLWwsm2j NL7wUiLSRMiMdR8/Ldf19O3XlnGeaRigOB0MDIbwRAY7dOrPMB6cVqDAND3U90XUAMst rQu9mQUhhk5bNqMv3K1W8rkcsYxXNqCvY4efxWCmPPEjvmUsR6OcHdEA0fPP5S7fBkFl gcwvDkJlQZBRwRamwqTGlFQ2qsYbHSWK9Ri4+8nUuKDX5/Gi5DSi6azjIi7h/f+WI3UA L6HqYBBHLoxVRKuDmnMoeFilRWCLDYGFhU4Xi+YGj5K447QBthMpN7JOqfMoefha3WTT 0sXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=0Fi54lpImPTQe4ECEutFcr7ppv6L5vMZ7QfGZ/iYOus=; fh=G+96+g6i3+MsNX6tI5HdBwIuZ4Gw9WUIhLzaUYuKmBE=; b=SsKlHCFEbKhskv1duZvkTtxdjuEdGCgx45K3UgnpKb3wRhfJAF/NfDE0FWIuJmp/BW KxhaScSHOPLT6lAB6YgYotzmahURCnc1AyBsti8oR1PMCpJ8D9acwhQCAXhdQqHS0nCB /IhjdSkV9jZYe5oUTvjG3G2va2u2tthIV2JSoO4jE3a8jgkPCbo2h/jioIKHO2vQZRoV ksKe77co6gD+WBUdZhbMrIOBr6V7XscKZXeluUrq1gJkRYLCbjjJOe9BheTSnsFY0WvI 89jEqH0uorA7MEX24QH32s0GlLDErNlC6eckIYLUFKpulk17HARLIZQLHriqAgD8Af4d p/1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-156184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u12-20020a05620a022c00b0078d66dda599si13490156qkm.532.2024.04.23.19.58.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 19:58:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156184-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; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-156184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn 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 F04D31C2236E for ; Wed, 24 Apr 2024 02:58:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66B38144307; Wed, 24 Apr 2024 02:56:59 +0000 (UTC) Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) (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 857F285274; Wed, 24 Apr 2024 02:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.204.34.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713927418; cv=none; b=RxZqT6wmoVLavsPSXUVlltUeDQlN8ePkLzhbTYN7C1FrdLO4tW+c8hCVQf70S4EhJMUkHbDw6U73RhWi4UpicFVc3PL/qhlQS1R7wtTMKkUp/waWTYRpqPK/Sk8kzhWnIWk3dYplyWBb77ofhbPlkOd3pT5CGNbldwwEnITRQFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713927418; c=relaxed/simple; bh=3q4wkwdzr6bsl7CdF20gWvsb13iPgTuP0auF/wmr1+U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BZPZfaRLxKfE/2cKRQKJe7FbARgOKNNaDMNpgbE2YA4vZyEvrQQH7Kh1tlrxhByLqPfgc3HJT+iQlx6IxrKBYwO0cnXZ/TUSDyJPrCPXBtSNeKPGxIGOYVv+GP1GgxI4+IfTd4U+8MDz3Cu5qY1bChN+klToeFwP+Cyot2NcKM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=54.204.34.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp84t1713927373txeesovm X-QQ-Originating-IP: RafR794jN92WUzpCABktLdB8zk7MggSEa+h1HLA4pRk= Received: from localhost ( [112.0.147.129]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 24 Apr 2024 10:56:12 +0800 (CST) X-QQ-SSF: 01400000000000903000000A0000000 X-QQ-FEAT: 6MxOmYknsnlk+EvuqNPJydCUebOjjfGQngzxgv3iiMZC/5aK751EwP9r+F8i+ bH9DoKtFsUp/87eM/1WVZzyRE2NN4/1YfQsuiOJUXMdwDslas0+TN0BjT+VlUpBiIqTGE6m /dq6tlAV8/cwazZ7Arvv2NsDoxeFDiADlngWQdLr5U5RgI/MpVehjBcakGq0sviZke76/uQ VhpWfut99UyslE/Kp2uvK0JNZhC8VPtHnUYrmB4nQ0k0vDQjCF50z0BRII1fyp0zQVNTurk PumEGM4FTgnOicwjqBqWFntmiZUVPAf5U7kq51MvgBwz91jX/Ge/3Pr27yOSbRlmLZQAvmO XOnBPEhDEKWngvq+vVGMamH1OOO3sbUsz1W5/FCt0VccXivhBgtSDKNnjHSXv8vHTG+/pMU xXYaKM56jpkqMm/eMwrf+iZeSOUCT06u X-QQ-GoodBg: 2 X-BIZMAIL-ID: 8021827342633474305 From: Dawei Li To: davem@davemloft.net, andreas@gaisler.com Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, sam@ravnborg.org, Dawei Li Subject: [PATCH v4 3/5] sparc/of: Remove on-stack cpumask var Date: Wed, 24 Apr 2024 10:55:46 +0800 Message-Id: <20240424025548.3765250-4-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240424025548.3765250-1-dawei.li@shingroup.cn> References: <20240424025548.3765250-1-dawei.li@shingroup.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 In general it's preferable to avoid placing cpumasks on the stack, as for large values of NR_CPUS these can consume significant amounts of stack space and make stack overflows more likely. @cpumask of irq_set_affinity() is read-only and free of change, drop unneeded cpumask var. Reviewed-by: Sam Ravnborg Signed-off-by: Dawei Li --- arch/sparc/kernel/of_device_64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index c350c58c7f69..f98c2901f335 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c @@ -624,10 +624,7 @@ static unsigned int __init build_one_device_irq(struct platform_device *op, out: nid = of_node_to_nid(dp); if (nid != -1) { - cpumask_t numa_mask; - - cpumask_copy(&numa_mask, cpumask_of_node(nid)); - irq_set_affinity(irq, &numa_mask); + irq_set_affinity(irq, cpumask_of_node(nid)); } return irq; -- 2.27.0