From nobody Sat Feb 7 07:41:20 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 ARC-Seal: i=1; a=rsa-sha256; t=1597765665; cv=none; d=zohomail.com; s=zohoarc; b=YDqjUm1t5ofGkL5MQuZ8sbHCGVEtgF7I2qyfeBf5uhjM+QwFZAfmCAEeXWiWmFGu1JVABHFXh/WKOZZ+THHDUGyblRhAVteetUvBj6/FGq3yVy7jF6ufyhMvkv+ZhAcT2QXoSfJginF/oL253CvZyhHM7feSlvminJGN0pJt4zo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597765665; h=Content-Type: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=HBZVH8DbVP87G8OaAytsCzNyqaW3XTQSsMrdJGsu7lU=; b=ZRZ3jwHVtoEsRl2ptW+MDibuQsJ4E2H8flPU1E+8DUoRs2Mtquxx5EuLZfmuRo+MSy9nDQHsfhHkDCrO8poWP33DPkULCiH1IItj4cB8VZKBaMRziZHVQYk4/eueJpue0XtbtwZY/H3KrEI+SJY9ivb9HQNa3QVDT5w241GXz3Q= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597765665248381.3561609818763; Tue, 18 Aug 2020 08:47:45 -0700 (PDT) Received: from localhost ([::1]:43714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k83pv-000145-OK for importer@patchew.org; Tue, 18 Aug 2020 11:47:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k82l0-0006hR-Ra; Tue, 18 Aug 2020 10:38:34 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:35158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k82kz-0002z7-4W; Tue, 18 Aug 2020 10:38:34 -0400 Received: by mail-wm1-x344.google.com with SMTP id 184so17254393wmb.0; Tue, 18 Aug 2020 07:38:32 -0700 (PDT) Received: from localhost.localdomain (121.red-81-40-121.staticip.rima-tde.net. [81.40.121.121]) by smtp.gmail.com with ESMTPSA id z8sm139177wmf.42.2020.08.18.07.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 07:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HBZVH8DbVP87G8OaAytsCzNyqaW3XTQSsMrdJGsu7lU=; b=DAG1SOSgzbawLFIyLqQg+HKeKRdOSXKBIsnafrvB5VE82XeY1NItAkJ07Db8Wd72xX 8KHbBHMYAepStJUVH1AeAgu20ULsvWl8Jg4pj2vmlzIDsH/QqxlqHm/xqj1unu2Yz6sS c9cT+HHq2DdOXNe3vhrGgY727CsPe2qXgZgiigibSDPHS0LxiwSlMiOaNqNKr/IeOY57 Q8rbvNGWTub4diRI3oKJ2HAx39FA5LFGqifAQjvGG1Xqy6bMSr57OB7O4zEE6A4Oi29a CGkikf8OxYLhKWm6puKoiiGTp9Ch1VNPQCAKVJtRN8swgTOkzM8q+30uMNjf8nyNzuOp aUJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HBZVH8DbVP87G8OaAytsCzNyqaW3XTQSsMrdJGsu7lU=; b=gxcdXkpW2DVQbV30fEachprr/eaDWG00cxG3ualsZ78Hjdw28qpmCB2lpDqOgAnk5+ +jgNtT494CnLQ/wFKtyrfpXGn7F73W6hIwY/BiSxw3fqW1ahUZOIJF+6uHROdMGPPAjV XzaQ4a8QihTQTmgIbGsPEOZ3dAFWuqRGCoem0Kb6Brho/YEf3ZwqNS+0Tz71B6tGXLA3 UfHRtvEvaTMkQPTZcpYAR9sERRKVAXMuAs422IBSXF+nzLJFBRnE5pKfYMFw5fgPp05F XHXOFMThupis66PlFwqH4EVslK6EnX2KFraJZ/hdPmL2SUnw3bDl4qBWkwsbWlHbqhTQ E9jQ== X-Gm-Message-State: AOAM533ivht/dUYmK6pVrAS/Zxv75rdqpdIV5aXe0OAj7bXrDd3g6y5N 9jIPPWzzTPCiOR0kuA3l20B9smVlNBU= X-Google-Smtp-Source: ABdhPJzeATk3WZykFmKe/Kx+k1ecCKzD6QnmiAlprd2fKDp2brjhbVf69J6rHzTFJzQVDBO3GwP9kA== X-Received: by 2002:a1c:b787:: with SMTP id h129mr220955wmf.93.1597761510886; Tue, 18 Aug 2020 07:38:30 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/2] hw/core/sysbus: Make sysbus_pass_irq() arguments self-describing Date: Tue, 18 Aug 2020 16:38:25 +0200 Message-Id: <20200818143825.691110-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200818143825.691110-1-f4bug@amsat.org> References: <20200818143825.691110-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Make the direction sysbus_pass_irq() pass the GPIOs more obvious by renaming its arguments as 'from_dev' and 'to_dev'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/sysbus.h | 7 ++++++- hw/core/sysbus.c | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index da9f85c58ce..65de6f6b062 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -73,7 +73,12 @@ typedef void FindSysbusDeviceFunc(SysBusDevice *sbdev, v= oid *opaque); void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory); MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n); void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p); -void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target); +/** + * sysbus_pass_irq: Pass through IRQ/GPIO lines from one to another device + * @to_dev: Device which needs to expose IRQ/GPIO lines + * @from_dev: Device which has the IRQ/GPIO lines + */ +void sysbus_pass_irq(SysBusDevice *to_dev, SysBusDevice *from_dev); void sysbus_init_ioports(SysBusDevice *dev, uint32_t ioport, uint32_t size= ); =20 =20 diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 70239b7e7d0..bc23a66b5c5 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -181,10 +181,9 @@ void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p) qdev_init_gpio_out_named(DEVICE(dev), p, SYSBUS_DEVICE_GPIO_IRQ, 1); } =20 -/* Pass IRQs from a target device. */ -void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target) +void sysbus_pass_irq(SysBusDevice *to_dev, SysBusDevice *from_dev) { - qdev_pass_gpios(DEVICE(target), DEVICE(dev), SYSBUS_DEVICE_GPIO_IRQ); + qdev_pass_gpios(DEVICE(from_dev), DEVICE(to_dev), SYSBUS_DEVICE_GPIO_I= RQ); } =20 void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory) --=20 2.26.2