Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1625856yba; Thu, 25 Apr 2019 03:03:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrRxfe14P8HPfWsiiKwpTC208OqNhI9gmWIBZcoK/VH3dmK9oSfw5yredGBEeHUHXpsBcP X-Received: by 2002:a17:902:e490:: with SMTP id cj16mr38480900plb.156.1556186608859; Thu, 25 Apr 2019 03:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556186608; cv=none; d=google.com; s=arc-20160816; b=BUol4KwzmhjRJW2QT311LcE9qUXFspiY+WRGELNis6sWC2hHXnDhVxJ4K/hpZFs6oj hKeP+NnrySCuiPolmV1OFfhGL09ItF7o5lCQR56V38qxbLFrfOMUo/21clh9KPUPq7WK X045coG7DjEktSGDfVEtt+38H+tdOrzGlBshIeZXRzEHY4T0Ox4V9GOaSebP8lPSDtq+ zp0nZ7HAJuXSBEiP8mk3/DYtG0LYU92R40ZLqNEQNTfbI0ctw6NE8qiuKaVA1RxUtVls So1gCM7+MMI44Ysvz4cJjK15pkz7MQcghdtnYbTJwcqGumRv5T48ctSdvm8K0/Q1KDpb l3zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=JGOU3ia6g6f+mcCeqoj5rUs2fETF3ERMMj8iqSjiOI4=; b=Ktk/Rd+SycRCac4PxLlngu2eOSbhIjY1QjXPuIxjdIq3nVpSD2b3Ig5v3kXjjsOQBx MYhUjqq1OipDRt9lJxaOdReF4fIgcsFs56qSpSYLUHINSg4hd5BwzA860G3uBRdIDa3y snoqfaEbxMf0IADrKOxSM5wCVF2jdOENzzelXvEgQoFV0Y5AIea3lebgS3vwIavVtY8g jG2Zsq+TMuDhztYiNE2L1BaGh1YBBDMmpgtKURdZIa/5dOihh6qtNXe8link9SPoSC78 H3PVaDlHaQaHOIiHWV12L89lFP6oWvGqyGuxGyTt4VqoVNLZB/rXt7SkjF/TDo8k+t3A SB6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N+WDYEss; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si21534896plr.69.2019.04.25.03.03.13; Thu, 25 Apr 2019 03:03:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N+WDYEss; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389463AbfDXTRz (ORCPT + 99 others); Wed, 24 Apr 2019 15:17:55 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45233 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388804AbfDXTRv (ORCPT ); Wed, 24 Apr 2019 15:17:51 -0400 Received: by mail-wr1-f65.google.com with SMTP id s15so26645154wra.12; Wed, 24 Apr 2019 12:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JGOU3ia6g6f+mcCeqoj5rUs2fETF3ERMMj8iqSjiOI4=; b=N+WDYEss0BjujrTkoVQFmlZMauTQnxRdnQZfZb7Pj5loUGC4okCuuv16tnp3aMqup9 iAjLrSNm+TMJmHj3YYK9T/bwzZxTQKmGcK/m44oWL5evBfcPwpv2eoAi9aqBLRf40l7b ZsYLe15al+e+C0axyxR8ts7wuFEGb5+V5SLcItizyuxglNbmNpn9ZJIUpYxtl2BnxfHM cMMEPrEFkthMa9Qfs8gl42cjef5Z4uJaPHZZ7LyHX/GXlTmyzP2/mOIFXaU55f72KVC6 ZxazwPCP9QGXRTy/D2w8I7pZ0CJEwXBPsTEPewxOtZegukdlOLsrv1x21Y+4zxQftilz SuZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JGOU3ia6g6f+mcCeqoj5rUs2fETF3ERMMj8iqSjiOI4=; b=ottKrKoKA45P0LiCtkzJvzupwwVMPRtfFixdPt773nqqWX+L/7tlpFL50IwdhvAPSt JqcgsEZV3ZJ9UNe9iSxeuus+8KET4+sQPI4mJBCjFmIyZcqMkHQ0FmPnffk0F65UJySb jI3RoQepvjtgWJeDs80MJib+OxHDfPz0iiSZrDBUtk3iD7DJivnkiHVDQpZH5H5YFCdL 9lJO+PWz0H3wGptl+ouWrdPpOmVnGM2wWyxsP4sSs6nXvWVeDse5rcEt7DIyZ3aYPyxd K3/Yr8GoosllnURi5uYGCojjhmHDlQ9u3nTzA+8yfi1Oy0Tx8DEkod4hdBzUZspdR8rm qD5w== X-Gm-Message-State: APjAAAWIJ7BADDkdG3hL2knt+VSYbSy2wzl4KlrRQql4g0cZHR6fy9Rk nx2eeUSuojMQA2Yf21qd9Fe/9BvQv7c6vQ== X-Received: by 2002:a5d:52ce:: with SMTP id r14mr23877569wrv.224.1556133468924; Wed, 24 Apr 2019 12:17:48 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5? (p200300EA8BD45700C498EE8FFF0A13E5.dip0.t-ipconnect.de. [2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5]) by smtp.googlemail.com with ESMTPSA id s7sm3419954wrn.84.2019.04.24.12.17.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 12:17:48 -0700 (PDT) Subject: [PATCH v2 5/9] drm/amdkfd: use helper pci_dev_id From: Heiner Kallweit To: Benjamin Herrenschmidt , Michael Ellerman , Oded Gabbay , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Joerg Roedel , David Woodhouse , Realtek linux nic maintainers , "David S. Miller" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Benson Leung , Enric Balletbo i Serra , Stephen Rothwell , Paul Mackerras Cc: open list , "open list:AMD KFD" , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:AMD IOMMU (AMD-VI)" , "open list:8169 10/100/1000 GIGABIT ETHERNET DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "moderated list:ARM/STM32 ARCHITECTURE" , "open list:PCI SUBSYSTEM" References: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Message-ID: <50613002-d5a2-2522-b183-4ab156686fce@gmail.com> Date: Wed, 24 Apr 2019 21:14:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index 2cb09e088..769dbc7be 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c @@ -1272,8 +1272,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu) dev->node_props.vendor_id = gpu->pdev->vendor; dev->node_props.device_id = gpu->pdev->device; - dev->node_props.location_id = PCI_DEVID(gpu->pdev->bus->number, - gpu->pdev->devfn); + dev->node_props.location_id = pci_dev_id(gpu->pdev); dev->node_props.max_engine_clk_fcompute = amdgpu_amdkfd_get_max_engine_clock_in_mhz(dev->gpu->kgd); dev->node_props.max_engine_clk_ccompute = -- 2.21.0