From patchwork Wed Aug 30 14:54:04 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: 718585 Delivered-To: patch@linaro.org Received: by 2002:adf:d20a:0:b0:31d:da82:a3b4 with SMTP id j10csp585550wrh; Wed, 30 Aug 2023 07:55:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF29759gqSoDLlogeUln26cSssLqoeZZWsGHkPEof6MoTdbKq2r4Io2ORjVw6LMR12AJgUV X-Received: by 2002:a05:620a:2991:b0:76d:9dc0:bcaa with SMTP id r17-20020a05620a299100b0076d9dc0bcaamr2738813qkp.5.1693407348778; Wed, 30 Aug 2023 07:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693407348; cv=none; d=google.com; s=arc-20160816; b=iUsA5xVtOAyzASPyYZ6kqVuejmTcs2ni1zyzhjgDwNKsAHtQNxG3B6OIVUntRJ304B V9DQTjYP/EJfEWTC4PvJDAWMikCTQtTIHlYMQhiYZz7rwZpVb4sYT/aLMmMQRz3k1cvr guMluldDsu8xoDiDXEsRb/VUnCgnd1ECmNrA+Dg2uKpLOwfdX0vJ2WKe5M9c6wWJlOHQ 1Ho3EJfyEAu5greBxuarHZGGilDrJzf8FGd8sVThtmTMrhg23cxbXRELtvv0/aLHXDui 728UwaUHPBUV28L060BBOkOQGW5QkSwKCGE91Owad4nRHw8YMIpY4NHMq6B7fu8OGOBk YqdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J+4c/0Q7/eLM71cRhHLrdgn3bw80ZIKHk11jFduNmfQ=; fh=qqH/FLbC1fO7d2XrYAo9j7LNBuuWUyrGRnrSY0FPNCc=; b=PfiX4KZm2nlt6MrutYUoSdV5+ys/4i+PsQV3rBxUNqgGINkwWgRLPqZSaTbC5cxnA9 +ymhTaWT4C2g+mwP+Ij7h6w5EAz1LQiVGksIAX1M/FFj8Y0AcNi/LSoFvM8YC1ptXPdt ONG4LivsZuSfrviEYKxd4VZd3c3Zr36E+NCTefncTi8KyCtMyNoaqnFvJDPZTr5WBvNo 7cBCIxFdcXTgKe3CfV/1sBJmTgiILbc118+YkH75FjnFNTThTrVQHf92DImLBtK9zXOR Vi1y/PWNGQUuoLTHlYQhO8KOYSo1nVO3FSeVKbZk2lR6ao/gey1IwLc4yFf+17Hvsh33 6MGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fDVWffmN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w18-20020a05620a0e9200b0076f0cc82e44si4515958qkm.718.2023.08.30.07.55.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Aug 2023 07:55:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fDVWffmN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbMaL-0001EF-73; Wed, 30 Aug 2023 10:54:21 -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 1qbMaH-0001BE-QZ for qemu-devel@nongnu.org; Wed, 30 Aug 2023 10:54:17 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbMaD-0000kB-Sy for qemu-devel@nongnu.org; Wed, 30 Aug 2023 10:54:17 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-313e742a787so634726f8f.1 for ; Wed, 30 Aug 2023 07:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693407252; x=1694012052; darn=nongnu.org; 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=J+4c/0Q7/eLM71cRhHLrdgn3bw80ZIKHk11jFduNmfQ=; b=fDVWffmNd2+y6E8EFV4pwLMM7WD8JINn39nRkXhuZ7l0KVfuV1XUP/tcowZPnbob7L D6q5PmhiXYScCxyvOtv9IM/kiFDecxewREfaWkGte9aceamZiUGlV24TOwtOu6b1mMWd bJklnYTCJ6aabolLqPGrEjEsVjO/zDoLQNZVsQJqscH9+A3gR0wW/jkB3P9WJgekzg8s izQkiYew+eiVTwMdlIq75O0BYJzHWGi/EG3fB/qAn4N43C24amP/tbx7gbefa5sgCbBM 2c1BXR0DAEJ2y4Hdwrxb8Wac5wA8h25GVFaBT9m7yd++AfG8Nv8RLVPvSccBHg/cILOj m+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693407252; x=1694012052; 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=J+4c/0Q7/eLM71cRhHLrdgn3bw80ZIKHk11jFduNmfQ=; b=MpRVrCPcbiGDNUvupaOid47WEa/Ez1/9a/5vG1zMpUoAqnPizY/lOwX4gL3od33uCg DtChPZUxNycQLggTKBQwwn8ZKSsR44nVbjmret74/Q2F70RUqpuNAUvruaUiGndjMV9v UZ9eSqmOwJQQUeUaTn3UKoeuG1jtWtlPKL4O7ztOCnJvFRd/VSC/4dzCLM9LB87E5p0n IrOSeUTCWq6l4HDHzdBz6fVpGmRy/ZCLmp7ILG9mcUTDE+DI6v9XJ58TPkYJCApJFz7L 7U3zWbTtSYQ4bdCcfWUZaXht0ty566EfuCLp3sf3ZPeJKAcJz1uPjfBRDWNSmBlMwzUf ifHQ== X-Gm-Message-State: AOJu0YwtueGgI72CgbTx4dOMXVm+lJ7gCiOKBXpFhCklHNVl371qUp22 rERBXy0KOf7ronj+0wtAR1NaSA== X-Received: by 2002:adf:e54f:0:b0:319:7ec8:53ba with SMTP id z15-20020adfe54f000000b003197ec853bamr1938558wrm.14.1693407252565; Wed, 30 Aug 2023 07:54:12 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a9-20020a5d5709000000b00317b5c8a4f1sm16858004wrv.60.2023.08.30.07.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 07:54:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9E5141FFC3; Wed, 30 Aug 2023 15:54:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Ilya Leoshkevich Subject: [PULL 09/12] gdbstub: remove unused user_ctx field Date: Wed, 30 Aug 2023 15:54:04 +0100 Message-Id: <20230830145407.3064249-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230830145407.3064249-1-alex.bennee@linaro.org> References: <20230830145407.3064249-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This was always NULL so drop it. Reviewed-by: Philippe Mathieu-Daudé Acked-by: Ilya Leoshkevich Signed-off-by: Alex Bennée Message-Id: <20230829161528.2707696-10-alex.bennee@linaro.org> 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("");