Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp39471lfv; Tue, 12 Apr 2022 16:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK7GWlfiUZcxdACBD/OCJGBoxlmx/b0Nuro/VmTc8Rul5suWZcUn1uLDPwXsXcuYtoNTzJ X-Received: by 2002:aa7:8049:0:b0:4fd:bfde:45eb with SMTP id y9-20020aa78049000000b004fdbfde45ebmr40578266pfm.76.1649805758154; Tue, 12 Apr 2022 16:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649805758; cv=none; d=google.com; s=arc-20160816; b=Y//9Ke3jrHTzqIC2PcjzTnPeFkFSJ9xuiVbk5glLG0FoN5e5LZcnk48GxqQMSOzUK9 AjRguAA/BtnoAV4TmFT0mHd3Ywb83T639jXHiYuM8P77Fk9EBYWXj/AVYmx1qR5oeHiV zx9WGw7D2JkatdWUyItwIFeZTkkJzWDAqJ9Ejm74WyVJEj+Bks2s5nBze0f/ejYxElCj PCOn22RS5iR3fgiP3jDHrAxZR+Uk7Mo8gLx3+7HLoDBVKNAzPeaeeOxPi/IBmv2gxE3b ilD2cewCJpZfSlfsrMN0VFivTAbDenIuFG2X+gIb73Xi4+e3aWvybOu9tu+cLkilM6eQ /tRQ== 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=JGnNpld4X396yLgDJlR4uVim6BSmQnypsKKZoQTg7+z5rQLQLvsDrbZA57mKCoaD/H S23huBZtDKBR46ikS7TBw5Cp7WIsOc0bPLqvJDBX7S0cCYk9UeJvPMMS5+s8+xcsHdsV 35bYOsGsZ7fGqFZFmZy/6msnk1KXRE/iIk2nYXAdYfnJSCXPj9mY2qfVbRQztiFHiOM4 tgmAbZS7E6iENAO3mRoqQRaQj5OqQsaVn3QY4u2ehoL+o2bfCkbG2UFVGg+Dw6yWJyhY 6wPw2x8UCJmdrXPRzZP8MJabym/sUEI3TaDTfB9Eswt5/JmNempc0sponnvrZ+h9qf+I ViiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Rq9PS5kC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j15-20020a170902da8f00b00153b2d1649fsi13681246plx.167.2022.04.12.16.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:22:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Rq9PS5kC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 67C0119CCDC; Tue, 12 Apr 2022 14:14:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350375AbiDKWDb (ORCPT + 99 others); Mon, 11 Apr 2022 18:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350395AbiDKWCq (ORCPT ); Mon, 11 Apr 2022 18:02:46 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CE6ABC5 for ; Mon, 11 Apr 2022 15:00:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 36C7E1F43C7E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1649714429; bh=1ir1kXOoDBYMTq2gw1c/hNFv88UQm29tKUM6x3KBBGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rq9PS5kCEv+DC4Qzk/V8M7LTxLVNjUw6NtCNHBxIicMLSquM3gmFjfJ50UFUObwSR phhOp/VgAHafTnQ2Gt8W2HOQ9NO3QwSAmxu6pMAmTb7lJaJ/hb+GBGH7cw0qhRtOML iRpgWEVaWkEPXR3boR8YIMc8RDx0AC4ls7D98mIO39U5aEZPe4zkldxImrOQyjOTOr eNmnv2Q1Z1SYvHOw2py931IbsvaBgk09u0HBXv0vPk4jeowvGaZAnidfg54kRnRc7R vX1cvRPURWlCUw+RuJvXGa3tlFEosHaH6eaAi5fFcX8zmTWWZANfChOdd3KKQORbDs qHt4IAJtAu5QQ== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Gustavo Padovan , Daniel Stone , virtualization@lists.linux-foundation.org, Dmitry Osipenko , Dmitry Osipenko Subject: [PATCH v3 08/15] drm/virtio: Use dev_is_pci() Date: Tue, 12 Apr 2022 00:59:30 +0300 Message-Id: <20220411215937.281655-9-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411215937.281655-1-dmitry.osipenko@collabora.com> References: <20220411215937.281655-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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