From nobody Sun Apr 12 00:56:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1772489123; cv=none; d=zohomail.com; s=zohoarc; b=hCWj/DpbVq0za6UeLP0sAANlvf5UQpYMIpeDb6o3ZGrJzGWedLur1T89RjVefhsyMDdPb3Hz3ZtUZ4b+Hq66pjWf4BzSkJI1i1fGkj8bNfD255wnI8eVpsVKtf4u6lFuDEUCG5zYSKOhwLnmZfqSb6zk+ZKN4KosSu10rQbaYPY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772489123; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=a20X3LL6nOL1DHB0RkjcJ0CTq+OL5+eKSUsrTa1dqPQ=; b=XhvgJOx8kl1hjrs3OXnZUWOnbLZinAtTcr3b7U0HbZmqwzOAV+dcbAu6EDH01MNrJXG5W1ojEu2Pux5XecB8PA7w0vPjXAaKbppMNpiUybEALNSmaOzCZDEWHweBw+JpnnsThZ/TD2X0ioS/HHAyPT8BNMe/QAlqjlcFuzqv3CQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772489123801997.4473105541787; Mon, 2 Mar 2026 14:05:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxBM6-0000Jr-Ii; Mon, 02 Mar 2026 17:03:10 -0500 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 1vxBM5-0000Ib-9U for qemu-devel@nongnu.org; Mon, 02 Mar 2026 17:03:09 -0500 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 1vxBM3-00016q-KB for qemu-devel@nongnu.org; Mon, 02 Mar 2026 17:03:09 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-43991064db8so5136283f8f.2 for ; Mon, 02 Mar 2026 14:03:07 -0800 (PST) Received: from Provence.localdomain (dynamic-2a02-3100-2e0b-4800-0219-99ff-feb2-2458.310.pool.telefonica.de. [2a02:3100:2e0b:4800:219:99ff:feb2:2458]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c765c38sm29308102f8f.31.2026.03.02.14.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 14:03:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772488986; x=1773093786; 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=a20X3LL6nOL1DHB0RkjcJ0CTq+OL5+eKSUsrTa1dqPQ=; b=MvjC4EyZ1YXn7IxuPGZ0gkeUXoxwkLpH2z16v8aU170tL0+/ZEcMNUhsjmcqZy7QV/ OwHFaPYiZMjrfrWoIkvzYf2m8IWgqpsx2KWDTFA+YhB4egUAsHPnKNFjk7x0omSWEs7X /Ui2muAcF7DQn36QQkBRTy3p5Jdx1fqA00y97wmYLEpjz38MAtPQL37F0AlFVTdoKtrH CgHIReAUEJs8BSBZyRI189j8BTtsHI5ITwgXfzS3vz02tpt2qC+XvxPiBMWKgX/nZo3z WU8uiFryrLbEYdt89f0lATjf8hGMaOmETMuYrus7ZZLbY+cORrfDdc+W2jDMgU6tn2to LOUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772488986; x=1773093786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=a20X3LL6nOL1DHB0RkjcJ0CTq+OL5+eKSUsrTa1dqPQ=; b=S8lvnmpRajOBmSlHkAzBXBoY3wQ1Nzj040CSiDINbNn4g9WIGlz2RCB0liJft0/t4T gV51Xgb1ooRnlZ2BUAXtEKrr31g+6psKK/yI0oXjFIilpEOg/4rxHJNcmK9TTZXpsr2U YzemoHu5KIpndy0+zgByDDcrxHOvGRw4YUXn+zjbQr3nG5bip+S7tYAv1s2d4OzExL5L H8KHsGR/791aTy0YeEgKm7Tt5+V0Py1K3GXw/dDJ97+RTDK8IrHeP0uWz6NTWw+PRxV4 SOlYq23XKhbwiX12CkbvDrKCf7WO3ddqeBtuY5IQ5ig68qs5fnb2xd+LiBXZ6hk+azKz Q05Q== X-Gm-Message-State: AOJu0YyUT2BMN5QduX72FsQcSgcS/9smOeovtjArvwl7PUDS9yP7Szbk CBzyTODyZgAIs4yS5MLW5uTukYwDXSZ0CuLmLAdUBh3oXHRqYPaiesA1dFUL1A== X-Gm-Gg: ATEYQzznkO1VH0V+7m0xtgeu0U/NVyTDuMFiSBau/gjhyNCoyeQfOCBbyhBzeMIvIYI 6Q7kcf1a6RBiEfLmO28SFCmgilRUz/5A3Z+h6FGJBJDRraXeqLIJDjoC1bQoF2j5dETjy4j0YeF L9hmdzGqNaLGf5x/N0HoX0ys/XpcOGByP5ykPejtfjJ57pmGyWxMIUIKWTO0/OQlm65/C9SvYfz kPS21hgxzPhNutz9zUSsgS48s0lRDJBh86ve22oDoaoVA8L+wqbwQ9ET8msk6xB3LLjXQ+hZ+yS jDI1gHMVT/G+c1SlWz3/KBgkawdjDcMjAFWq+JV5q4/DX+iyXX/Na9/QUjyGyGu1GCD+Mq9bmyq JNzu0XWTMAmIcYyWAuax66S0Lk3aQyIZCdiYk7HLYFC9SznYx6suWKO7qOpXwBAZ2wSKI+IHEnG 4TwVitOc58WFVYcEJ/FVvadP+8sr15WhOcFuw9afzmX7W67aXDvM3I8Eh+k8KwX/nAAtaXI5hPt OhwdiAX6cvGDbhPkC91QDA/T4phXycddyl1UnwjvHZlYNc= X-Received: by 2002:adf:fa52:0:b0:439:ab3d:1c27 with SMTP id ffacd0b85a97d-439ab3d1e51mr12575085f8f.2.1772488985526; Mon, 02 Mar 2026 14:03:05 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-arm@nongnu.org, "Michael S. Tsirkin" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Helge Deller , Andrew Jeffery , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Steven Lee , Mark Cave-Ayland , Jamin Lin , Joel Stanley , Troy Lee , Bernhard Beschow Subject: [PATCH 02/12] hw/char/serial: Remove explicit cast from void pointer Date: Mon, 2 Mar 2026 23:02:44 +0100 Message-ID: <20260302220254.1166849-3-shentey@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260302220254.1166849-1-shentey@gmail.com> References: <20260302220254.1166849-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=shentey@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1772489124224158500 Content-Type: text/plain; charset="utf-8" A void pointer asks for being casted, so C allows for omitting the explicit cast. Take advantage of that. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell --- hw/char/serial.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index adbd1d1d4a..0f2e79dfba 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -715,7 +715,7 @@ static const VMStateDescription vmstate_serial_thr_ipen= ding =3D { =20 static bool serial_tsr_needed(void *opaque) { - SerialState *s =3D (SerialState *)opaque; + SerialState *s =3D opaque; return s->tsr_retry !=3D 0; } =20 @@ -734,7 +734,7 @@ static const VMStateDescription vmstate_serial_tsr =3D { =20 static bool serial_recv_fifo_needed(void *opaque) { - SerialState *s =3D (SerialState *)opaque; + SerialState *s =3D opaque; return !fifo8_is_empty(&s->recv_fifo); =20 } @@ -752,7 +752,7 @@ static const VMStateDescription vmstate_serial_recv_fif= o =3D { =20 static bool serial_xmit_fifo_needed(void *opaque) { - SerialState *s =3D (SerialState *)opaque; + SerialState *s =3D opaque; return !fifo8_is_empty(&s->xmit_fifo); } =20 @@ -769,7 +769,7 @@ static const VMStateDescription vmstate_serial_xmit_fif= o =3D { =20 static bool serial_fifo_timeout_timer_needed(void *opaque) { - SerialState *s =3D (SerialState *)opaque; + SerialState *s =3D opaque; return timer_pending(s->fifo_timeout_timer); } =20 @@ -786,7 +786,7 @@ static const VMStateDescription vmstate_serial_fifo_tim= eout_timer =3D { =20 static bool serial_timeout_ipending_needed(void *opaque) { - SerialState *s =3D (SerialState *)opaque; + SerialState *s =3D opaque; return s->timeout_ipending !=3D 0; } =20 @@ -803,7 +803,7 @@ static const VMStateDescription vmstate_serial_timeout_= ipending =3D { =20 static bool serial_poll_needed(void *opaque) { - SerialState *s =3D (SerialState *)opaque; + SerialState *s =3D opaque; return s->poll_msl >=3D 0; } =20 --=20 2.53.0