Message ID | 20250112221726.30206-7-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1178246wrc; Sun, 12 Jan 2025 14:18:25 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXH+3+D6bAS+DBUUKqHyAJFGvQyVANdaOAxLTED8gmIXN5Uo+KE016pOs1R8bk+TeSQsG0IBA==@linaro.org X-Google-Smtp-Source: AGHT+IHc+fPt3ukgh0MOQSzbLnaDRLZJpN8ZNy8NW165ZuqK3EFJX3RH+m5TYiisA0hV7eDXeDH6 X-Received: by 2002:a05:620a:43a2:b0:7b6:d6cb:8b99 with SMTP id af79cd13be357-7bcd961a66dmr2783645785a.0.1736720305174; Sun, 12 Jan 2025 14:18:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736720305; cv=none; d=google.com; s=arc-20240605; b=GVIEjHsaIG4RoD5LEKNEW3VFb0vZxxIjo48uqYDp9nYtmC8QFB3TtjN4X2QVYNOc53 KYbmTef+7ANoSO0yfVpGmZF7zxn4ypqXQzq15LvGusX2BUWpU2gzWm2vXazOYFeQ5XTF sNmmAIBXwcroTqvpWzFr4onntJk0sfjKUhCMgpCaYO2h1CbIuYhgBeK7pHT14CVwTVI7 S6adYp8cTsJ+96LhjfSY8yx0jebjjbtEeVb4TlpjKYGsjWxv9JE+RZtGrJ9f1BUXKw4o UMNwa6zvjB9oqQvRmTWRodJTRvcdP9eyDcv7Ys9z+biYbYzfbGlyrwjphus29iRQlskd 7QiA== 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=mFVPbF7stzQL/SqDLEkr/HWvwoJrRGJFOJxTEnGaiiQ=; fh=50e5w3+W6SHHNE+06M/ShWWkYgFcpUwndl6hLiFb1X0=; b=gN0RU/49WfCPf8ui8AbwaPFX/0sohaPaSogcvzjV9cmhIdBCV+gIf6E1pv7tMnrOtP OWLgOp2BwoirSxHKDWzT1C+1+zR0Z4OQwZhGKHmN4q7ldpz0yIdBXzgd/p4aqz60b7Gl OpiIBJbpGJcpN/f67EBiuXuDbUWnAlJzN8o6L9wY8BXTxtezEpmYAwgFSMRVWphIinB1 4asiCod5QACtEBjxL3TPO+U60YZTssTrYRSY2klX6Wwl52t+JI5pdFNdTjs3/2jsgLFK RBkv1afycTsybMqe3JdAa0WQtroRZWrvxL1ePoOjdTD0+e2bbRVIm+az6lhLUp4Q70xh Ec8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dw27Pdc1; 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=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7bce322a383si920994685a.8.2025.01.12.14.18.25 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2025 14:18: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=@linaro.org header.s=google header.b=Dw27Pdc1; 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=NONE dis=NONE) header.from=linaro.org; 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 <qemu-devel-bounces@nongnu.org>) id 1tX6Ha-0007Wa-Kz; Sun, 12 Jan 2025 17:18:10 -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 <philmd@linaro.org>) id 1tX6HX-0007Ut-BB for qemu-devel@nongnu.org; Sun, 12 Jan 2025 17:18:07 -0500 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 <philmd@linaro.org>) id 1tX6HU-0006Pp-A9 for qemu-devel@nongnu.org; Sun, 12 Jan 2025 17:18:06 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so35916795e9.1 for <qemu-devel@nongnu.org>; Sun, 12 Jan 2025 14:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736720279; x=1737325079; 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=mFVPbF7stzQL/SqDLEkr/HWvwoJrRGJFOJxTEnGaiiQ=; b=Dw27Pdc1FVbZJcdQb2BULqpE+4etAfeMYvNaUz0dX2mCmYD7/3GGRRhDXHfAEotx4H yY59bi5ALHS63H1cPncAPCJ6GORXVSkv1hTj5YsevWVYG0ynXlcSvCdNQ0Gax/OYFnph bNHNivPiKaVFDYeFg+FBzO+1Y+H4BlSjeRIyrncPMkTkPiT5N2BLmU+Al0N5LPixaZo8 4b7c+Ty3YVo/XMmjc13jC7sP3lBtDXMaFsDiFsIRkXBVZUGVPjguMBDlgyNa1zLAI4aT k9fUeULqhl4BmD3e7RSZ7K85SGoJHe9WVClVz7Zfe/pTpusD15yzJJ5C8PKKUzM91NO9 1DQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736720279; x=1737325079; 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=mFVPbF7stzQL/SqDLEkr/HWvwoJrRGJFOJxTEnGaiiQ=; b=YVwwW29Lf8FXyR/eJnxsfua+hHXE+1iCGO640nm5YMAr3SOgtPfyzrx2dfrFt4ym07 TeAiJUCjLSOoPpuAHxykpc1YQXGogtAdZ89xa4WOfkUUOms0G7/kf9IeYU1Ib6EhV7qo eKXAqUliIB5KlzzszKHFfmYpjPvKklv6QfUBisR4eoxqMctmKGfWZE8JgpS1KG6qdIzY u970P8oz9Ix9FpS/Z14MyHxjoWz+ktikYhFXjZ9uW828r5TKZqKS0ImNF29Rqb84YvSs GjR7YY1slFUvUlnh5COrbnuyMoZFebWVy1GKvRw9VKuZ9QW6x3gPaBS4twoaaTEuEIO2 gx3g== X-Gm-Message-State: AOJu0YxKVIytNyqg2MK+N1uPpx+b8Dl0ViBImCMD4A7yIq5Hu9Mx1Owb EM8cGVY3ylz6f5Z1ztUleLYJBkiXe09NL8YuEkzKS+NT7k4m9TXfVwhPPZSGT7xujUqBrhGaipr 73SI= X-Gm-Gg: ASbGncsqF0hriVZAuF+rVsruEfTIpbrM6dbRQVmY9PxU/mdypnka4BrWUN5TLSAyq/W 97hdQ2d/9hcsSPo4P+5SyJ/kk1ofHhMZsakSsEMgreUP7jOhWLxnBtCUObUGtagOiK+B017E+Nn Bnov8Byakzg0J1F+kb+0Fu0EiXhq1yuqStKcUrN/VtvgirPKTXP9reooL1gQLrETb/uh25aUwl7 uh2jfCdBKoVqoAINsD9E39gXxaoadmm3JLpouA5OLupg35rzjuuecOSToJS4J5FN5PF4K+o3Pa3 IyNJonBG4Xv+7Y13ySJ84QEutaPu3ls= X-Received: by 2002:a05:600c:138d:b0:431:44f6:566f with SMTP id 5b1f17b1804b1-436e26c4a1amr161949855e9.13.1736720279176; Sun, 12 Jan 2025 14:17:59 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e37d154sm10823837f8f.10.2025.01.12.14.17.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Jan 2025 14:17:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Zhao Liu <zhao1.liu@intel.com> Subject: [PULL 06/49] hw/usb: Inline usb_new() Date: Sun, 12 Jan 2025 23:16:42 +0100 Message-ID: <20250112221726.30206-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250112221726.30206-1-philmd@linaro.org> References: <20250112221726.30206-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@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=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-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/49] pc-bios/meson.build: Silent unuseful DTC warnings
|
expand
|
diff --git a/include/hw/usb.h b/include/hw/usb.h index bb778cb844b..e410693d0c6 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -579,11 +579,6 @@ void usb_pcap_init(FILE *fp); void usb_pcap_ctrl(USBPacket *p, bool setup); void usb_pcap_data(USBPacket *p, bool setup); -static inline USBDevice *usb_new(const char *name) -{ - return USB_DEVICE(qdev_new(name)); -} - static inline bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp) { return qdev_realize_and_unref(&dev->qdev, &bus->qbus, errp); @@ -591,7 +586,7 @@ static inline bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **er static inline USBDevice *usb_create_simple(USBBus *bus, const char *name) { - USBDevice *dev = usb_new(name); + USBDevice *dev = USB_DEVICE(qdev_new(name)); usb_realize_and_unref(dev, bus, &error_abort); return dev; diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 7e7deaadcaf..f45b82c776d 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -662,7 +662,8 @@ USBDevice *usbdevice_create(const char *driver) return NULL; } - dev = f->usbdevice_init ? f->usbdevice_init() : usb_new(f->name); + dev = f->usbdevice_init ? f->usbdevice_init() + : USB_DEVICE(qdev_new(f->name)); if (!dev) { error_report("Failed to create USB device '%s'", f->name); return NULL; diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index a0821db902f..aa50a92e26f 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -624,7 +624,7 @@ static USBDevice *usb_braille_init(void) return NULL; } - dev = usb_new("usb-braille"); + dev = USB_DEVICE(qdev_new("usb-braille")); qdev_prop_set_chr(&dev->qdev, "chardev", cdrv); return dev; }