Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2707009pxb; Mon, 25 Apr 2022 00:03:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4zCd/T7DY8WVIPBFgPYYR6ncLMzGeXs66k106YeJ9qpP2zafHrmCKp3KYYg3coBKbOme+ X-Received: by 2002:a17:906:9b96:b0:6e8:6e4c:8249 with SMTP id dd22-20020a1709069b9600b006e86e4c8249mr14750545ejc.281.1650870215879; Mon, 25 Apr 2022 00:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650870215; cv=none; d=google.com; s=arc-20160816; b=Oe0luTpfnsWq45mItv0nn5iK0EsrCBM1SmdI2jD7ZinkKPinEusX9EXkcXQVeMYsKt iHWFVpPejMfYXF9hk8gPaZ/A7rNIx8IIfnEECU+tEpuw4A6+WyMJI0A8Be2Xj5EZl3yr cGRnY/IZ7F1rR7rkFtJf46ZK+QOA1s+DxBX1QqK5+dDCqThwimClho+Zis9MwLr5iq/1 orqiPtVPyF5yEuJtKi1tfXhm303NmIZDas+mss2bJVmK0T2MLWoqg1kKdHHPtBHBQsFE pYxL/V+QcBXGyk6eXr/BYAja+arIeY3mo5E+3KTtWS5ooD1S/pMGGh07pd1kh0AS9iiL hLYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1sNx2dFK1LGqY/brTI7aHzte6DCU0EKLhJpIwZa9zxM=; b=rhG0DBNKYzhrjXBq+5A7oux0uOzLhkg4TViE3KM7bE5IigglPUKbrU3fvvnuBf8PSV nxKGrg5TPhZp2VaMfAqBACzhUJxG905dqo0KuhxFZMlpJNF2MUDO3nPQlXBqUxAiQA/x OjSHILuct4HKtQpIWIl37WAIImiLg8R1dyd7wVD/4urTOvcRelmEvW4bPvjnYLZUG/3P UV3aTIJJFYgRW0WekT+y0cqYGddrH2EggCr1uX/P49dt6vxSDWBQqhho/CRDmifh5RUh gZKnyTT+b1OsVBm3gN6E7GtcWrams+CLt5VGfTFq5VruRssND4aNMgyvVi9gw9H//tHV Brvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="R7Sd/8g6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020aa7db16000000b00425c727dfcdsi5655623eds.329.2022.04.25.00.03.12; Mon, 25 Apr 2022 00:03:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="R7Sd/8g6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237762AbiDXTIe (ORCPT + 99 others); Sun, 24 Apr 2022 15:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237623AbiDXTHy (ORCPT ); Sun, 24 Apr 2022 15:07:54 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EB3913976C for ; Sun, 24 Apr 2022 12:04:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 768971F40651 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650827092; bh=1ir1kXOoDBYMTq2gw1c/hNFv88UQm29tKUM6x3KBBGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R7Sd/8g6wisG0MKQWWH15F2pNoyiVLXNywLd89VGO9Uukr+u5HLIyoK6QaUzTOkNm OVkAtGNc3EtVY0Z7xLz+l31QsFnrLW3YaqTJKKzNUG+h9IogitxJPL3Dsf9vd0urZ5 u1KZvzycNzgGRfWbAdHVQ2/ER9h2f/XzoW64s/JTQ9bmw1raVE7Y3oNAbvhck98NDM RhjQl3t39MF+NX6wEuRcufv38AZETYdWtzrpG3+v0E9Fg+w00ISXEPqTDa6GHH4UMr 6zIRXtBQxOZZ8o5QhAT8ECsSvOD/HRz8kLMKPdV1rGiotsmQDUcL3E8UtrCN+lwDNx tBWfv3CQuRWxw== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark , Emil Velikov , Robin Murphy , Qiang Yu , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko , Dmitry Osipenko Subject: [PATCH v5 09/17] drm/virtio: Use dev_is_pci() Date: Sun, 24 Apr 2022 22:04:16 +0300 Message-Id: <20220424190424.540501-10-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220424190424.540501-1-dmitry.osipenko@collabora.com> References: <20220424190424.540501-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use common dev_is_pci() helper to replace the strcmp("pci") used by driver. Suggested-by: Robin Murphy Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 0141b7df97ec..0035affc3e59 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -87,7 +87,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev) return PTR_ERR(dev); vdev->priv = dev; - if (!strcmp(vdev->dev.parent->bus->name, "pci")) { + if (dev_is_pci(vdev->dev.parent)) { ret = virtio_gpu_pci_quirk(dev); if (ret) goto err_free; -- 2.35.1