From nobody Sat May 30 17:33:08 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1779982212; cv=none; d=zohomail.com; s=zohoarc; b=ED5Y5vvTsPbcC7aeorCGIVNgB1njBgyHwaaRq9iHMYgJ4qlmMkkFkFFqBC6GceWUykxQ4lLDk2mBqpukQYrqL6yJWSMHZsg6kEm66fZYe8lRtIDHyM6CnaCFKDgxtQxAy+SHnB+EC8JVQzsTU3tPpIiL2iJSfgUX4nqg6Ok6Ias= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779982212; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=NIroeYUMzLe0BDNnaD3zQSeKlegN8RDvvosqpf7rBeg=; b=Lag6dvs+fEs30Lfa2lVmWJE1oai+H9eKpWomVxy9rMwBmeakTEnK4lI/umlXXMAcuAY3EXEGlM4CYfXqHGeQzds77ghY6fSrUUil1bJy5o+86SNCc3C7eW5B8z0C4ymKAaLAITrYOmNizrORQETWreD3elbJQSsH9EaKYjcqud0= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779982212725841.4474233810339; Thu, 28 May 2026 08:30:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wScfO-0006u9-Iu; Thu, 28 May 2026 11:29:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wScfM-0006sK-FU for qemu-devel@nongnu.org; Thu, 28 May 2026 11:29:00 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wScfJ-0004SY-OV for qemu-devel@nongnu.org; Thu, 28 May 2026 11:29:00 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-49041e84237so55182125e9.1 for ; Thu, 28 May 2026 08:28:57 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4908b7a70b9sm19116605e9.12.2026.05.28.08.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 08:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779982136; x=1780586936; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NIroeYUMzLe0BDNnaD3zQSeKlegN8RDvvosqpf7rBeg=; b=XWJLyYWMWWN0HsG9e9QMM8JBTmKoyaGixvbZ9lm4Wl02a/TKSUDm+XYsRjaoGLOzuI nJ9/aVGGG/JL/VsQOlEW/jw+EeCXEGIRrBi4UelKFIbPVdOaYgZxPMBkIfTrKI5rsvtI wjI6OiQNwt1HHiFqRt2r649wlYRDg4XvpkQmzQGKejEtDL5WKWG4slQ1thbMjiFLhI1t dLZemMCYtjR39ahtlB8UtHDJYhKj3+fiYOTUEpQgNRg7aMDInKDvwyxCNJdLWFOZ14ZL UF9arTIR4OHtrQHAIitgeOSB4rDr4ys+3RGuFD8fcdmeIRg7gxwSI9Hg9JeMwTbdpRHf /j4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779982136; x=1780586936; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=NIroeYUMzLe0BDNnaD3zQSeKlegN8RDvvosqpf7rBeg=; b=s+zAuv7fw9Oo6Hs4yn9pCQMUNT6Iyb26+/sgwbYQgPCskKKfELxDwsgElNQ+XaIFAz l46S8/sUvQJDRaLMY7RTAUCO0f5I+dgJIHrbA7nR3O9jPGlY6VsZ0uF7C+X7gA/BbiIj 7C857Svbqf6/zaAABvRcZOhcihjwfX6cSFtpkeZy8Gjdo610LK0oAnI8lPEkqj3O42R7 owEMFVZLxE7WhXY/5Xq4P9qeG5Xv8EvbKVjRP0VvAs7swBrAdfUJ0eqiBlMhjQXTQWLC DPx4GcYSaxp2tiy9zq0h02CZuC9duye+Dphen1UYZuJL7KTJmtYmfBCmjq1Bd24sEDSl CWPA== X-Forwarded-Encrypted: i=1; AFNElJ+h2YyuHm92ZXeagVs4hsDSv92VEGm15fjUJLknATXoqHGpAbxl3FeiF1rQrNdDbPR6cTIvleRQXnFm@nongnu.org X-Gm-Message-State: AOJu0YwpJ4qZpsLZWo4RDcCWGvVYlAKyMot9vZAhFmdqIK658kkY5qiz DGE1tRXSdPePZX5sJEwQZVpVJmloMmEpzJE+XMlAMEJqKuNghndPWAdVtzX99zlzUKp08EP2mEU 5h7/r X-Gm-Gg: Acq92OFfMEMKzHEOw8oTh3sy+qEpEnXahLy/hawY6ZoJi/DSZlY45wZXRMWWxSHU8BY BoMA64RsTPzclJ4i/V+7rfSObjIF87i1Fo6kCtCeKG49i+ZF76YVPmNq7wWI9WoDUziuoT/C2Hp cuObS/ccP/sJGky5+or+qIw/ihHV9yJWBsgWAXD62r9zDLv8/KiMelWUbywKBsmwuBbTIjIbq/h eIT+KIuzJRWFRr7x9burH42d0iBn2xRnd/BuqRj4qAIi90liN3SJoU81Hx1oC+bWcmCjY+wgIkK 4Oeb3k+JRxY5Y1X2juu12pKkk3tGybUWLfnAsLnczovNYPSfh7oCepCnhraa0ufXQuFficu4VDr 3Th/8rsC4qG0n+zndPto7bUWgZ7vxCMLTf9rfdV7D1FhTf9hIeipOwHw70nET7VfilBbsHmkdrv L7J4MdenMedcDZ+ED8F6Yb/cBLD+mQ7FwXOiP0yejaWjFzMEpmZy78uR+DJDFJiGRx8jhKjGVsY iAuFkn3bBAy4DBbxRpugUWgkoOcdbf2sh/MIO/X7w== X-Received: by 2002:a05:600c:3484:b0:490:3d48:6cb9 with SMTP id 5b1f17b1804b1-49094785aeamr33089335e9.3.1779982135732; Thu, 28 May 2026 08:28:55 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/3] hw/dma/omap_dma: Remove unused ifdeffed out code Date: Thu, 28 May 2026 16:28:50 +0100 Message-ID: <20260528152852.3349928-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260528152852.3349928-1-peter.maydell@linaro.org> References: <20260528152852.3349928-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1779982214671158500 The OMAP DMA device includes a lot of code which has been disabled via ifdefs for over a decade. Whatever this unfinished development work was, all knowledge of it is long gone, and we're unlikely to be doing any serious work on this device model in future. If we did, we'd likely have to start from scratch. Remove all the ifdeffed out code. We will fix up the indentation in a followup commit that has only whitespace changes. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/dma/omap_dma.c | 94 ----------------------------------------------- 1 file changed, 94 deletions(-) diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c index b042e7c59c..a93d9ad196 100644 --- a/hw/dma/omap_dma.c +++ b/hw/dma/omap_dma.c @@ -343,9 +343,6 @@ static void omap_dma_transfer_generic(struct soc_dma_ch= _s *dma) struct omap_dma_channel_s *ch =3D dma->opaque; struct omap_dma_reg_set_s *a =3D &ch->active_set; int bytes =3D dma->bytes; -#ifdef MULTI_REQ - uint16_t status =3D ch->status; -#endif =20 do { /* Transfer a single element */ @@ -362,7 +359,6 @@ static void omap_dma_transfer_generic(struct soc_dma_ch= _s *dma) a->dest +=3D a->elem_delta[1]; a->element ++; =20 -#ifndef MULTI_REQ if (a->element =3D=3D a->elements) { /* End of Frame */ a->element =3D 0; @@ -375,78 +371,6 @@ static void omap_dma_transfer_generic(struct soc_dma_c= h_s *dma) ch->cpc =3D a->dest & 0xffff; } } while ((bytes -=3D ch->data_type)); -#else - /* If the channel is element synchronized, deactivate it */ - if (ch->sync && !ch->fs && !ch->bs) - omap_dma_deactivate_channel(s, ch); - - /* If it is the last frame, set the LAST_FRAME interrupt */ - if (a->element =3D=3D 1 && a->frame =3D=3D a->frames - 1) - if (ch->interrupts & LAST_FRAME_INTR) - ch->status |=3D LAST_FRAME_INTR; - - /* If the half of the frame was reached, set the HALF_FRAME - interrupt */ - if (a->element =3D=3D (a->elements >> 1)) - if (ch->interrupts & HALF_FRAME_INTR) - ch->status |=3D HALF_FRAME_INTR; - - if (ch->fs && ch->bs) { - a->pck_element ++; - /* Check if a full packet has been transferred. */ - if (a->pck_element =3D=3D a->pck_elements) { - a->pck_element =3D 0; - - /* Set the END_PKT interrupt */ - if ((ch->interrupts & END_PKT_INTR) && !ch->src_sync) - ch->status |=3D END_PKT_INTR; - - /* If the channel is packet-synchronized, deactivate it */ - if (ch->sync) - omap_dma_deactivate_channel(s, ch); - } - } - - if (a->element =3D=3D a->elements) { - /* End of Frame */ - a->element =3D 0; - a->src +=3D a->frame_delta[0]; - a->dest +=3D a->frame_delta[1]; - a->frame ++; - - /* If the channel is frame synchronized, deactivate it */ - if (ch->sync && ch->fs && !ch->bs) - omap_dma_deactivate_channel(s, ch); - - /* If the channel is async, update cpc */ - if (!ch->sync) - ch->cpc =3D a->dest & 0xffff; - - /* Set the END_FRAME interrupt */ - if (ch->interrupts & END_FRAME_INTR) - ch->status |=3D END_FRAME_INTR; - - if (a->frame =3D=3D a->frames) { - /* End of Block */ - /* Disable the channel */ - - if (!ch->auto_init) - omap_dma_disable_channel(s, ch); - else if (ch->repeat || ch->end_prog) - omap_dma_channel_load(ch); - else { - ch->waiting_end_prog =3D 1; - omap_dma_deactivate_channel(s, ch); - } - - if (ch->interrupts & END_BLOCK_INTR) - ch->status |=3D END_BLOCK_INTR; - } - } - } while (status =3D=3D ch->status && ch->active); - - omap_dma_interrupts_update(s); -#endif } =20 enum { @@ -475,13 +399,6 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_= s *dma) dest_p =3D &s->mpu->port[ch->port[1]]; if ((!ch->constant_fill && !src_p->addr_valid(s->mpu, a->src)) || (!dest_p->addr_valid(s->mpu, a->dest))) { -#if 0 - /* Bus time-out */ - if (ch->interrupts & TIMEOUT_INTR) - ch->status |=3D TIMEOUT_INTR; - omap_dma_deactivate_channel(s, ch); - continue; -#endif printf("%s: Bus time-out in DMA%i operation\n", __func__, dma->num); } @@ -552,11 +469,6 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_= s *dma) =20 /* Set appropriate interrupts and/or deactivate channels */ =20 -#ifdef MULTI_REQ - /* TODO: should all of this only be done if dma->update, and otherwise - * inside omap_dma_transfer_generic below - check what's faster. */ - if (dma->update) { -#endif =20 /* If the channel is element synchronized, deactivate it */ if (min_elems =3D=3D elements[omap_dma_intr_element_sync]) @@ -612,9 +524,7 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s= *dma) =20 /* TODO: check if we really need to update anything here or perhap= s we * can skip part of this. */ -#ifndef MULTI_REQ if (dma->update) { -#endif a->element +=3D min_elems; =20 frames =3D a->element / a->elements; @@ -629,11 +539,7 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_= s *dma) =20 /* TODO: if the destination port is IMIF or EMIFF, set the dir= ty * bits on it. */ -#ifndef MULTI_REQ } -#else - } -#endif =20 omap_dma_interrupts_update(s); } --=20 2.43.0 From nobody Sat May 30 17:33:08 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1779982208; cv=none; d=zohomail.com; s=zohoarc; b=fq0kHzzSzYedLWDODkmUc/05KktyIHPABpdHJ8+xOFjv1U8EJKMNvHisnG6c71ieX7h6JZK4yNdjZZIW1rYsiPlwFNPxdksLfdEaguA4CcSaUd7yBTWWb1OSXAmMA1Kc/zYmDgt9V4Xa9aCk/UUF3Brqr8l17ZPIRBFaaGig3H8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779982208; h=Content-Transfer-Encoding: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:Cc; bh=Ni1ZZ38evYDjUc2aiSCs5aWGdwGPh/14vFb7jqtkHNo=; b=IzbXMRppXaOXg4JerWBH5x7KeNFf5gvsh6HBhlWcde5368DFJ3Vy5jAxxGukswBOlDMhiXxfQqTNDeE0A6tMnlhAZ6YEjzQ2ZYpTyGbVorQdqvM0wSNmp7CrT0wH2sIR6QxllhMC2Exi7/f8+s7XCoU+iLrTFyq5jiDWGFkJiTo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779982208287663.985052001826; Thu, 28 May 2026 08:30:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wScfO-0006uC-Vv; Thu, 28 May 2026 11:29:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wScfN-0006tM-Ec for qemu-devel@nongnu.org; Thu, 28 May 2026 11:29:01 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wScfL-0004T4-3N for qemu-devel@nongnu.org; Thu, 28 May 2026 11:29:01 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-49050ff7cbdso54319595e9.2 for ; Thu, 28 May 2026 08:28:58 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4908b7a70b9sm19116605e9.12.2026.05.28.08.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 08:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779982137; x=1780586937; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ni1ZZ38evYDjUc2aiSCs5aWGdwGPh/14vFb7jqtkHNo=; b=AnDLCzBQDWGcnV/0UUTEQppl19bsjhvE4bla9bhLbYFSJwVOp3K/v6gblAmmz1cmHh /6TE+3sLSN7UtmjEsXEmSYpFAVY0osEBxtFqtXHruVDqtMQfTJkLk5XdE3a6YZ4Ec7Hx RnsSfh/4aaQ2DeplWl2jRnGCblLxg0s0JqvPqkVMVV8g+InGYOo9feWiUvLMztFjFAn/ D7XlsyuJS0R3pzKaau/iM9gt3uGN+Dh6Y6/cm6IxoJI3g+RX6q34Gg3YoF2XeEMoQ5dN zEcOk6cO7HrKaBPx3k71bRq31Bjei64j5Y1ZQ68C8XbtnzW+ZEXuQ7GXhb+HrZ0b9VCW GQzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779982137; x=1780586937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Ni1ZZ38evYDjUc2aiSCs5aWGdwGPh/14vFb7jqtkHNo=; b=qeXtn3aoUjxB60agOvNMMUcyoDOV18aqorISigWQGTGMlDes/c0OErQnwSooHef8N6 5YLv1/D9TzU9Z7T4uX81IOT9pdfP+crHqt0OIXaf61xZYhPuYTgqxooXFnCRGQnL7rr3 hCVXnliDJnHgj5bd7/Fl911ZK5WWiqsaENIKBxSM7E7zEUeMdMSqnvieRW7ewIASQvid xa9WKlZYf6glmRuBliRuFMlKOWA2Ca1cNACWRvRhC/vZ0mqUl0wbXXTiR6OCEQ9TFkL/ EjP7QJ4chN6u3GISDBcIUZqEHnVfSPIEvEQMJWLSVwH6+KyG106OcIGYBgxFJgIGmc97 apZQ== X-Forwarded-Encrypted: i=1; AFNElJ/bItQl2zoTOPkdTF6NN04Yvm6ABdZ1m7eeZuFNLDTPggDeVMtMdi6XJxv7edSxEUI3ot4+6pZdD4ur@nongnu.org X-Gm-Message-State: AOJu0YzDaatca3Ynivq9T8e2S1rJT24gTo3cskVcNvrO2MEprT4iGT20 YkhJrSUICTChs/0iy7q0GEpT03NbDfclU3QpuTZANyPBVFKoYw7T2SbVVAWik4cqtfg= X-Gm-Gg: Acq92OF4svQ0VGFeqllOBtLhoYIbPsxjY9lJVLbCjMdbv5zy6BY2sSNflLVQ9amAAJf atvcEzqKeGFal5vO52Pvzvp4V2HmVsF7KLpF9OOn4kc0YxgGHZXib2kxQYt7p/T9H+NIfbaNS11 3rG7kMLH9XayrifOP7Ab8fTae29fmVk1FM8v37H/nhLYcGRmC6Wbt5dN8XY7d8VtgvnyXecFBrC Nu0BdGJQqKJAVMmsLt1BSXUWHr8WofmfIaKB0c1HveTuMJKoyFjVK1WwJ73rZIQxdNeD9gpCriY X7FtlpbIzfhSuGKiYnGp8MVc66PUPT2LEn0E0JW7wvUSZQEJ9LJioJCXL/I8UM+PRZ+5DNF6CqX g93NOMpZ7DUoT0LNRqHK47nD2oWc+p/faTSy0dIKaXWjsy/ByI/F6QSWYcepvDUh8APh5d/4lCq CvRNVOUscJyjIEu3cLd7pTxB44/orsn9Zlqi8EpS5pm0dShgTQr63gSAX/RUyumwDoH78gSPhBW Z/eFeqyZJceWO+wj2CMeYzs5iwzfPSWC58psU2hEw== X-Received: by 2002:a05:600c:8210:b0:490:4663:691b with SMTP id 5b1f17b1804b1-490466369f4mr452921045e9.7.1779982137526; Thu, 28 May 2026 08:28:57 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/3] hw/dma/omap_dma: Fix coding style in omap_dma_transfer_setup() Date: Thu, 28 May 2026 16:28:51 +0100 Message-ID: <20260528152852.3349928-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260528152852.3349928-1-peter.maydell@linaro.org> References: <20260528152852.3349928-1-peter.maydell@linaro.org> 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1779982210621158500 Content-Type: text/plain; charset="utf-8" We're about to fix indent in a section of the omap_dma_transfer_setup() function, which will make checkpatch complain. Since we're touching the code anyway, fix the uses of if() with no braces and wrongly formatted multiline comments. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/dma/omap_dma.c | 51 ++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c index a93d9ad196..b8bbb707c4 100644 --- a/hw/dma/omap_dma.c +++ b/hw/dma/omap_dma.c @@ -471,49 +471,59 @@ static void omap_dma_transfer_setup(struct soc_dma_ch= _s *dma) =20 =20 /* If the channel is element synchronized, deactivate it */ - if (min_elems =3D=3D elements[omap_dma_intr_element_sync]) + if (min_elems =3D=3D elements[omap_dma_intr_element_sync]) { omap_dma_deactivate_channel(s, ch); + } =20 /* If it is the last frame, set the LAST_FRAME interrupt */ - if (min_elems =3D=3D elements[omap_dma_intr_last_frame]) + if (min_elems =3D=3D elements[omap_dma_intr_last_frame]) { ch->status |=3D LAST_FRAME_INTR; + } =20 - /* If exactly half of the frame was reached, set the HALF_FRAME - interrupt */ - if (min_elems =3D=3D elements[omap_dma_intr_half_frame]) + /* + * If exactly half of the frame was reached, set the HALF_FRAME + * interrupt + */ + if (min_elems =3D=3D elements[omap_dma_intr_half_frame]) { ch->status |=3D HALF_FRAME_INTR; + } =20 /* If a full packet has been transferred, set the END_PKT interrup= t */ - if (min_elems =3D=3D elements[omap_dma_intr_packet]) + if (min_elems =3D=3D elements[omap_dma_intr_packet]) { ch->status |=3D END_PKT_INTR; + } =20 /* If the channel is packet-synchronized, deactivate it */ - if (min_elems =3D=3D elements[omap_dma_intr_packet_sync]) + if (min_elems =3D=3D elements[omap_dma_intr_packet_sync]) { omap_dma_deactivate_channel(s, ch); + } =20 /* If the channel is frame synchronized, deactivate it */ - if (min_elems =3D=3D elements[omap_dma_intr_frame_sync]) + if (min_elems =3D=3D elements[omap_dma_intr_frame_sync]) { omap_dma_deactivate_channel(s, ch); + } =20 /* Set the END_FRAME interrupt */ - if (min_elems =3D=3D elements[omap_dma_intr_frame]) + if (min_elems =3D=3D elements[omap_dma_intr_frame]) { ch->status |=3D END_FRAME_INTR; + } =20 if (min_elems =3D=3D elements[omap_dma_intr_block]) { /* End of Block */ /* Disable the channel */ =20 - if (!ch->auto_init) + if (!ch->auto_init) { omap_dma_disable_channel(s, ch); - else if (ch->repeat || ch->end_prog) + } else if (ch->repeat || ch->end_prog) { omap_dma_channel_load(ch); - else { + } else { ch->waiting_end_prog =3D 1; omap_dma_deactivate_channel(s, ch); } =20 - if (ch->interrupts & END_BLOCK_INTR) + if (ch->interrupts & END_BLOCK_INTR) { ch->status |=3D END_BLOCK_INTR; + } } =20 /* Update packet number */ @@ -522,8 +532,10 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_= s *dma) a->pck_element %=3D a->pck_elements; } =20 - /* TODO: check if we really need to update anything here or perhap= s we - * can skip part of this. */ + /* + * TODO: check if we really need to update anything here or perhap= s we + * can skip part of this. + */ if (dma->update) { a->element +=3D min_elems; =20 @@ -534,11 +546,14 @@ static void omap_dma_transfer_setup(struct soc_dma_ch= _s *dma) a->dest +=3D min_elems * a->elem_delta[1] + frames * a->frame_= delta[1]; =20 /* If the channel is async, update cpc */ - if (!ch->sync && frames) + if (!ch->sync && frames) { ch->cpc =3D a->dest & 0xffff; + } =20 - /* TODO: if the destination port is IMIF or EMIFF, set the dir= ty - * bits on it. */ + /* + * TODO: if the destination port is IMIF or EMIFF, set the dir= ty + * bits on it. + */ } =20 omap_dma_interrupts_update(s); --=20 2.43.0 From nobody Sat May 30 17:33:08 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1779982187; cv=none; d=zohomail.com; s=zohoarc; b=A05819HOruJiL0nQ7rraLFFwYNKX4aqnS389beKsFbaAWgqqgmekMj+wab2Ih3UPEVGd8/bi+IPTMU4uUiP1/nWrSRYsS/wimHg7k13W+gHPuFh/dYuuY5+vGHDf3rtFLFCrLPxhmdrzaEOuub8DElPF++7tr4OjWFES9aIxheg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779982187; h=Content-Transfer-Encoding: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:Cc; bh=2EJwGI7q6G04dldtqGDuhK+ytkl5e4vXy4BHhse+K1Q=; b=fCwAMZPhtn6lLjhLWSct5S/0Ee49hoOxdMdanQEx3NanXU9srsXlwsCf0wfavenVYQAcnU50K5to5RZ4CVEtEOVkijDgqHaG/N2FutJv7ve2bMAPcm/TkiGm9PSStsDg2Y29wNvkmbrvHXKWkfmZ2XZRyiRItUQ0/70MBXgTIHQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779982187022177.68255557948157; Thu, 28 May 2026 08:29:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wScfQ-0006vB-K0; Thu, 28 May 2026 11:29:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wScfO-0006te-0d for qemu-devel@nongnu.org; Thu, 28 May 2026 11:29:02 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wScfM-0004TN-4T for qemu-devel@nongnu.org; Thu, 28 May 2026 11:29:01 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-49048e043e5so52305135e9.1 for ; Thu, 28 May 2026 08:28:59 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4908b7a70b9sm19116605e9.12.2026.05.28.08.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 08:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779982139; x=1780586939; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2EJwGI7q6G04dldtqGDuhK+ytkl5e4vXy4BHhse+K1Q=; b=KEVTFR3VYh1VuaXzeu3U/F7nQEQd4MeUV0xkmJg8uiyF/QsPmsAF9WM10QLFvBnPah Hv6ruYi0aqtpFRWlVV5ao0Z78MVjCjeuLRqXiI/LKzjeBw9L1cDSh3lkzADQshnXvogh pKqqfrG7N1hAfPw9e2xQG9Api7o0XhhQYdHAyHknbfsBJrXlT9vo4Mkc3HTCjh2QTqq3 V95A7iqyzaSojsIQ72auJLYZAwrA/26WuBnYws5exLGYJY7Tl0F/h/bwNQorLaDbvV+V WrVEJL/0pwCVsLZzXzkt9F2K5f/HO0FJaFdtYGZohi+TpWpsQ4ohvUwtJbDZFq54di46 wxmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779982139; x=1780586939; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2EJwGI7q6G04dldtqGDuhK+ytkl5e4vXy4BHhse+K1Q=; b=j9ecdmk7bxfGDgvli+NF6Pl6ZjSYLX997nOH/6IjL6UHEAICOv7ROIGEh74WkJX93Y g3d9vw54cJa9CufmwlPbP3A+Q9RQQ34pxcmDeCyj4foE2KzzSSt9X3V2MD93/mdQh1DR GbXhQ35y/tt9Vo9iiSpdXDt+Ec3mi/HqEZnxEIpiQbGOosfO+th3t4C3GDkP56uxdcZR 0f8Psys+Tc1nd729Nk/rItQBR+e+0e3AqSgJfuiWaFp2qQ4FhC06WCa5Tp3DTul6WCGG XjF+jRyxb8mae/ionuhSMffOcUFrbLCTp3OKYVGTN9em5piDqdL4e5dj7fZEcGn/0+4P tTTw== X-Forwarded-Encrypted: i=1; AFNElJ9mGw1S3qxbv46Zc9zV/HIc6VhwiGnXz0IJkFhqOYr2m003g/y9/o2tiG2HoRkJWTYbMROYrto7WIFw@nongnu.org X-Gm-Message-State: AOJu0Yw0n149THXPTvUD2jAXLpY9EW0JfYdeF/meVKdUP2A27xk1m1cw XI/KHEZ6057LuW/TVTQCe5UluhBptnUNkIrYJE9Wr0y7Cxv/p7M3O349zb0AUBQKHJo= X-Gm-Gg: Acq92OEv6/dkOMfOcjwa4PBAdWUQ/6lh+24W3V+B5NrcIszRR68/+52SPlkwZAREczW CI24uD3eP9CImfip0E8W1WqiIvAqjFWVxdm2pX/btJpVfZbL0+2uOW0ZNWbCWF6o9JpD5pI/bi4 skPJPV67SlTo3OXeS7AhcXV1u8AKLmlH8ImNHfym+/bqon00Glp5BieAJUfrES5VSC2V+Y3RBJC LqtMfpaxdhUz7Z69gPhtqTBQq1IZ0H19IOGTGaMjTzkjEEaljyDnTjG4WHUH7IjsUAWmv42QozG BuY4wA2t0fORVWhngMqK6pNNs0O5jPQoMVMu970D4/vTK+N5By3XoAmuLkeReTL3igMbnKxgDrc gp2DuItKRZJDHP3e/1o4MJphVUIbZ/dSBTkoHka3uTCO+hDKme6BUl5OxxtVe7zQ0wHICZIhVO9 LJMbc/6T6l+KAPr9b0u2+7yixIINGOm5P0QqgOoFy4LBGPYsmGVycHYSvaL1bJuRDLP9X1Jg385 E3JWrhHvvhDGBNpr3zR2gcKkCGuXwvC0sn5ntIAQQ== X-Received: by 2002:a05:600c:1c0b:b0:490:44eb:c1dc with SMTP id 5b1f17b1804b1-49044ebc2e0mr492333825e9.20.1779982138660; Thu, 28 May 2026 08:28:58 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/3] hw/dma/omap_dma: Fix indentation after ifdef removal Date: Thu, 28 May 2026 16:28:52 +0100 Message-ID: <20260528152852.3349928-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260528152852.3349928-1-peter.maydell@linaro.org> References: <20260528152852.3349928-1-peter.maydell@linaro.org> 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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: 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 @linaro.org) X-ZM-MESSAGEID: 1779982191066154100 Content-Type: text/plain; charset="utf-8" Some of the ifdefs in omap_dma_transfer_setup() which we just removed had if() blocks in them. Now that the code inside them is always unconditional it has an extra unnecessary layer of indentation; fix this, as a whitespace only change. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/dma/omap_dma.c | 156 +++++++++++++++++++++++----------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c index b8bbb707c4..668fc49054 100644 --- a/hw/dma/omap_dma.c +++ b/hw/dma/omap_dma.c @@ -470,91 +470,91 @@ static void omap_dma_transfer_setup(struct soc_dma_ch= _s *dma) /* Set appropriate interrupts and/or deactivate channels */ =20 =20 - /* If the channel is element synchronized, deactivate it */ - if (min_elems =3D=3D elements[omap_dma_intr_element_sync]) { + /* If the channel is element synchronized, deactivate it */ + if (min_elems =3D=3D elements[omap_dma_intr_element_sync]) { + omap_dma_deactivate_channel(s, ch); + } + + /* If it is the last frame, set the LAST_FRAME interrupt */ + if (min_elems =3D=3D elements[omap_dma_intr_last_frame]) { + ch->status |=3D LAST_FRAME_INTR; + } + + /* + * If exactly half of the frame was reached, set the HALF_FRAME + * interrupt + */ + if (min_elems =3D=3D elements[omap_dma_intr_half_frame]) { + ch->status |=3D HALF_FRAME_INTR; + } + + /* If a full packet has been transferred, set the END_PKT interrupt */ + if (min_elems =3D=3D elements[omap_dma_intr_packet]) { + ch->status |=3D END_PKT_INTR; + } + + /* If the channel is packet-synchronized, deactivate it */ + if (min_elems =3D=3D elements[omap_dma_intr_packet_sync]) { + omap_dma_deactivate_channel(s, ch); + } + + /* If the channel is frame synchronized, deactivate it */ + if (min_elems =3D=3D elements[omap_dma_intr_frame_sync]) { + omap_dma_deactivate_channel(s, ch); + } + + /* Set the END_FRAME interrupt */ + if (min_elems =3D=3D elements[omap_dma_intr_frame]) { + ch->status |=3D END_FRAME_INTR; + } + + if (min_elems =3D=3D elements[omap_dma_intr_block]) { + /* End of Block */ + /* Disable the channel */ + + if (!ch->auto_init) { + omap_dma_disable_channel(s, ch); + } else if (ch->repeat || ch->end_prog) { + omap_dma_channel_load(ch); + } else { + ch->waiting_end_prog =3D 1; omap_dma_deactivate_channel(s, ch); } =20 - /* If it is the last frame, set the LAST_FRAME interrupt */ - if (min_elems =3D=3D elements[omap_dma_intr_last_frame]) { - ch->status |=3D LAST_FRAME_INTR; + if (ch->interrupts & END_BLOCK_INTR) { + ch->status |=3D END_BLOCK_INTR; + } + } + + /* Update packet number */ + if (ch->fs && ch->bs) { + a->pck_element +=3D min_elems; + a->pck_element %=3D a->pck_elements; + } + + /* + * TODO: check if we really need to update anything here or perhaps we + * can skip part of this. + */ + if (dma->update) { + a->element +=3D min_elems; + + frames =3D a->element / a->elements; + a->element =3D a->element % a->elements; + a->frame +=3D frames; + a->src +=3D min_elems * a->elem_delta[0] + frames * a->frame_delta= [0]; + a->dest +=3D min_elems * a->elem_delta[1] + frames * a->frame_delt= a[1]; + + /* If the channel is async, update cpc */ + if (!ch->sync && frames) { + ch->cpc =3D a->dest & 0xffff; } =20 /* - * If exactly half of the frame was reached, set the HALF_FRAME - * interrupt + * TODO: if the destination port is IMIF or EMIFF, set the dirty + * bits on it. */ - if (min_elems =3D=3D elements[omap_dma_intr_half_frame]) { - ch->status |=3D HALF_FRAME_INTR; - } - - /* If a full packet has been transferred, set the END_PKT interrup= t */ - if (min_elems =3D=3D elements[omap_dma_intr_packet]) { - ch->status |=3D END_PKT_INTR; - } - - /* If the channel is packet-synchronized, deactivate it */ - if (min_elems =3D=3D elements[omap_dma_intr_packet_sync]) { - omap_dma_deactivate_channel(s, ch); - } - - /* If the channel is frame synchronized, deactivate it */ - if (min_elems =3D=3D elements[omap_dma_intr_frame_sync]) { - omap_dma_deactivate_channel(s, ch); - } - - /* Set the END_FRAME interrupt */ - if (min_elems =3D=3D elements[omap_dma_intr_frame]) { - ch->status |=3D END_FRAME_INTR; - } - - if (min_elems =3D=3D elements[omap_dma_intr_block]) { - /* End of Block */ - /* Disable the channel */ - - if (!ch->auto_init) { - omap_dma_disable_channel(s, ch); - } else if (ch->repeat || ch->end_prog) { - omap_dma_channel_load(ch); - } else { - ch->waiting_end_prog =3D 1; - omap_dma_deactivate_channel(s, ch); - } - - if (ch->interrupts & END_BLOCK_INTR) { - ch->status |=3D END_BLOCK_INTR; - } - } - - /* Update packet number */ - if (ch->fs && ch->bs) { - a->pck_element +=3D min_elems; - a->pck_element %=3D a->pck_elements; - } - - /* - * TODO: check if we really need to update anything here or perhap= s we - * can skip part of this. - */ - if (dma->update) { - a->element +=3D min_elems; - - frames =3D a->element / a->elements; - a->element =3D a->element % a->elements; - a->frame +=3D frames; - a->src +=3D min_elems * a->elem_delta[0] + frames * a->frame_d= elta[0]; - a->dest +=3D min_elems * a->elem_delta[1] + frames * a->frame_= delta[1]; - - /* If the channel is async, update cpc */ - if (!ch->sync && frames) { - ch->cpc =3D a->dest & 0xffff; - } - - /* - * TODO: if the destination port is IMIF or EMIFF, set the dir= ty - * bits on it. - */ - } + } =20 omap_dma_interrupts_update(s); } --=20 2.43.0