From patchwork Tue Aug 15 14:51:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1821413 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=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nS1/AUa7; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RQDnX4Kfdz1yfS for ; Wed, 16 Aug 2023 00:54:40 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVvOh-00060H-Js; Tue, 15 Aug 2023 10:51:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVvOe-0005uL-4C for qemu-devel@nongnu.org; Tue, 15 Aug 2023 10:51:49 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVvOP-0006Hv-Ry for qemu-devel@nongnu.org; Tue, 15 Aug 2023 10:51:47 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-319779f0347so1746152f8f.1 for ; Tue, 15 Aug 2023 07:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692111092; x=1692715892; 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=ogCxZYZaoEvrj5iiH+2Bm7In/45Ks3iQ2LZbKz8QbrY=; b=nS1/AUa7SSvoR5HRTqpZklmBo9ckwFTBprwIE08Zq+51uaCfrjz9YFA6dZedBq8I0w yukVKe7HPbXGbYeQd8+2PidtHtqu7O2hzyx0EjB0ld9fn91MWfblvdPd1EPWTcEo6N9L YjfBnCxx2CeIrPkDY2V2g5BUHZ48FsWbOSlTlF7cQFOjjYZEJVtvXEKmBzYEq+NSP0su 7ncXOHB42IEwz4VfaoFnQFSVuufFvYbq43BLwB7Q+PcKlgjZLLrW5O4D9mf2f4SSGN4E 9EzVsRMt6HKLM8mVn9c2/WdVd4lBH0beVRF+HkDp7hy3CGv4sw1xci8bEyPNPcpX9QlP dfgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692111092; x=1692715892; 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=ogCxZYZaoEvrj5iiH+2Bm7In/45Ks3iQ2LZbKz8QbrY=; b=iBH5M1OiOWBSOJvxWAV2N3tXg+lt53Ly+mrRwLf5GmSJrh/HxwpTqnVQni4pGN0Vhw Js8UHIrwt3oJDEx4dRNy/7mvzCoPR250kz4oA5ANxVxbFraWjyGOTrORJozsvDqZSl6+ maMj5Wk1TeF01DEcsv/ROkxWaD5W00BaCSeyAv9pD5HLUrjqTOftATPxuxddDNmWDgKy RhiHdcNnq1WXro6pwpMn3rmvtOt0cI1mcOWIsmk4eYSqYC3h7eZOWebms+MQXWl3WwAh wWCQt+nsruBD6FI0+2eHbuRQsr1xgj2toBzPp6ogQfFEtZEv2qG7cHzvi3qNR/Ev/z4Z 9e+w== X-Gm-Message-State: AOJu0YxtpsSMBp1NK80/o2Ys/Ueq80Nmrckf3kMzDxo0RP+O9/PdH3kP hCc8Ft6nrPcwFFglDQ8PKCkUHA== X-Google-Smtp-Source: AGHT+IGRetNJZeDo34HAmroa89v0f5yP+46F9m1p6VhVuO7FvQx50pFsVSLzBI1RoBfNH9LH3NefUQ== X-Received: by 2002:adf:f80c:0:b0:319:8979:8fcc with SMTP id s12-20020adff80c000000b0031989798fccmr908216wrp.70.1692111091915; Tue, 15 Aug 2023 07:51:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f14-20020adffcce000000b00317a04131c5sm18148968wrs.57.2023.08.15.07.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 07:51:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ACABC1FFC2; Tue, 15 Aug 2023 15:51:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Wainer dos Santos Moschetta , Peter Maydell , Akihiko Odaki , Thomas Huth , David Hildenbrand , Yonggang Luo , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Daniel Henrique Barboza , David Gibson , Greg Kurz , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , qemu-s390x@nongnu.org, Ilya Leoshkevich , qemu-ppc@nongnu.org, =?utf-8?q?Philip?= =?utf-8?q?pe_Mathieu-Daud=C3=A9?= , Nicholas Piggin Subject: [PATCH 7/9] gdbstub: remove unused user_ctx field Date: Tue, 15 Aug 2023 15:51:24 +0100 Message-Id: <20230815145126.3444183-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230815145126.3444183-1-alex.bennee@linaro.org> References: <20230815145126.3444183-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This was always NULL so drop it. Signed-off-by: Alex Bennée Acked-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index e7d48fa0d4..8e9bc17e07 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -836,7 +836,7 @@ static inline int startswith(const char *string, const char *pattern) return !strncmp(string, pattern, strlen(pattern)); } -static int process_string_cmd(void *user_ctx, const char *data, +static int process_string_cmd(const char *data, const GdbCmdParseEntry *cmds, int num_cmds) { int i; @@ -863,7 +863,7 @@ static int process_string_cmd(void *user_ctx, const char *data, } gdbserver_state.allow_stop_reply = cmd->allow_stop_reply; - cmd->handler(params, user_ctx); + cmd->handler(params, NULL); return 0; } @@ -881,7 +881,7 @@ static void run_cmd_parser(const char *data, const GdbCmdParseEntry *cmd) /* In case there was an error during the command parsing we must * send a NULL packet to indicate the command is not supported */ - if (process_string_cmd(NULL, data, cmd, 1)) { + if (process_string_cmd(data, cmd, 1)) { gdb_put_packet(""); } } @@ -1394,7 +1394,7 @@ static void handle_v_commands(GArray *params, void *user_ctx) return; } - if (process_string_cmd(NULL, get_param(params, 0)->data, + if (process_string_cmd(get_param(params, 0)->data, gdb_v_commands_table, ARRAY_SIZE(gdb_v_commands_table))) { gdb_put_packet(""); @@ -1738,13 +1738,13 @@ static void handle_gen_query(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(NULL, get_param(params, 0)->data, + if (!process_string_cmd(get_param(params, 0)->data, gdb_gen_query_set_common_table, ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (process_string_cmd(NULL, get_param(params, 0)->data, + if (process_string_cmd(get_param(params, 0)->data, gdb_gen_query_table, ARRAY_SIZE(gdb_gen_query_table))) { gdb_put_packet(""); @@ -1757,13 +1757,13 @@ static void handle_gen_set(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(NULL, get_param(params, 0)->data, + if (!process_string_cmd(get_param(params, 0)->data, gdb_gen_query_set_common_table, ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (process_string_cmd(NULL, get_param(params, 0)->data, + if (process_string_cmd(get_param(params, 0)->data, gdb_gen_set_table, ARRAY_SIZE(gdb_gen_set_table))) { gdb_put_packet("");