From nobody Mon Feb 9 11:51:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620398671; cv=none; d=zohomail.com; s=zohoarc; b=l5hZT6TyorRGcgyT9CgoFg9vjA3CiOvJ3TDpYHuiLL8UJ/6s2glwVclvv4g/HBdZTgMUxtrjx3L9GhfweMhq0mmth+iE5SBtmWV9NvGmgKYPrmdq6iQra+gXNhfkEzypR/sbVJ49MwJV69UDW28UXJ4bUnV4PKR8LLpJIOcfZlo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620398671; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=YCw70biCZtmrujveEn0uP9uiPeh7MzcdOYuA3fJ6mTo=; b=lk8oSejcWu3DyBBpwU+3vcaOBFeIy7ftGlPxOqyoR8jAgHofCnrg3BtjGkuXpCcvY2cAHM1kWpmVCaceqZwImR3dhQ3ub2S9ahoLPqGzX1+J+Yzd/71J+lFFx7b4+tXMR3bB1y3dL5iMh5GLp32Ere6pj9ZOtPBoOLQai6wFgoU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620398671746823.4415178481228; Fri, 7 May 2021 07:44:31 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-6mcHXfygOS6BcJ1jrwocRQ-1; Fri, 07 May 2021 10:44:26 -0400 Received: by mail-wr1-f69.google.com with SMTP id d20-20020adfc3d40000b029010e1a640bbfso3693262wrg.21 for ; Fri, 07 May 2021 07:44:26 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (astrasbourg-652-1-219-60.w90-40.abo.wanadoo.fr. [90.40.114.60]) by smtp.gmail.com with ESMTPSA id l22sm12827268wmq.28.2021.05.07.07.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 07:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620398670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YCw70biCZtmrujveEn0uP9uiPeh7MzcdOYuA3fJ6mTo=; b=dLCZ8Cf4Nou+grFOV0xMy5kMiIJo0evSxjhCYQUH1BiHETUa8bkEbZ66b5SAMgEsy+51kN BLDauGKaF/pviSEW/XyC8IR6FtXlXruNqvUmESpvmxCKdntAPmbbM0b0u7rBx20PtppF3z ZfcrgHpRwd+qWouyA2Y3KxufrLczn94= X-MC-Unique: 6mcHXfygOS6BcJ1jrwocRQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YCw70biCZtmrujveEn0uP9uiPeh7MzcdOYuA3fJ6mTo=; b=E9MZHBad2jnf65wzJXP/X8LPeyohGBErLsL3fvJ2bTPxiwRWu8qHJv5MRaLcwuZXiu JzbQHsirhSf1v5jROLuwTtVXTuJxGq0qTT37enfQDtPOsSdgIfEXD2H408rB4CnXUDQ2 5uh0jQT2tBJSpDYXvZ0NYK1JEdjoMXGO2w99t5HYcUDVwL3/0fu8PX0coHyHrWpGaWMx sK55f8JFb+awQnf9IT1izVbUzMvoRfuHqQcHW+E5jj0AGZY21y501t+R8K4K8bdV/ipr 5BiZUh8UnmmYbIpicD/NPg2Ze5r9+1glwU0WSqAp/bOzdltmbud/MxTp2x6z7pbj3DfB OkhA== X-Gm-Message-State: AOAM530iyJvb4cGXw/VHKP9Tm207Oc5Eecf3U6LQ+DOkdVFQ5ta8J9UO KjYnPtNatVkMxRO6poXFXHRWqFytd+Ef/NaqJHz8Q4kgAClkW6z37CKQrJNHEJW9vhrK1plgCve /+INb9Bgbv8b9og== X-Received: by 2002:adf:eb82:: with SMTP id t2mr9296089wrn.337.1620398665153; Fri, 07 May 2021 07:44:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSRPyNjkkgTHtIXUz9NIoTTHnH7rmh5hjO3wk8/LS9dlME7+ZDoSyRfzMsFicSB1f9FbtI1A== X-Received: by 2002:adf:eb82:: with SMTP id t2mr9296078wrn.337.1620398665044; Fri, 07 May 2021 07:44:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , qemu-ppc@nongnu.org, Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Andrew Jeffery , Joel Stanley Subject: [PATCH v3 14/17] hw/misc/pca9552: Replace g_newa() by g_new() Date: Fri, 7 May 2021 16:43:12 +0200 Message-Id: <20210507144315.1994337-15-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210507144315.1994337-1-philmd@redhat.com> References: <20210507144315.1994337-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead, replacing g_newa() by g_new(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater --- hw/misc/pca9552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/pca9552.c b/hw/misc/pca9552.c index b7686e27d7f..facf103cbfb 100644 --- a/hw/misc/pca9552.c +++ b/hw/misc/pca9552.c @@ -71,7 +71,7 @@ static void pca955x_display_pins_status(PCA955xState *s, return; } if (trace_event_get_state_backends(TRACE_PCA955X_GPIO_STATUS)) { - char *buf =3D g_newa(char, k->pin_count + 1); + g_autofree char *buf =3D g_new(char, k->pin_count + 1); =20 for (i =3D 0; i < k->pin_count; i++) { if (extract32(pins_status, i, 1)) { --=20 2.26.3