Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp951311iog; Thu, 30 Jun 2022 13:38:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vwvsqiY1hODL0wg6qyRWND3De++ErucPf5EpQu6LiXLyBtwTxVlb+xnj4yy7fYNDNN2xmq X-Received: by 2002:a05:6402:d5e:b0:435:dc14:d457 with SMTP id ec30-20020a0564020d5e00b00435dc14d457mr13951085edb.58.1656621482597; Thu, 30 Jun 2022 13:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656621482; cv=none; d=google.com; s=arc-20160816; b=YXCcipHaLC1MOf2w175RDMwzwY8UT2uLREzC/xngBCBlxRDmeEz6UnpTuLZyFuQSR9 8jE703fax5PJ8NtWV4WIbTNMosEGmgAdjgELFNYRLnW86nu1oICIumtqFd4/RAy+H0YF 8qbwr0QrfudFARbAuP5i+UMQc3k+YnUNUxXySG38L2e68CH6IeRlXtCqxiEI2T5F8KJD MvCwav+/zeYqSc+ehARUeZCjbC65rxfCgUYmFu7x/dDBYrWEAbJsWHkyoZ0T5XMcHKYZ TD2y7yPVbUSyJUjaEIvePRkIjXN2XEuaKKZzEZdImZtN0VLQoKYNP82iPgTwvPUclUT1 850Q== 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=Vfpkl/SgePpSZq8JoRBCdXDcMLYQ2CCYNHgg9/edcac=; b=rWhgORl3slFqtAVfWuus9GcKcFEVyRUF35KuRq2qBSMN4HyrVspbz9Q6Q4k5h75Mo7 oehxYa8wx/HrT/Yw1Ax+mnULDTHUcTqDnA+WWovpfsg3V308gPN5GZBoR8BNXN3NmxSY 5h3mJcz0GwfIFfKkM06HO5+noUSLnYm01ercnK+o2UVvrt4DP+9aO1scrqvIZ+hW+ztq qIdEYdVW13dapRLrN7OAa4N44qLEZdd1DnxsL60mqMBmWZ/pPrb1RgXUEAH8KLRSLod/ cuB/UiTygc0VtKGyHnPX6w5IB/7VIt/MXuQK0lS3uSKeN7Vf/hqt1XBfyZ/ED1T/ccK9 t5kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RJqYssTH; 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 z5-20020a05640240c500b00435c7624e9esi25975246edb.617.2022.06.30.13.37.37; Thu, 30 Jun 2022 13:38:02 -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=RJqYssTH; 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 S237116AbiF3UIS (ORCPT + 99 others); Thu, 30 Jun 2022 16:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237064AbiF3UIE (ORCPT ); Thu, 30 Jun 2022 16:08:04 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1358645074 for ; Thu, 30 Jun 2022 13:08:03 -0700 (PDT) Received: from dimapc.. (109-252-118-164.nat.spd-mgts.ru [109.252.118.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id D9A3F660198F; Thu, 30 Jun 2022 21:08:00 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656619681; bh=OQIxgpoWhcUtchUROpKKlYj3xDQCH7mCn7dt6yTFSNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RJqYssTHloREfETEr4/ELWVlz5ryzUQtRtsMFJ+BXtS78hxmCldhGjv2Ipo5HgsYE Ct5tNVNRiJfTN7OQNyyXTVZ3i9pK1N/a6TVpgICHhIFBxOYWDwStR3CrCjQiU/CV76 yyzZtprEjw9PwR+xpJnr7vAM1Bfm+K5t8kzaNtI7pfOwY3Qfe291Gk3lBE56LNna9B yne5jORmoGDdOebYYXqzp2S7gKSIxyFvRvPIKLYnvNvToO6Uc3Hz/aNgo5a/39s0NO uy683g/KL/cWAUewtjfZC/YxIcOharIs17Au59m8lATHQ7QNlwC2ouUkZZq6YGUfWU GtVfLbcrZ/xBw== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Thomas Zimmermann , Emil Velikov , Robin Murphy , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko , kernel@collabora.com Subject: [PATCH v7 8/9] drm/virtio: Use dev_is_pci() Date: Thu, 30 Jun 2022 23:07:25 +0300 Message-Id: <20220630200726.1884320-9-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220630200726.1884320-1-dmitry.osipenko@collabora.com> References: <20220630200726.1884320-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_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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.36.1