Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1218125lqb; Thu, 18 Apr 2024 03:51:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXreUWT8o9q7q6eVHHGNNv9IPHJ2SkO9BR2rV54WlnjxaV7FjTShYA69snwKZ3Cs0DpriNQHvXj/10ps0Ani378KUzsNe9hR2ZuB1LZKQ== X-Google-Smtp-Source: AGHT+IFG/BwFknb8/XRRTD1TSNmEXXAa/NSmf6i0Crb7h03/0muIwbA0/NDZYu6TB0K7SbDE3whF X-Received: by 2002:a05:6830:650c:b0:6ea:1a74:aa2f with SMTP id cm12-20020a056830650c00b006ea1a74aa2fmr2907364otb.3.1713437507269; Thu, 18 Apr 2024 03:51:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713437507; cv=pass; d=google.com; s=arc-20160816; b=opHWCo2CwJ4B2gftVJaJSvwe2tyl189Q5BesGuuXsuwAugbXYoobRRFjRrGc/UFOe4 IP/uhg5S9vCUML6rYxBAomRDBk+w1SLWdHZb0n3Hd1/boT77i8d+mulA8FT+jZkcQMPC vOOn+hah/zva6JwIyJGsVAN+DrdSI3SdJDVpFQpWYdhLbRtDEIIiQC6EVk93ua8mPOp6 jIdC8GaeKSfvHBg3wLbz5ih+pOxAzslgpi+Hrhr7Bz/YZmMtznladOjE6TCBFah9c1U3 AArdW8xXCukISevVvykyzoMFpv51z4lam9rzRiD2TZCqZEiMm9QWU2THG3CpRbdC0FVm VbEQ== 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=7zGpwazNEkbQLuQnGBb9YzQqz+IBqbe3991Oz+7nlFg=; fh=wqGtaQRaft9D0zUHMyMQXhnocNBrwjPdMyctoUHVbL0=; b=sCr/XLDuFQaURCnWupTmC6PH9z921mM2mwsGMbXBAH3/ZQmwWwsJZFWrPkzo3cLdxS ZCCKXxtYXgu1mt5FFDAmuAdBkR1jkuSChizQ8pNqiD6iiWwVozfkH3yLl9/JYM/ByQpV cp3up8KYo1GKpndHfP28jhxdcvgaDXbT6PQdmCGvFSwqMq7zz1Fr0lA6c+TubzmfvX/z Nj7VnUhF68sXHfL5DLkuKUkopB3aDYwcyyW2HlAHVMJPAVf304OYqGEeSKZoX/gf1zJt gECiapPL5wKvILQh+uji3hT1dR3cnYtCm3LRWWwMhxxcWArO0LplflO4S8t5iU5NOLgu wgQA==; 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-149914-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149914-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h7-20020a654807000000b005e2b1e8547csi1183508pgs.367.2024.04.18.03.51.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 03:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149914-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; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-149914-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149914-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DC0672819C9 for ; Thu, 18 Apr 2024 10:51:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F13415E5C7; Thu, 18 Apr 2024 10:50:53 +0000 (UTC) Received: from smtpbg153.qq.com (smtpbg153.qq.com [13.245.218.24]) (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 77F5015E5C2; Thu, 18 Apr 2024 10:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.245.218.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713437452; cv=none; b=iPNiuK8bnI+Db+QrePvZJa/ATiM+hcwKYeGbM7rB3lkQoN/AFlG7uFkN9eafJToojiLYe737CkVDJu7/mpCQkIm+oVq2qdxkTg+smY4F5HKlTfSmw6PoB9rcap43Up8ptHmT7dO7/3117tBQjqh03ovu/kuVEbGG7JdSlC8D1WI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713437452; c=relaxed/simple; bh=J3xx7uCwxqDnvOjB2f/TyE777o+chO9jhWnCFlaoiFk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ohVEQ6wscHn9LCTXkMruryKKIIlEybuJkC6xYlelgRKQHs7WOQbTZwc9cOpH6FL4++3RfKuQiOUD3iEcmwkLz/5yYUYWYrGoRtuLACJVAdGfJRE+shDsXMtrmRrkOhU3QLekQV1JW1ud3PLexEPEztbUHR5flob4qfYvwfo8k20= 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=13.245.218.24 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: bizesmtp84t1713437417t2k4rod7 X-QQ-Originating-IP: xKe3o2C9ma2R+1d5dsTNCS/zyXVEzyvuAGXlGycOrdo= Received: from localhost ( [112.0.147.129]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 18 Apr 2024 18:50:15 +0800 (CST) X-QQ-SSF: 01400000000000903000000A0000000 X-QQ-FEAT: su/QXNoXt7e/p5CGMAB7Jna4tdXuXnqktS4kyE2F+fHRJZoFhysXwhQXOmysx 2G5xGDRg+plZMZYup/7yt2X+c/jqRbyH6L0zo/X3ebLP/yFpANVoN53w87IXQbodjyQ5oa7 avhnND3huZSZk2cIIE6pqgkpKGHvrB0JQKZN0UK5TxP3KJQlkrdbbXRRdtPuD3STXjjo09o Y0dL284Ff7PMEzjmoQP3dhQT+1YznLv/NbkPxo/1xPvLHDGmHx7spdYLr49OJB8+Jv9tuy7 MrQFBe2F47XBRcdk7DtL0Sn0bRx4QQPcC+TTWEyizqsrD8DF+sjbTBn1Q0F/cpmZx62c9YM 0bXte7ShiU+h65aJr5SWpAoHwnQbDL89ERqA3Wfx7gV9rRm/upyNrQhA6S8uy5RI99jq8l+ WQnbUM/+8wvVcDvoLXL2pg== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 5834365455261671018 From: Dawei Li To: davem@davemloft.net, andreas@gaisler.com Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 3/5] sparc/of: Remove on-stack cpumask var Date: Thu, 18 Apr 2024 18:49:47 +0800 Message-Id: <20240418104949.3606645-4-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240418104949.3606645-1-dawei.li@shingroup.cn> References: <20240418104949.3606645-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. 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