From patchwork Wed Dec 4 11:21:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liujing X-Patchwork-Id: 2018202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=m3xx=s5=vger.kernel.org=sparclinux+bounces-2720-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Y3FV93V3Pz1yQZ for ; Wed, 4 Dec 2024 22:22:09 +1100 (AEDT) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4Y3FV54hMtz4xf7 for ; Wed, 4 Dec 2024 22:22:05 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4Y3FV54dmkz4xg8; Wed, 4 Dec 2024 22:22:05 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip="2604:1380:45d1:ec00::1" arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1733311325; cv=pass; b=ybgZaJ7In1/t5mePR9rMx6ae6XvRidq8lNhqaWHsv/MZ0EXv8uB8/z4imMb3pryyoYdILPhv4NCwlQ9cj1XDd2STaLruJT3N2lS0A2qoqYrnr9Cbgh3kfBUjX6TPhYHt9H0bw2+7j4Tw4Odw+14WDPmM1x/XAi98xjGMrrWb69OPUgHD53+P/m0FUccaeqoft446o2N5Z+YXTNc/9YZZHyA3jFnrGCgmo9GwGwHmbBkT1DL1095Nc2oWB/hiAfp/WjC+9uK0hN1yd4Jnk8tIrOxSJP6e/kQw+LMA0tRWKqhYdCbryDzZ7nANwIJo2MZw1xJ/veWwo+bz2PFD6VbZOw== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1733311325; c=relaxed/relaxed; bh=ihrjVh50lWzaJlv2x4arbMMb+u/iTHVBcMfP3OvuWwg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=k4jpQl9e34k+liCUn/2UZMe8mNFgRHaZq5KwUUlHjG+zM7CkjUNWvs5c40U9xsGd+1rcClhmHvFJZE1ZNnyZaY/tYL8Kh3HSVwUmT0OC84fCkrwynTdhvm8rxUZmv0jcWUhrcbJwYlIKrcge9uOefG5dpPkRBKQ/jH8X11NKeEcec5liw7ts2wRUjo8GkrWhuvCQv0Ny7cOvjrkM3xmwlwvUbxPXa/xy+I7GQtU2VLvB0YPGzk9tQf7W2I47oa7Z3f2hLe95qulIbUVwwpadSw84aFypQAfDXgas8j47N8ik6t2rcps0tvmLtFlp+VptyXJKys25c0gRHdxnS3lKxw== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com; spf=pass (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=sparclinux+bounces-2720-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=sparclinux+bounces-2720-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4Y3FV22zFFz4xf7 for ; Wed, 4 Dec 2024 22:22:02 +1100 (AEDT) Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 29759164742 for ; Wed, 4 Dec 2024 11:22:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77DF71AF0BE; Wed, 4 Dec 2024 11:22:01 +0000 (UTC) X-Original-To: sparclinux@vger.kernel.org Received: from cmccmta1.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6D1C19006B; Wed, 4 Dec 2024 11:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.22.67.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733311321; cv=none; b=bPigG1yJ2yCcJsF2KUaRRLH/nS1uwA7uhFi9YxtUI5gEC2ZDsGeOgUjIjY5dMVydgcwy16cQ8lA5A6TmZelI8+7PWS0LVJj0spiahTezv8WOudGMFowTh3H4BBNQqawEfiC/ZSq8yJEVkSVJyfGyK+JoW3LdKfQzh5pFSmYGJZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733311321; c=relaxed/simple; bh=AYbb+rF+ywLzQOVxrKLvkv9kw6zjIz8WUk0+2drTFno=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ESXqiZbjBKCTtXG+tWFiYeXemGJG5CjWf3r7t/WIu+A2oiRVBXYsa/wvXPAYu2F1U3DqQLFAqw2Q2FXVVMUJDZFT4u3QOBkDLeLXuAbUpLDTlXkEfVsRCR00xfzDPUUwwn93AfnDzwyUqAzf15By2ZE4k5D06mFevqmm+pYVico= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=none smtp.client-ip=111.22.67.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app02-12002 (RichMail) with SMTP id 2ee267503b4b52b-0354b; Wed, 04 Dec 2024 19:21:48 +0800 (CST) X-RM-TRANSID: 2ee267503b4b52b-0354b X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from 192.168.28.197 (unknown[10.55.1.72]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee367503b4a0f5-6a24b; Wed, 04 Dec 2024 19:21:48 +0800 (CST) X-RM-TRANSID: 2ee367503b4a0f5-6a24b From: liujing To: davem@davemloft.net, andreas@gaisler.com Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, liujing Subject: [PATCH] sparc: Move va_end() before exit Date: Wed, 4 Dec 2024 19:21:45 +0800 Message-Id: <20241204112145.6987-1-liujing@cmss.chinamobile.com> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-3.3 required=5.0 tests=ARC_SIGNED,ARC_VALID, DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on gandalf.ozlabs.org This patch makes a minor adjustment by moving the va_end call before exit. Since the exit() function terminates the program, any code after exit(1) is unreachable thus notexecuted. Placing va_end before exit ensures that the va_list is properly cleaned up. Signed-off-by: liujing diff --git a/arch/sparc/vdso/vdso2c.c b/arch/sparc/vdso/vdso2c.c index dc81240aab6f..372e3330850a 100644 --- a/arch/sparc/vdso/vdso2c.c +++ b/arch/sparc/vdso/vdso2c.c @@ -90,8 +90,8 @@ static void fail(const char *format, ...) vfprintf(stderr, format, ap); if (outfilename) unlink(outfilename); - exit(1); va_end(ap); + exit(1); } /*