Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2492859pxb; Mon, 18 Apr 2022 01:11:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaAcmr7RBJ8KnUzlG+52sgDmlflu0iTwtbm2o3GbKKEFZuIki1gwWbUXYv9rJOochZ2xSk X-Received: by 2002:a17:906:478e:b0:6db:7c67:c7e0 with SMTP id cw14-20020a170906478e00b006db7c67c7e0mr7940184ejc.335.1650269515401; Mon, 18 Apr 2022 01:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650269515; cv=none; d=google.com; s=arc-20160816; b=NEWBWhvxuiqhJ1M1yx5zXXrlMiPX8JQsvCh9/Sl10OeZSpIe/3BjGBYcmagCjD0oxU bPZ94Q83yiEM524l0zMQf43elMqQngzRaq590GWLJrYvT9MSynwXaFc/sOl30Oql93vm fW+7Fwq0EOFKcnZxRc1cIuBjClsKF82sWVTY4fSo5LambxRg499PVkvNoQ3G/zV+/l4Y okB7ahYrLctP+SS8PVSeNiXTw5Y9L2W2hscCan0ZNkRF5enAF/2bRn/ytd5iey7a84DS 2QBFk2j/I0nBh/94AvSaa5HVEOIe2TPOgWINb9PBXI1w+Rhm9BJfJLXI92nMtNE+Ut4w OwWw== 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=ZJUuKiGavH3DLUTBra9ep1gTxVJh14brjk9lWjZpZkZt8e5hrIpsEGEnEgsKsjc25a qdWWqPVHwDmYvmRtCKU1rV4aA+/l2Gp43ADwZyZOt82EhY2L9AThhh8rQHxjf8jbtJSE XKH9s4bEyOsBPmrCXiUgHdaNiE9IbVMz8qxYb9s3oF7pBlj0K357IlOrwOmq8kyHgTfa Nmn4RLcn1jVxoKMPhDWE5As8ic0WrWXsIu5OqYCO82Jo1QIRcw/d6+8sxGuTXdGffh9o PMrMLnq+JzKg8Up4ro5SeHyap2vlEtibpx1+Ilv2Mwwj/1rbZ95jcirZH4IIp/TIKdI8 wTZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Hea1EvPZ; 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 n1-20020aa7d041000000b00418c2b5bda3si5223170edo.133.2022.04.18.01.11.28; Mon, 18 Apr 2022 01:11:55 -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=Hea1EvPZ; 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 S235243AbiDQWke (ORCPT + 99 others); Sun, 17 Apr 2022 18:40:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235195AbiDQWkT (ORCPT ); Sun, 17 Apr 2022 18:40:19 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 531A71706F for ; Sun, 17 Apr 2022 15:37:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 7B73D1F40EAA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650235062; bh=1ir1kXOoDBYMTq2gw1c/hNFv88UQm29tKUM6x3KBBGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hea1EvPZUMcEaDCrh7oNSCd6BUH9Ahes2H0SWknm39s8kYQm5qNtTGJonYei0/jjr 3VplLfEpBM1Em8Im+zYVaUK3gS7ECtwqIsbDKBydkwaI4rA0MRhzcSVCCpdvFyzqe5 HYFKv1EzPs2L9mFTskpTrsR8V+IucPcXifyatoqf8b3GvjtrfRXPCwn5ip6OmN7o6s HlzGRFb08p6N11BxqbqWICdBssB6G7qDFPS3YOCKRHcWoYVQaoCbiJ/tqXTBL2Z1Qi zqMUjTDHWHlXeGEn2fGB0PsYvmqZZqXkJfeWXYT8H1RFu9cGzLt11TAqw5D1N7Nb8s FlYjM5K5yRHtA== 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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko , Dmitry Osipenko Subject: [PATCH v4 08/15] drm/virtio: Use dev_is_pci() Date: Mon, 18 Apr 2022 01:37:00 +0300 Message-Id: <20220417223707.157113-9-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220417223707.157113-1-dmitry.osipenko@collabora.com> References: <20220417223707.157113-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, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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