From patchwork Wed Jun 26 11:06:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1952522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=daynix-com.20230601.gappssmtp.com header.i=@daynix-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=nquZsbtD; dkim-atps=neutral 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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) 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 4W8Jp71zPBz20X1 for ; Wed, 26 Jun 2024 21:07:59 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMQUL-0005My-4r; Wed, 26 Jun 2024 07:06:57 -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 1sMQUJ-0005KP-BS for qemu-ppc@nongnu.org; Wed, 26 Jun 2024 07:06:55 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMQUG-0004fV-Oa for qemu-ppc@nongnu.org; Wed, 26 Jun 2024 07:06:55 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-70670188420so3081567b3a.2 for ; Wed, 26 Jun 2024 04:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1719400011; x=1720004811; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=iRIsabjOCp7YSjFwcV1tRdeNsvY9o6uLKWp2oClGRk0=; b=nquZsbtDjKaqBReVXGUBgvoJcu7jMPDMavaSDJKxdOyHK79I8gDeSfpUthJAlCMwNr a3eBmMMiDrNqKZn0UPF2d0ZV3lKBlIjJtPBe8/mcR8MDEm5piiyoIRx98FaK0l77tGtc moxNYjF9Eko3w3oX0Qm97VpXUwJ8cbMpgasTTyHh5Dy8CdjgdSZHkzT7bVKUXLkT0a/N GFPOIJOvwXRlHU+AYyzhZ9IgNDEcItmSI5Kz4kp/D/6B7hG+Rx8eRqTtO9ooy2u6Pdv2 mot+HTd8dRrVyEYGAMD5HaW4v9ygPsyfAzmgiGTZx74Uk6pBGk8PzOkqiJGqqvkCWTZR f1gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719400011; x=1720004811; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iRIsabjOCp7YSjFwcV1tRdeNsvY9o6uLKWp2oClGRk0=; b=IPLJqYGHlpM1Z58Grm0WHxHsutPKxaG7h+wObF1YCDZnKQT7y4v52OGH9iFj5RC6FQ 6rV34nG2pY/uY2BSMOL4GiSHMeAlCHCtuTLqsj7xdFuGQhD0UGoTV2fMGA1+tqXiR6gR xZ6vG4KqM68VB/q5Pr4Pw+m0VcRVEIwdIk+Pe/l3XyebC0DRt8qiBUTNbjtzpaea4vDh rz/RysmOPO44Jy4LQAh7TFJcjR0RfAMWVPClwMMCD0E5Bhm0ipndRXRY1LMDoc5O5FtM /rko2+9K013jVOsgyBgGXw/kdLyFKunulXnbSzoSZ9AxK+27CPX2dJm5rvxP4vLQ4RWz Y2tw== X-Forwarded-Encrypted: i=1; AJvYcCX0nizXdOGcXGevqPLEEhVARpEwxpnRXcJ9jOofcSfWzZjYakgBVWpxMZjbfXoxMoH6sUIkIFgyujw6/gIcBcywGpk7 X-Gm-Message-State: AOJu0YzzTSyxnRjeGWoJTxm3+FJrwBlkOoH+NF9FRLZ1lxtVQs0CjWV1 SK7VxI5yOVgJbZxAn64MAzRCxzM2txx+MjpyjwQLhWbTg092ExJICZ9SsK8RCHk= X-Google-Smtp-Source: AGHT+IH4urPQ6j+xa/HuI9tGhGaIO4IdTUEaZsjK099SMnteGDVmWKgkI9WZGwDiutNH4K+I8urtaA== X-Received: by 2002:a05:6a00:4ba6:b0:706:61d5:2792 with SMTP id d2e1a72fcca58-7066e52a5bfmr8524764b3a.8.1719400011404; Wed, 26 Jun 2024 04:06:51 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-7067d11a437sm6020153b3a.118.2024.06.26.04.06.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jun 2024 04:06:50 -0700 (PDT) From: Akihiko Odaki Date: Wed, 26 Jun 2024 20:06:25 +0900 Subject: [PATCH 02/14] hw/ide: Free macio-ide IRQs MIME-Version: 1.0 Message-Id: <20240626-san-v1-2-f3cc42302189@daynix.com> References: <20240626-san-v1-0-f3cc42302189@daynix.com> In-Reply-To: <20240626-san-v1-0-f3cc42302189@daynix.com> To: Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Yanan Wang , John Snow , BALATON Zoltan , Jiaxun Yang , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , Fabiano Rosas , Paolo Bonzini , David Hildenbrand , Thomas Huth , Laurent Vivier Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-ppc@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 Received-SPF: none client-ip=2607:f8b0:4864:20::42c; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x42c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org This suppresses LeakSanitizer warnings. Signed-off-by: Akihiko Odaki --- hw/ide/macio.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index aca90d04f0e8..d8fbc1a17ba6 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -464,6 +464,14 @@ static void macio_ide_initfn(Object *obj) qdev_prop_allow_set_link_before_realize, 0); } +static void macio_ide_finalize(Object *obj) +{ + MACIOIDEState *s = MACIO_IDE(obj); + + qemu_free_irq(s->dma_irq); + qemu_free_irq(s->ide_irq); +} + static Property macio_ide_properties[] = { DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0), DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1), @@ -486,6 +494,7 @@ static const TypeInfo macio_ide_type_info = { .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(MACIOIDEState), .instance_init = macio_ide_initfn, + .instance_finalize = macio_ide_finalize, .class_init = macio_ide_class_init, };