From nobody Mon Feb 9 16:19:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1607732448; cv=none; d=zohomail.com; s=zohoarc; b=NiYhYTc665jsPLafOpgIK1v41r/tMZUaJT6sOQuHsxQH88Pf7dfwG//fCFa3qgvmjQH4okHQXwRGvqYEYWWXDKl/OSVWDgrV3w5LGvdJYWCCLgDJDSTFW1G+SVJtFbmO6hX+VCreojPCHeIP+K/m+kTnOlnEQj+ypA6UzGNl8z4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607732448; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=otGyI9nN7HYyHPl1jamkl/dEV8++zNkKNYJN5ml5WUc=; b=dQjDCvEtFFy3m5XIVGK4ErNB6ULj6fyugwVDgVbHg/jAPTxIStYk4aOPLMbkHtESgLfTHvHCe/Y3IRxaP6Y5r5ccxt44YfawGwnMBzEt0MsXafVX2ar3s6pLREm0OKU6BDKLwmyp4HOeaeHsxIa+m35FiKZW6JApe5Qg7WtL0d8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607732448738276.7651718759016; Fri, 11 Dec 2020 16:20:48 -0800 (PST) Received: from localhost ([::1]:45966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knseV-0005aG-K5 for importer@patchew.org; Fri, 11 Dec 2020 19:20:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knsZe-0002ZN-Bl for qemu-devel@nongnu.org; Fri, 11 Dec 2020 19:15:46 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knsZb-0005cl-IA for qemu-devel@nongnu.org; Fri, 11 Dec 2020 19:15:46 -0500 Received: by mail-wr1-x441.google.com with SMTP id t16so10686683wra.3 for ; Fri, 11 Dec 2020 16:15:43 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id d8sm16306001wmb.11.2020.12.11.16.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 16:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=otGyI9nN7HYyHPl1jamkl/dEV8++zNkKNYJN5ml5WUc=; b=gtfpk4xp3kE049J6nTjEo2fKokcEwjkVZyQJsXocYL+xbHpU59nmru0HePMcS/+jLv Z8yrzQ6zvr8ytBQ9LI45PP/twfO8U8BN36zmVelGWjcQLX4KzkNtP83JBMkR7HIK1sMi WZHlflH5p78mb2zDC9BSTG5dso3YgjNuKXTJpYyRgeV579I2T4rRroHf5RIfQ2QU8i2M zFemYkMg0L4rmnGXyA29pXJFb8xLILBpu/oFMdl8BEihItWL+nfyQkpXJwatmh3+Gwd5 KKkWNa2MUXV6s6nFzExbQyCAf0yNgDAdJiDZu8uR7mnUa/DnD9cp/TSUPadNcuyiIY27 dE6A== 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=otGyI9nN7HYyHPl1jamkl/dEV8++zNkKNYJN5ml5WUc=; b=BLSCUi9mNTO7EKAhZl54klskZAWzyxzwt1Jp+BnLG3DcxXvSuaQq6k743JM8/MaFUq yNp1njsXmzJwPpdKiK706pVaxse3JGQk0p+Z6MJWrpev2IfD3Te0tm87LFjJ9PVOb5q+ KUaXNaMa4zU0XKJBNwwTl4bVjL7Tc8Jcg7WmGSUwZlelZ+nnSJPmxevUlXLRaswWESdU Yo00HsccQ4VN+y6YXHOH1b7tOnMlqb/01tPgC92tUrSBQMM21lK1W0I6sjoYKOTQ9aYS qG+jS/co6k0wvmmJNjxY7JIELbamKcnrMkVyMh0mc1rIyaS3MWxcgFmz0VxffJt7RjTv NqMg== X-Gm-Message-State: AOAM533Bwr22TIH4Q8BkYK7/qgZhcQk83dLEO4bY9HstkxhYuwCSEl1t o6LSyf9mA+0+D9XnWkkJ6P2dktkQI8ithQ== X-Google-Smtp-Source: ABdhPJzFN/r2eYROOAEVr30/k1Pru23Cb6PYpxwq4FL8YPjtCxUdFKP0DtGPRbTFu+Po4yxS0Fz5SQ== X-Received: by 2002:adf:cd8f:: with SMTP id q15mr16028694wrj.79.1607732141592; Fri, 11 Dec 2020 16:15:41 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 1/8] hw/ppc/ppc4xx_devs: Make code style fixes to UIC code Date: Sat, 12 Dec 2020 00:15:30 +0000 Message-Id: <20201212001537.24520-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201212001537.24520-1-peter.maydell@linaro.org> References: <20201212001537.24520-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x441.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E. Iglesias" , qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In a following commit we will move the PPC UIC implementation to its own file in hw/intc. To prevent checkpatch complaining about that code-motion, fix up the minor style issues first. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Tested-by: Edgar E. Iglesias --- hw/ppc/ppc4xx_devs.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index f1651e04d9a..f2f9ca4ffec 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/ppc/ppc4xx_devs.c @@ -105,7 +105,7 @@ struct ppcuic_t { qemu_irq *irqs; }; =20 -static void ppcuic_trigger_irq (ppcuic_t *uic) +static void ppcuic_trigger_irq(ppcuic_t *uic) { uint32_t ir, cr; int start, end, inc, i; @@ -156,26 +156,28 @@ static void ppcuic_trigger_irq (ppcuic_t *uic) } } =20 -static void ppcuic_set_irq (void *opaque, int irq_num, int level) +static void ppcuic_set_irq(void *opaque, int irq_num, int level) { ppcuic_t *uic; uint32_t mask, sr; =20 uic =3D opaque; - mask =3D 1U << (31-irq_num); + mask =3D 1U << (31 - irq_num); LOG_UIC("%s: irq %d level %d uicsr %08" PRIx32 " mask %08" PRIx32 " =3D> %08" PRIx32 " %08" PRIx32 "\n", __func__, irq_num, level, uic->uicsr, mask, uic->uicsr & mask, level << irq_num); - if (irq_num < 0 || irq_num > 31) + if (irq_num < 0 || irq_num > 31) { return; + } sr =3D uic->uicsr; =20 /* Update status register */ if (uic->uictr & mask) { /* Edge sensitive interrupt */ - if (level =3D=3D 1) + if (level =3D=3D 1) { uic->uicsr |=3D mask; + } } else { /* Level sensitive interrupt */ if (level =3D=3D 1) { @@ -188,11 +190,12 @@ static void ppcuic_set_irq (void *opaque, int irq_num= , int level) } LOG_UIC("%s: irq %d level %d sr %" PRIx32 " =3D> " "%08" PRIx32 "\n", __func__, irq_num, level, uic->uicsr, s= r); - if (sr !=3D uic->uicsr) + if (sr !=3D uic->uicsr) { ppcuic_trigger_irq(uic); + } } =20 -static uint32_t dcr_read_uic (void *opaque, int dcrn) +static uint32_t dcr_read_uic(void *opaque, int dcrn) { ppcuic_t *uic; uint32_t ret; @@ -220,13 +223,15 @@ static uint32_t dcr_read_uic (void *opaque, int dcrn) ret =3D uic->uicsr & uic->uicer; break; case DCR_UICVR: - if (!uic->use_vectors) + if (!uic->use_vectors) { goto no_read; + } ret =3D uic->uicvr; break; case DCR_UICVCR: - if (!uic->use_vectors) + if (!uic->use_vectors) { goto no_read; + } ret =3D uic->uicvcr; break; default: @@ -238,7 +243,7 @@ static uint32_t dcr_read_uic (void *opaque, int dcrn) return ret; } =20 -static void dcr_write_uic (void *opaque, int dcrn, uint32_t val) +static void dcr_write_uic(void *opaque, int dcrn, uint32_t val) { ppcuic_t *uic; =20 --=20 2.20.1