From patchwork Mon Nov 4 00:18:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 840550 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp1896110wrb; Sun, 3 Nov 2024 16:24:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX/OQzhljvkAJWERhn/RK9Bl7dSQxZvhCbJPdP9aLrnaAHhK5tFgWo1nSU4/I2XlAUAGkjTAQ==@linaro.org X-Google-Smtp-Source: AGHT+IHl0NuJ5LNrcHaxSZypKif3bfyMaw1CuU8T75Xjn0zi2OV/8+Y3ul+F1g4W9O4t6jox15mp X-Received: by 2002:a05:620a:17a6:b0:7b1:14ee:2967 with SMTP id af79cd13be357-7b193f3d0f4mr4555434485a.46.1730679848063; Sun, 03 Nov 2024 16:24:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730679848; cv=none; d=google.com; s=arc-20240605; b=VyEycvDUf6SxCrTC4Vx9LPnj57RD0wm2aL4ZtBonH69qGMp832P6mK+YY9v4M62usa rmpW2Q/qfvsIdvrvxuJ1FPACKXApKBwPb123Aa/9AZ/RGCwGFdDezd9XiT/OzRA59UiR f/j5Kz4wkww/tyXRCliYD3jZ+WDZjOTQ52TTDpSN8ACrt5F+pm2fTRDefhWWI9HZUFOO uzADCKD91sZRw6z1W4tPPZ9JxGBALh4/+oqirSss+t/8Ony9KWBAVkJiIeW9gC31c1US 9nFWPEit0YcS8OOFoAnoTX1lXZPaFLB7Gvx3ok4hbWAPlaCpB+yLHcvkZG7SI8BxOlhe 8d6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=r8AvT/FnW3aX5+LIUAhqePEJ/QWevxFxm8Hw+y35nEs=; fh=+JtYVaHWBW+cmNkrDOr+PqPhJgHlyCA8Zc9eJ80SZq4=; b=X4xNCSNtYEVSKr9n7eTe2aPF+JrLl8O0L3hI2r8ZWsYlpP5nkaKwlp4XN/4pPlfCVh pufgAHigy/vIjiru4DpYEGDZxqCmR7KaCi1XrC9IjhTt6GkBuE5+ukpCxC7kZrLwJ7Ta +TcNreo6o/qAmX3iMGtlyjgOCrC+iUIClmW9unf43OSNpWtjD9tANuDNENMewb0LlW9x p9gZW1QXnqq0onew0EYyVQV2xJRFg4ZD1oGT/4NIZL7xzCX6AONpRYzym0n7+SVjwx69 8yZpcpLodvhTYJJujU+lHM7DL1NNI5bsH0tkk3IfbmhxMUk3DWtKgDIoNJUxj6ke4mW9 r1Rw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IEq1C9J3; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f3ad4c9esi944675485a.724.2024.11.03.16.24.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Nov 2024 16:24:08 -0800 (PST) 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=@gmail.com header.s=20230601 header.b=IEq1C9J3; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7kp2-0007Ke-9w; Sun, 03 Nov 2024 19:19:56 -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 1t7kp0-0007Ip-HF; Sun, 03 Nov 2024 19:19:54 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7koy-0002Ji-TO; Sun, 03 Nov 2024 19:19:54 -0500 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-71e467c3996so3013871b3a.2; Sun, 03 Nov 2024 16:19:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730679591; x=1731284391; 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=r8AvT/FnW3aX5+LIUAhqePEJ/QWevxFxm8Hw+y35nEs=; b=IEq1C9J3Ar2vDg/6/EPH7fu9nQ0ixl29ogpayZJhCPAD2ZmXs4723K8St1naRkJKbI PFlSXmVg+ehmduC8AuFNSUXKHcA94xaQnL+sPTYTy2GNY8g5jZ3Jyvi8Dq8pzJ5RJks2 WW0i61JuLlesrj9tEXfgBk4zD3iUSUwzQJq19KTrCG1W62cyxjdJ7h12LeIwa+8XopY+ /WeuUvAOk3BAlonFmRo9UFfAUv32AwauIYCOIfad0ePGylMdw+9HB64QN3HzxWEhS6S+ S0IJ53yAsvZo0++U2Ese1CqIrgF4V9LttcgUR/eH/IDxV4N3xksB1JhR8+Ce7fPbObTN c6iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730679591; x=1731284391; 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=r8AvT/FnW3aX5+LIUAhqePEJ/QWevxFxm8Hw+y35nEs=; b=bDqwb7uHMhWt6I5G/aFGLTW7MaCmJow0jo5bKysehYgHqL2XPlnURKpMmS4uvn+45J /P7Bq1tjLxtdYkpiBTGu6z9ElC2PBDrb53OTV38zr3LVUa5Jyi41kXf4XJrrI4/nLGx2 q7vAV9ALRZIthq+eiXfcb0iRolX259SI+ScIcV8t0rpa+PRzg1YNTBfvC4HVkW55dm8h rM1Ai97DtMYysq95DG09Pc9WtoS7w8HwfEIym15dO18edZVOsnlLZPmBYqyU9cbuCCv8 FwB41FtMiq89P/iW1gLQqBYVaBrEDiP5X2eynMUe5tF8j0Dl+6jSoVKRYc27QH3g1gF1 ScqA== X-Forwarded-Encrypted: i=1; AJvYcCWlENpfzqO9b28ZZbtMNi5vgrw4xgC6PODracQPDHa3ogDmX8oeZGmuLmq3N+y4qjdPrzyjr1RKYA==@nongnu.org X-Gm-Message-State: AOJu0YyllIBWC9h5Pk0t2IaQIcQe4ohIPXUE+06pbWNKl/vjPgG5AWzO 4QKQ6cP6aPVt0nxcjLAcaBXL7rDsmonbui3v7PMnoo3FtVRQ39dhtUSufw== X-Received: by 2002:a05:6a20:2d1f:b0:1d9:18af:d150 with SMTP id adf61e73a8af0-1d9a840a299mr42497310637.21.1730679590897; Sun, 03 Nov 2024 16:19:50 -0800 (PST) Received: from wheely.local0.net (124-171-217-17.tpgi.com.au. [124.171.217.17]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ee45a0081esm5900648a12.59.2024.11.03.16.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 16:19:50 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PULL 11/67] MAINTAINERS: Cover PowerPC SPI model in PowerNV section Date: Mon, 4 Nov 2024 10:18:00 +1000 Message-ID: <20241104001900.682660-12-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104001900.682660-1-npiggin@gmail.com> References: <20241104001900.682660-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=npiggin@gmail.com; helo=mail-pf1-x42f.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, FREEMAIL_FROM=0.001, 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 From: Philippe Mathieu-Daudé It is unfair to let the PowerNV SPI model to the SSI maintainers. Also include the PowerNV ones. Fixes: 29318db133 ("hw/ssi: Add SPI model") Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Nicholas Piggin --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1e88b5738c..cf39ad4b7c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1505,8 +1505,10 @@ F: hw/ppc/pnv* F: hw/intc/pnv* F: hw/intc/xics_pnv.c F: hw/pci-host/pnv* +F: hw/ssi/pnv_spi.c F: include/hw/ppc/pnv* F: include/hw/pci-host/pnv* +F: include/hw/ssi/pnv_spi* F: pc-bios/skiboot.lid F: tests/qtest/pnv* F: tests/functional/test_ppc64_powernv.py From patchwork Mon Nov 4 00:18:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 840551 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp1897412wrb; Sun, 3 Nov 2024 16:29:25 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUH++R9XyFVwaCUT8IWlq3sb4UcoLtAjE4QHlZAHwU18wXbC8NS2HLdBvxRgZe8JxOgCdqVHg==@linaro.org X-Google-Smtp-Source: AGHT+IE1vRPTBe3UlAfaYsCoC5VfsUEsf8seRZIuH38O+EUU7I93jRxIVdZl7t65YqVLa8m8ItZb X-Received: by 2002:ac8:574d:0:b0:460:8dd8:a44f with SMTP id d75a77b69052e-462b8650631mr138473991cf.12.1730680165037; Sun, 03 Nov 2024 16:29:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730680165; cv=none; d=google.com; s=arc-20240605; b=MKEdpncQv6fY4oJMMlyg372Np5ohOabbyycKIXTRs3cwYs4/cMdzQjGIYGhBNrhl6l IY+8fy9ARJCW5mo8Yhk5foIqiCyKsc8GjjwgP1/P2YM7Av1Moij1ImOzdJicefMxDlCu Ff8kdUkHEXrwxDv//ymi0BooKFu6aIA+MxJ0av8fEylzjz6B3Y0Odl/KFvvUptTWQKhc oNZpiLBRS8r3IMk/XF1zCAvsJjo3m1O3AayN1j6M2/ni9BiEPNCXUujZytzCCrK764Rk Y/SJvQF5zFhNy5mXnQJ+1SR9U30oGrEmhu4O5zCq1tonH67HCMWh0Ce7ivoVAaeYGGWK csaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=vP9Pv6akJ9wvw7JMuu+7UGFu2Y8Q3rLCweqIbGkYo8w=; fh=Y20sEHVWbe+CizjFokMK5ABY4PkZeYKp1yj6Oq/oKRU=; b=ZsAquVTmUjcjKtCEAHD/jjwTb8NC2+8j6xhISaXuiq2tQcgAmiXCkdzSVzvxxgdH4N E0odUiAAiwzV0Eao/9je5gwn46ocwPFBebZa64O3LBeDSITs1Uodh2aOeFP4t0QUb2Bn SyciwV5MRPfWzaqWuf7Mjkw5leSbhVXqoy+X6bYHhxGeuo0jWpLf6ig4Gxb9xXgThbJs APNx4vOk7dIbODf4Gi7U2n+Fpug9CoNQrYyB7twexTut8CgTSbGoiT2aVZAez6Lhhj30 B4n1S3vEl1wd7Hbgf3YCj+JQ+l+owfDeyz76ndlcxetYTCoLQ2MxsLuqtFVi1FmLJyhC qXJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F3mH+JPi; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad0b0e3esi102966851cf.98.2024.11.03.16.29.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Nov 2024 16:29:25 -0800 (PST) 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=@gmail.com header.s=20230601 header.b=F3mH+JPi; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7kp7-0007Ns-6h; Sun, 03 Nov 2024 19:20:01 -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 1t7kp5-0007Ms-5R; Sun, 03 Nov 2024 19:19:59 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7kp3-0002KN-Oq; Sun, 03 Nov 2024 19:19:58 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-71e4244fdc6so2800537b3a.0; Sun, 03 Nov 2024 16:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730679595; x=1731284395; 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=vP9Pv6akJ9wvw7JMuu+7UGFu2Y8Q3rLCweqIbGkYo8w=; b=F3mH+JPiETqE28cN7BS9xoA3Z6Djv5obgzYy5hvte1gyf2I5cG52yVpjaXkVz28p6a iYAf2/Da7O2f1CINPTpYnK2uWH8WAS9uV/VCfKgW1AeWA2V3pYgyn+TXXyKgghfSq+w7 zJzznobSzNyoCLgFSgWr/dEtD8b1wst9HgHM8L/J/bxZK8ZmXFvPEkbfQ0p3jhrzjb/L SLdb/OZHBsAL9SmM1z6IXEd56TZfy0nCIa0G6ANxHIHa94TDexlvTAliWPSPv+2n4Yyy vWJel5+9JplDtGKFKSiMUWUApSKPVE4it9P57PXrLexi2T/jjupeN6cEJb4GkUKFpV8i hvQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730679595; x=1731284395; 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=vP9Pv6akJ9wvw7JMuu+7UGFu2Y8Q3rLCweqIbGkYo8w=; b=lh20I3GGuZuTNmP5DN6NQ1HnGLRXFWzY1UjhUe/L6AxEwPkiRpniEUNBwRbV/R+MlV iQFQ4BVo/a65UDhi9jNS1HAGUTs7pORufs06fePPjbFzH8VwY3w9310cBI8zDBODmW1B z1kMOAJgGMO2d0UJJmKJZ3b7Y0BU2DPeQ1cwTTIJ+YvtTWJAhexZ/kRyhmLBrYu1hZtq 1h42S1HfNHPTxoOSLFbZ56sNaMA0EjZ7JtEpoqw3tUbluYpjVi4ypF4Fp1lUWbA0X6uP Q95tGUoYwGIZqO9QJASbZMWoMJFd6jirWZETnwlo2KZqiX0EtRRlPNQvBZ0N3FDhCVv5 2hlA== X-Forwarded-Encrypted: i=1; AJvYcCUbSJlTudbu5AdlFOqvu6s92t1jeJ87INnKx117Qc1k+ZyGJUGeCs2TI1brGsuoVFA+y57+YkMGwWgZTOY=@nongnu.org, AJvYcCXBg3hEJnWyZVSEbqEZoLCzfZrdY2JO45RHIwwvstnAu1jccD941Pbt6TyNomHcKq4kmkBWwQ011w==@nongnu.org X-Gm-Message-State: AOJu0Ywj1FSFXr5DsXSMubTFDLqT7iauuJLbzPziv5ozxpTkfo3HG8yQ +Ss3JAXV3sUogGnRZVDRSkwInDN7TbgeAYzcg3v7GlrAWlNDDUIz+/nN6w== X-Received: by 2002:a05:6a21:670f:b0:1d9:266e:8216 with SMTP id adf61e73a8af0-1dba53bf472mr16052635637.22.1730679594691; Sun, 03 Nov 2024 16:19:54 -0800 (PST) Received: from wheely.local0.net (124-171-217-17.tpgi.com.au. [124.171.217.17]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ee45a0081esm5900648a12.59.2024.11.03.16.19.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 16:19:54 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org, Richard Henderson Subject: [PULL 12/67] hw/ssi/pnv_spi: Match _xfer_buffer_free() with _xfer_buffer_new() Date: Mon, 4 Nov 2024 10:18:01 +1000 Message-ID: <20241104001900.682660-13-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104001900.682660-1-npiggin@gmail.com> References: <20241104001900.682660-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=npiggin@gmail.com; helo=mail-pf1-x429.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, FREEMAIL_FROM=0.001, 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 From: Philippe Mathieu-Daudé pnv_spi_xfer_buffer_new() allocates %payload using g_malloc0(), and pnv_spi_xfer_buffer_write_ptr() allocates %payload->data using g_realloc(). Use the API equivalent g_free() to release the buffers. Cc: qemu-stable@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- hw/ssi/pnv_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index 9e7207bf7c..d15a5970b4 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -53,8 +53,8 @@ static PnvXferBuffer *pnv_spi_xfer_buffer_new(void) static void pnv_spi_xfer_buffer_free(PnvXferBuffer *payload) { - free(payload->data); - free(payload); + g_free(payload->data); + g_free(payload); } static uint8_t *pnv_spi_xfer_buffer_write_ptr(PnvXferBuffer *payload, From patchwork Mon Nov 4 00:18:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 840549 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp1895552wrb; Sun, 3 Nov 2024 16:21:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWMsANLkJsRM/66YSdA3+SdnqsPJFJbnWuAjsxQTV/LtRapt+ae73uWXy7ood5FwfCPrCfHkg==@linaro.org X-Google-Smtp-Source: AGHT+IGIw4rsmN28G4/vK8+fc3bJJaeQYRoK7Hr/UkVUeOYcGk4b0cTirPyzjdClANE/zL3HXLuc X-Received: by 2002:a05:622a:15cf:b0:45d:9357:1cca with SMTP id d75a77b69052e-4613c00ed2bmr483359291cf.14.1730679698107; Sun, 03 Nov 2024 16:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730679698; cv=none; d=google.com; s=arc-20240605; b=FrxDvqAEBYiPYB0zcg6xHcdQ6Cv3klI5oX3Op1c2ZCKdWLC0QqxfkzjD1XH/zxdfSB jweNwXtUWNF8ZB8Ln/u26EgLfZibaksUf4+O/BNuzIIh31+RFdfPnxN6U7ha8ROfzU1d 6jwwxRc2y8Fm1p/LnTIXhlyjO8irjBjtSMquTejDi+cnWOMR9Cn3rrXq+fec07oH0OXH FgLMd1nMApINHApEETY3hpJKC94lINzJoksmadkXPz6eECb8SmIPZKgDJZb3qkvbfx+e NQ1XT9mEfWxTFlCCocG7oTcqKAJEd50imsG/++l+jqVZyCZI8ynysTCPr8SS0VdlBUF3 k1oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=e0I9TDQdpQOkKI2wo1rQADwX0izZZzX4pvBbiiFX/Hg=; fh=ANlCD94dIxn7JW2MODDyD1lOmHHBHFGVs1Kul5sl+BA=; b=LlMWjBea/tEZReMp+bbj/d6DWSeQtK4YWoeSSMJKeKGHjTwzlcXL7ieStPukyvKX7W b0wK3r3iZFy6pSCt7Q7KIaquBTdSlOmZCYs4WKCDhJwreOXNKR4EyR3Kgc3FcpVuQbK2 MymgMK/UG6NQtmdcMK2enf8OUb56V+hTXmtJ2MP9xP0RCfBEkJ+HIVffOhmOXdcJnav2 6t9asgnUY7N8Zden0Cpi6OpMkD/oCBzhUmX773Ff8s/oZmj+HFLrKhCNTmWLGq4L0wB+ E7NuMsgNGKkaymb5L0L4AYx3AZhEtGCidBVztzmN+pFBCfU8dD3KtwSCfSoN9DlSHVlA xMWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lrz6IIsI; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad249e51si95366521cf.645.2024.11.03.16.21.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Nov 2024 16:21:38 -0800 (PST) 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=@gmail.com header.s=20230601 header.b=lrz6IIsI; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7kp8-0007Pv-Ur; Sun, 03 Nov 2024 19:20:02 -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 1t7kp7-0007Oq-M9; Sun, 03 Nov 2024 19:20:01 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7kp6-0002Kt-B4; Sun, 03 Nov 2024 19:20:01 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-720c2db824eso3318139b3a.0; Sun, 03 Nov 2024 16:19:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730679598; x=1731284398; 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=e0I9TDQdpQOkKI2wo1rQADwX0izZZzX4pvBbiiFX/Hg=; b=lrz6IIsI6AamTuWkD0epBhUl65hAHgeAmRTIj2FXkh8tR85HHsQvOjsnNn5dyjUFAP xTH2MgdsbrvRSuPXY2zbyEVsgyXJIls5RxO8N1Nf1MYUfeX6pEgebjPBvfgBqRohu/OU VHbi4b1ojR7iCO5mfFn1+hgC2+xwbz347atBcYcp9kkoDMLUsC+ToIC6V8h2V2YXgOhD lPbU1AmaQn/TBBlxHXJb6km3QfXks19CE4uHOMO+dNwBUq+hclC5NEXG+WilxHdNPFnB VwWdk9l2m8OmENJq8vC/B8vQvHcHrXThPwnZzpX2SKOaXJDnePB5hel9444Nl7cRWDzY DCqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730679598; x=1731284398; 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=e0I9TDQdpQOkKI2wo1rQADwX0izZZzX4pvBbiiFX/Hg=; b=CPQd2o7YOF2K/6xz+WZOibv1JeYHRYd7jr5NAe7Uxop+ZRAgT4V9knw7tXPCkoGGGc hquQAdFheDT9mA6tycXIqikgjDwCsLsAdJLv3AHsVHYrXQVkgs7MRK8FCKJlhT7bBQ/D fblLA7BL11Xk6YzGLD3sJXiJkkcKZ9HpMwLiPcBWIBGQ9QVv6i39nBIXEzMyqNy9fpFd sGKW7EN/GzXXfMUr9jiGFJ7psrSopBwP3x6piQHxhUS8C9VMzaU1eXJp148Cl7swwuYY c3S6Tv8LkN8ZNOyUbh82Ijtg6Fttx1OKBL72DRfSts9UAywoEAv0+V3FAyzr6/isUI4N unLw== X-Forwarded-Encrypted: i=1; AJvYcCWL4iHkNOyO6gafHV1+QZysqli6JH+7tXr/vZn+TFFTyZ40m54bHYjhEPlvnQcQlWWq32AcGjFaNA==@nongnu.org, AJvYcCXKDi4GaaAG5g6e6YXHiFPwoYl7GdXqKBLTnyp91f5AS8/ZTRtPH+y+C17D9KyIy431peYcHVURjSAqR9U=@nongnu.org X-Gm-Message-State: AOJu0Yz03llt/OLKfO2Xjp2nIFTCY+ntX6jyNBxuOO2XSAO5P/AEqRJq US4nGFzx6nI07D7DV3uFDk3wRrILvc3uqQ7vS8qsK08RDse1QyFOIVeRBA== X-Received: by 2002:a05:6a20:d48e:b0:1d9:ed47:3b52 with SMTP id adf61e73a8af0-1d9ed473c0cmr26597073637.8.1730679598137; Sun, 03 Nov 2024 16:19:58 -0800 (PST) Received: from wheely.local0.net (124-171-217-17.tpgi.com.au. [124.171.217.17]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ee45a0081esm5900648a12.59.2024.11.03.16.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 16:19:57 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org Subject: [PULL 13/67] hw/ssi/pnv_spi: Return early in transfer() Date: Mon, 4 Nov 2024 10:18:02 +1000 Message-ID: <20241104001900.682660-14-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104001900.682660-1-npiggin@gmail.com> References: <20241104001900.682660-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=npiggin@gmail.com; helo=mail-pf1-x432.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, FREEMAIL_FROM=0.001, 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 From: Philippe Mathieu-Daudé Return early to simplify next commit. No logical change intended. Cc: qemu-stable@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Nicholas Piggin --- hw/ssi/pnv_spi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index d15a5970b4..72bcc00de7 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -217,6 +217,9 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload) PnvXferBuffer *rsp_payload = NULL; rsp_payload = pnv_spi_xfer_buffer_new(); + if (!rsp_payload) { + return; + } for (int offset = 0; offset < payload->len; offset += s->transfer_len) { tx = 0; for (int i = 0; i < s->transfer_len; i++) { @@ -235,9 +238,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload) (rx >> (8 * (s->transfer_len - 1) - i * 8)) & 0xFF; } } - if (rsp_payload != NULL) { - spi_response(s, s->N1_bits, rsp_payload); - } + spi_response(s, s->N1_bits, rsp_payload); } static inline uint8_t get_seq_index(PnvSpi *s)