Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1218303lqb; Thu, 18 Apr 2024 03:52:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqoFXKiZSAou9ulSkq1ovk9l5s51UnJdP7ie0oKv21acorMsev7Uq9JpZSCPeB08SS9w7cw0H9kYxaFdu/+6+WfRBzm/Bhfo88txI5bg== X-Google-Smtp-Source: AGHT+IG431aV/x3T/Xbo9avoad4G3wS8IHTx3wUSALTroa+ne+K0XdDlh34qx347wsSYunB+QdrJ X-Received: by 2002:a17:906:3e49:b0:a52:11c8:764e with SMTP id t9-20020a1709063e4900b00a5211c8764emr1371289eji.25.1713437534767; Thu, 18 Apr 2024 03:52:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713437534; cv=pass; d=google.com; s=arc-20160816; b=iI1iTj5/t5dVRPKf7q/trYw6kd2tiyfllrmyUNL4JjgfWtjSgbrLPxeScZbyuy0wi7 kr+CeaWtqMDGVPXlZe4RgYFKLGdEUG9WJFNcW4REUL69m2UNRisJY6IwSonGTExkzlMr pGuQYKEunF+Nqq4uLaTsSKP7Cgy/fi2ttitdBUYmSXcAs8M+qWKR04oaoQyu36SAqlaj R4kuKy1nVMnM4AiGhvgOmL4qyJWhIROO3SHUnTgYAigg3u4jXIs0mLw0Oe7XdJ1cp3Mx V5v/vOoXPCQleK2fbz4vNPLi4G5scNI21YL96cI7wcxrW32QGloKTgppOcA7gvu9qYiq uHBw== 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=xmRiQiI54Gn9eg4G8+DvrQ+o7A3b81HQlZF/ftjnW9o=; fh=wqGtaQRaft9D0zUHMyMQXhnocNBrwjPdMyctoUHVbL0=; b=hTIDyhi4PzuhG4g1jfVZiXNcw7HCTdaOga8kPSg0jBPn64EUROf8WcSB+aSm8rY4ca BVBB0J1/FzzKQURe+D5X7JHoyG8ZHOx3CZXSl5u8xC2KqwexkJ+98qVsMbxt9TWPmkH9 fjts6Q3qDVj4zSA9+GJpMBzATyG9hbIKwjEK7hGfK5blsnpWqsfnsmD43XhH0fcgZyFB whdAxItKgwMUBJf6nF9AG2nS3q7aePcLyJedhDGjz06vdsm4caq15CPzQRDENdeTtuwI KlZWLgGVkEWvxby5Eqal4hUkoJ6cFgxjXzlgJck58rnSIurUTfRNNM9I9DgsNLvTSVxh oJCg==; 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-149915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149915-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gy26-20020a170906f25a00b00a55664bf5c0si703433ejb.405.2024.04.18.03.52.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 03:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-149915-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149915-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 am.mirrors.kernel.org (Postfix) with ESMTPS id AB10F1F22BB1 for ; Thu, 18 Apr 2024 10:51:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2D5515F316; Thu, 18 Apr 2024 10:50:53 +0000 (UTC) Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) (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 8908315D5D6; Thu, 18 Apr 2024 10:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.169.211.239 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713437453; cv=none; b=QGyxnTToKFR2eeolnE3K32DU9EgL2RwiFyY9B70AcOgZDO8eEzFngFgcpw+bwpvjlh03sgpABVcm1OXH4uhcpYvpOmgUgik/S35zSa4N9WxvWcm20kEw2E4S6e+hLBlIB242gR9AIgULZMd1O6ABV14moqdUOoO3L+eZ7Z7MVi0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713437453; c=relaxed/simple; bh=sFnCyAezPJqAAlu3qDvF7erthkLHTCeXNJjaVGL6Y6w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=P4KUe+jB7e1iYMhVE6r15LHVDEO38jOujcmbhfaCegVQnZpkyMll3/E0t1l01MQCs8/6LGPL42d7XoqRbjsQFadTr+X0/9B6j5VuEE87unYhMHfrqMP3XnZjLDQ4PoF3CsUW4d2Yhhy1OMBnaxSgYEMXP9hRsbHvDmPL1NmDbG8= 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=18.169.211.239 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: bizesmtpsz7t1713437422tf4erle X-QQ-Originating-IP: 8Uo1IzsnJjkMtFnQKv4tK4eu5qWHRps1RVeUcu6KYfo= Received: from localhost ( [112.0.147.129]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 18 Apr 2024 18:50:21 +0800 (CST) X-QQ-SSF: 01400000000000903000000A0000000 X-QQ-FEAT: 0tC8hUyuo8W3jtPfm2nDYNIoEZJeXZ+DSrT8f8H7Vtwa2JQHxfseOnUkiCuXP 3OWD6gSevSTDh+hTCHBCyO8/fGBcn8DXpsfqUaMxriCcYQ7TvbDFyvKH3HhgT3ybmWXFoIa kj2Vx2tqN+yChMwPQve2Ytm9q+cXzdLNGsv1B5KqgGy/yyQIGmgw+2zp0/3BtiFeaYNb2BL H+pYf5yVkbOn2T8q35rh7ME+E1gLHAh8eWCfHGPAfq/HV5dgqPbFaWYnm9RASFQ4Q2u96mM X5m2x6+FdDeJ8er45CNf2Tmz5xyEc7is8SOH2SCGhZak662gtJrnN8Ocu5ieZfhWacrdMRG DWImbQTFgngA48Eiy5J7bda9KhFxDsLJrJBccV+0wt4MVvQGp2I6XhMT6fmAdehtUA46m+X ST/dzd5YvJ4= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 14906161043048154958 From: Dawei Li To: davem@davemloft.net, andreas@gaisler.com Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 4/5] sparc/pci_msi: Remove on-stack cpumask var Date: Thu, 18 Apr 2024 18:49:48 +0800 Message-Id: <20240418104949.3606645-5-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: bizesmtpsz: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/pci_msi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index fc7402948b7b..acb2f83a1d5c 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c @@ -287,10 +287,7 @@ static int bringup_one_msi_queue(struct pci_pbm_info *pbm, nid = pbm->numa_node; 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)); } err = request_irq(irq, sparc64_msiq_interrupt, 0, "MSIQ", -- 2.27.0