From patchwork Mon May 22 11:50:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1388243vqo; Mon, 22 May 2023 04:56:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Bfgw6/uEBhDKWYeDMxVR/iODR1bFL+BNak3eHFE4o7+iGVHfPIPwhdDcW8jn1lgPzlAAB X-Received: by 2002:a17:902:ecd0:b0:1a1:b3bb:cd5b with SMTP id a16-20020a170902ecd000b001a1b3bbcd5bmr10955800plh.62.1684756581934; Mon, 22 May 2023 04:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756581; cv=none; d=google.com; s=arc-20160816; b=g9hKIKU9G3X+CHdIPb6FK94tJNKHhtXbeM1zsGV+qiOzOldMwCThmbUX2aPSIqPGb/ EbRwH7GZeHMQ8ti/GgjWl3QRwVzdWs9FB0v8O7aDL8miz6Hxi+t6R2O+EUYN8HcTu/6n 3bToHQXBAULVl9T4Vu8TLPMRMczv3dV2d7m3J3aq9ljykw1KpILgHfPvEScSIaro3WU4 vlMX7kpCtta7pDELFtgocQ44ZLTBHXe1ey3Nu8MliGjtt1ygKtP8xjcGsibJlZn3Yc3a jWNIw6SMxkv8F/egqVzQpfwkKqnAfOio94HyEx+t+40SmQqMXSjMzM05AVgsmdZjI9Ya UMqQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=kgLJ402odEJls+8VXr7QgawBCgCxeuPjAylWpEAuh5E=; b=q9oVMCKiuKk2bAiroRRLTGetJfrZsKzMWqpUPCt+AtDtBfb1s7l5jNzzdWrb7lJwmp rK8nuOoQswMSX4tkMvXNenoC27nnvaT4CFCdTrb6g05Gplfew5PcYxK+14JxS8Ca7lWq FYkCUbPvOSTmgp0BcDfVgtdOLaxHChd8BnY3vswlLktEn5+IOg+uL+V9YBeLeSzqEbiY gf5jcl32hn1TsTO8mL37QVUh5VP6Ka5vZXnw0Vx7F4JBcVzvCWChw6NJU15epQCODaLs 2OYxO1wzFMwHaaFMs8LNLw29LbDkjZYjCOYA/dhEEG68zueGvXB4G7fUkowzrK9s/9dG uihw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GK3XkFY9; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a170902b7c500b001a6ade4c8c2si4398681plz.142.2023.05.22.04.56.07; Mon, 22 May 2023 04:56:21 -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=@kernel.org header.s=k20201202 header.b=GK3XkFY9; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233463AbjEVLv3 (ORCPT + 99 others); Mon, 22 May 2023 07:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233466AbjEVLvE (ORCPT ); Mon, 22 May 2023 07:51:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB430E9 for ; Mon, 22 May 2023 04:50:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 735CD61EBF for ; Mon, 22 May 2023 11:50:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83E43C433EF; Mon, 22 May 2023 11:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684756254; bh=QMY8AN4XNoiYR7KoNx0vHC4ZvMlbDMumIpM77gUBNA0=; h=From:To:Cc:Subject:Date:From; b=GK3XkFY9WK12/04J9x0b3YSrR6RHJ/L+5wg0ufR6DXuAdpqSWUuSQwjGUdFvumlqZ wdBgJcTub7mtefoFo68N8eWvIsAXlc9AoKL+lJspLafBF39m/gtQ0tD7mTf7Nl9oL4 K0sTVgQiWpJ+yIJl1eZb8P910WSAASR0KCSHHfnUKE51h+LfMZVnJ5ZEeGCNciOBw3 yIpAIM5CxNENKxj48UNbhB0NZWyAthkw3TiqjeiD2VRDGwYJxO6gED+hPOhFZ0ySJL hipm6EPcOyQErvWkGerPhdCt9nabCvWm+2PBg/T/tFxMuB5+/6B22qbtnIVZmTbIEA y0DxIbKssYkNA== From: Arnd Bergmann To: Evan Quan , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Asad kamal , Lijo Lazar Cc: Arnd Bergmann , Yang Wang , Le Ma , bobzhou , Rajneesh Bhardwaj , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] drm/amd/pm: mark irq functions as 'static' Date: Mon, 22 May 2023 13:50:28 +0200 Message-Id: <20230522115047.1169839-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766595317845107461?= X-GMAIL-MSGID: =?utf-8?q?1766595317845107461?= From: Arnd Bergmann Two newly added functions cause a warning because they lack a prototype: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1328:5: error: no previous prototype for 'smu_v13_0_6_set_irq_state' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_6_ppt.c:1368:5: error: no previous prototype for 'smu_v13_0_6_register_irq_handler' [-Werror=missing-prototypes] They are only used locally, so just mark them static. Fixes: 48b5659cf086 ("drm/amd/pm: Add ih for SMU v13.0.6 thermal throttling") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c index a712b2bf2d25..41b49cc827cd 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c @@ -1325,7 +1325,7 @@ static int smu_v13_0_6_irq_process(struct amdgpu_device *adev, return 0; } -int smu_v13_0_6_set_irq_state(struct amdgpu_device *adev, +static int smu_v13_0_6_set_irq_state(struct amdgpu_device *adev, struct amdgpu_irq_src *source, unsigned tyep, enum amdgpu_interrupt_state state) @@ -1365,7 +1365,7 @@ static const struct amdgpu_irq_src_funcs smu_v13_0_6_irq_funcs = .process = smu_v13_0_6_irq_process, }; -int smu_v13_0_6_register_irq_handler(struct smu_context *smu) +static int smu_v13_0_6_register_irq_handler(struct smu_context *smu) { struct amdgpu_device *adev = smu->adev; struct amdgpu_irq_src *irq_src = &smu->irq_source; From patchwork Mon May 22 11:50:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97345 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1389092vqo; Mon, 22 May 2023 04:58:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5U48Ru4ta6Wg3VjXx39SWHlHKE1anKnDI/bBxDbXhE/wifzONKr7tEwQOlWiM9M7+l7K2/ X-Received: by 2002:a05:6a20:12c1:b0:100:e1f3:9bd2 with SMTP id v1-20020a056a2012c100b00100e1f39bd2mr12011116pzg.40.1684756683553; Mon, 22 May 2023 04:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756683; cv=none; d=google.com; s=arc-20160816; b=LnPmO/9B0FexlhIucOtrO4m9Pvt7/ENn49LYc2YPz28wAuLJyhXO7sL52nG918W56V lZOB4NlEoZXHYNMwxhS0VdnqafOiTk9/CHQU7FkGKN/VrGJsXvt6MvSr/TPuTXzkuK4R 3bT3CyLFzHpLExy5rUPxQb4tb9LsUOmCgSpwXTEyQs5dLQ4qkmtsK5AeG+Np4xMiQhht jwJolK9r3T8tL/mQCjb7Z6855tBxMTzjOsNh1CM2bQ2G+9FPOQSQU0P9gvR/yEUHqC4P 64WOyeh0ZvFhDoX/bvR/kehqJOmnPKIHj+Khbo7P2TvogsvZ0HjkuMSdCar7iBCCqtja NMXA== 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=squugbpR+tTKJqg2YCZToaPBwY3W5OP/uOutqsJZy/g=; b=Bz6BdeAY2esh2hVKTXYnBfABQ9gU70JIq+41D7K0u1nBXQN7paREj8cQaRGbxWRjYs vpjIU4ZNhoEkvog05/3A7gExsJehhkyMTCAAx2z50hHu3uZVb9DGnVr7zppSLOTKVDie 9k2T/Nej6ThH67H0cBA55zKGsg67vji4uyJDFo/c+E/ashZwdqTq9S9RgROUnLPpHRW8 phKta5O2SXpFcJZ5IvPWvTnOBmnZzuoB4TLE/FyWzAh50RNoIrNHtyMmv++hhZfBjG3n IbJBc/wrq/sF33EUnYyVsmJYGztbaPEgtyKOpUPWhCuWA9PlbJOcM9j0kg+dALjWrB0n +o6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mHh8Co7F; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a27-20020a637f1b000000b0051b9a1e823csi53654pgd.137.2023.05.22.04.57.50; Mon, 22 May 2023 04:58:03 -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=@kernel.org header.s=k20201202 header.b=mHh8Co7F; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233483AbjEVLvh (ORCPT + 99 others); Mon, 22 May 2023 07:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbjEVLvS (ORCPT ); Mon, 22 May 2023 07:51:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6422D1A8 for ; Mon, 22 May 2023 04:51:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DD9C5611AC for ; Mon, 22 May 2023 11:51:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 550AAC433A4; Mon, 22 May 2023 11:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684756264; bh=szmrPmHTQLnRtVQcOtk/x9k4n4WQpP8KG9U8nQyW8HE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mHh8Co7FjWQjIRcRi1Dv1AMZ4QS23p4Dzcc5qSVyLgs2GvEFnQHeR2HtI4JHfYo0S yUlj6JHcwUASFNh5a/ZhrJj8mZJD0vSKOWblNid56d1XKirRmIa9YZA0HRm3bh3/nj 9HOd7yEU/cEhwRDTpoTXY00qhqaJYCp45YBnV1p4l5qAjuTe5g3YV2T0E59i0tmJt0 AT50TXu871r/yZ9Ey8iAnJSIE7vHbf7dGTTfXgOnC5Y4lZRAWRJieeU/MAbeTF90kn M+ajfKqdwQYmjU4z7tPH62TeFUltAnUl2lq0VGBDDmfb3lh2pb+SvDvNPNPqsgInYb NA0Mew3LL64Ew== From: Arnd Bergmann To: Felix Kuehling , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Mukul Joshi Cc: Arnd Bergmann , Amber Lin , Le Ma , Lijo Lazar , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] drm/amdkfd: mark local functions as static Date: Mon, 22 May 2023 13:50:29 +0200 Message-Id: <20230522115047.1169839-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org> References: <20230522115047.1169839-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766595424026281288?= X-GMAIL-MSGID: =?utf-8?q?1766595424026281288?= From: Arnd Bergmann The file was newly added and causes some -Wmissing-prototype warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c:57:5: error: no previous prototype for 'kgd_gfx_v9_4_3_hqd_sdma_load' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c:126:5: error: no previous prototype for 'kgd_gfx_v9_4_3_hqd_sdma_dump' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c:163:6: error: no previous prototype for 'kgd_gfx_v9_4_3_hqd_sdma_is_occupied' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c:181:5: error: no previous prototype for 'kgd_gfx_v9_4_3_hqd_sdma_destroy' [-Werror=missing-prototypes] Mark these all as 'static' since there are no outside callers. Fixes: 09a95a85cf3e ("drm/amdkfd: Update SDMA queue management for GFX9.4.3") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c index 81dfbe39fd8e..5b4b7f8b92a5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c @@ -54,7 +54,7 @@ static uint32_t get_sdma_rlc_reg_offset(struct amdgpu_device *adev, return retval; } -int kgd_gfx_v9_4_3_hqd_sdma_load(struct amdgpu_device *adev, void *mqd, +static int kgd_gfx_v9_4_3_hqd_sdma_load(struct amdgpu_device *adev, void *mqd, uint32_t __user *wptr, struct mm_struct *mm) { struct v9_sdma_mqd *m; @@ -123,7 +123,7 @@ int kgd_gfx_v9_4_3_hqd_sdma_load(struct amdgpu_device *adev, void *mqd, return 0; } -int kgd_gfx_v9_4_3_hqd_sdma_dump(struct amdgpu_device *adev, +static int kgd_gfx_v9_4_3_hqd_sdma_dump(struct amdgpu_device *adev, uint32_t engine_id, uint32_t queue_id, uint32_t (**dump)[2], uint32_t *n_regs) { @@ -160,7 +160,7 @@ int kgd_gfx_v9_4_3_hqd_sdma_dump(struct amdgpu_device *adev, return 0; } -bool kgd_gfx_v9_4_3_hqd_sdma_is_occupied(struct amdgpu_device *adev, void *mqd) +static bool kgd_gfx_v9_4_3_hqd_sdma_is_occupied(struct amdgpu_device *adev, void *mqd) { struct v9_sdma_mqd *m; uint32_t sdma_rlc_reg_offset; @@ -178,7 +178,7 @@ bool kgd_gfx_v9_4_3_hqd_sdma_is_occupied(struct amdgpu_device *adev, void *mqd) return false; } -int kgd_gfx_v9_4_3_hqd_sdma_destroy(struct amdgpu_device *adev, void *mqd, +static int kgd_gfx_v9_4_3_hqd_sdma_destroy(struct amdgpu_device *adev, void *mqd, unsigned int utimeout) { struct v9_sdma_mqd *m; From patchwork Mon May 22 11:50:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97330 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1386421vqo; Mon, 22 May 2023 04:52:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5JfKxdyfoBKDSGZflO55uNe1E0GbFVyiC10HSuksF9Y0j8ddhnBTnLyTz7DOSAKvH1Jyeh X-Received: by 2002:a17:902:c944:b0:19f:3d59:e0ac with SMTP id i4-20020a170902c94400b0019f3d59e0acmr14412496pla.44.1684756368468; Mon, 22 May 2023 04:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756368; cv=none; d=google.com; s=arc-20160816; b=Ls30z6/veYiS4COTODTnzqL6g5uY8TJMTUlQ+XUlGa1rMLv7iqvacELcZC5rUDtMnc OV6YRcknu+hkQMVpKAUUAcLmzgFtb/7a71Kcwe1FRYTyQmK1r6+JiPKrW/QCPZTgkNn+ hz/KzOpasFKfsktpGWyygGIZgwW2F5qJ8Gt/p139ayS0sfwT8txAsl/ofx18JpYIlbzP gX+6LpslF8SCVyg8jh+BBkny0msjVio2uPIHkuCyMC/YrYqtyE/SN9k+C1BZVDIxzfsq 0nvOrPLbjRSdGDM8sk3lM/EY5iZEkFKwZ+Mpr9WOXXfOHfefl8F+Nx1Y06IKecMPwPPp avvw== 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=mbTBLNeEdR195q/kgNEGQFCvMASk6VyJQDVeNZXhINc=; b=SWLq3KW2OQ+AZgkXg1N8zzGYfsejMUS3mQyMTp7uesIWL88q16/DduTuwht+4myCgm 7GyFX2Si7Qdvl7yC9h5yWDkWAm+Xk1sYHzrdk2i5a7TnQihsJKgrGThL80IADd3n9aRu 9QAThP0Az1GC4QPRAEKT2qZ8PYTNK9zc3t4iyFBQpEGk/8gfuYgusmEth9tz0mvqGyBS 02vwDzOtYk1h7bz3ul/JJ5i/4d2+RkkYcaJKCdDH2cfSjVdxffC+45ITARbo8tn0NDcP 8hiWSpLXYe1IImuOJRSVuvRI+pChu0F5xX7dRHcFX1rMITLbqCXgzhQvDEoDZYdX1gpL cnsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lEMTC6/q"; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a170902b7c500b001a6ade4c8c2si4398681plz.142.2023.05.22.04.52.33; Mon, 22 May 2023 04:52:48 -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=@kernel.org header.s=k20201202 header.b="lEMTC6/q"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbjEVLvy (ORCPT + 99 others); Mon, 22 May 2023 07:51:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233475AbjEVLvf (ORCPT ); Mon, 22 May 2023 07:51:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11B1F10EF for ; Mon, 22 May 2023 04:51:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6A93161EBF for ; Mon, 22 May 2023 11:51:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5771C4339B; Mon, 22 May 2023 11:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684756272; bh=vmhEzOLeII1TRyTAiOXHuCyCtcRxvOwz/9R88nNsAis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lEMTC6/qCBThkgoM0qf41k3j+222+sxSxyGkBTkUBedmRUg0xmdQLAmGy2jm0TkrI YBLq2FIRjJT/5qy/uPk2+Ujy+TclJCbCFagxEXTO0yaACD2jSIi/gHCqwe6ZLo1hnK 83oXgaDSS0vX1T4IBK/6Mze5tCJtM/gznXkPKfjCKsFKY/FglTrmT3yVhzieeJb2xQ rgBio60K+EU3zmkRCEazMPVWTnzMZa9bFT7r8TXGHKBFStDeryTLJp4VMW61a7QU9W YlyHRszkkNLJgH+QPxPPXDOjRLYA93lX9JGmdr4f0jAr6oSJKIKs9RT6dZT2TtGxDN BcvRuOLn0jMpg== From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Lijo Lazar , James Zhu , Hawking Zhang Cc: Arnd Bergmann , Le Ma , Philip Yang , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] drm/amdgpu:mark aqua_vanjaram_reg_init.c function as static Date: Mon, 22 May 2023 13:50:30 +0200 Message-Id: <20230522115047.1169839-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org> References: <20230522115047.1169839-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766595094058624636?= X-GMAIL-MSGID: =?utf-8?q?1766595094058624636?= From: Arnd Bergmann A few newly added global functions have no prototype, which causes warnings: drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c:169:5: error: no previous prototype for 'aqua_vanjaram_select_scheds' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c:310:5: error: no previous prototype for '__aqua_vanjaram_get_xcc_per_xcp' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c:337:5: error: no previous prototype for '__aqua_vanjaram_get_xcp_ip_info' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c:593:5: error: no previous prototype for 'aqua_vanjaram_get_xcp_ip_details' [-Werror=missing-prototypes] There are no callers from other files, so just mark them as 'static'. Fixes: 5f9f80485953 ("drm/amdgpu: add partition schedule for GC(9, 4, 3)") Fixes: 27614f589fc0 ("drm/amdgpu: Add SOC partition funcs for GC v9.4.3") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c index 68d1a0fc5f5d..a595bb958215 100644 --- a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c +++ b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c @@ -166,7 +166,7 @@ static int aqua_vanjaram_update_partition_sched_list(struct amdgpu_device *adev) return aqua_vanjaram_xcp_sched_list_update(adev); } -int aqua_vanjaram_select_scheds( +static int aqua_vanjaram_select_scheds( struct amdgpu_device *adev, u32 hw_ip, u32 hw_prio, @@ -307,7 +307,7 @@ static int aqua_vanjaram_query_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr) return mode; } -int __aqua_vanjaram_get_xcc_per_xcp(struct amdgpu_xcp_mgr *xcp_mgr, int mode) +static int __aqua_vanjaram_get_xcc_per_xcp(struct amdgpu_xcp_mgr *xcp_mgr, int mode) { int num_xcc, num_xcc_per_xcp = 0; @@ -334,7 +334,7 @@ int __aqua_vanjaram_get_xcc_per_xcp(struct amdgpu_xcp_mgr *xcp_mgr, int mode) return num_xcc_per_xcp; } -int __aqua_vanjaram_get_xcp_ip_info(struct amdgpu_xcp_mgr *xcp_mgr, int xcp_id, +static int __aqua_vanjaram_get_xcp_ip_info(struct amdgpu_xcp_mgr *xcp_mgr, int xcp_id, enum AMDGPU_XCP_IP_BLOCK ip_id, struct amdgpu_xcp_ip *ip) { @@ -590,7 +590,7 @@ static int aqua_vanjaram_get_xcp_mem_id(struct amdgpu_xcp_mgr *xcp_mgr, return r; } -int aqua_vanjaram_get_xcp_ip_details(struct amdgpu_xcp_mgr *xcp_mgr, int xcp_id, +static int aqua_vanjaram_get_xcp_ip_details(struct amdgpu_xcp_mgr *xcp_mgr, int xcp_id, enum AMDGPU_XCP_IP_BLOCK ip_id, struct amdgpu_xcp_ip *ip) { From patchwork Mon May 22 11:50:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97334 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1388116vqo; Mon, 22 May 2023 04:56:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LUQGJc49CDhVyz05fLlJtkPwqTnWM+DV0UxwyuiO7NRICK0k6KWj/YaQTJ6VadxLbXdYG X-Received: by 2002:a05:6a00:f88:b0:64d:2db5:f792 with SMTP id ct8-20020a056a000f8800b0064d2db5f792mr11265807pfb.2.1684756567232; Mon, 22 May 2023 04:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756567; cv=none; d=google.com; s=arc-20160816; b=V5PsA+z+dQIHrETWZtU/FrApOYDeIbM82xp5/cpWWXVZ9dUzBeaWPkH5rljrWEmxXA JwRDH1XvmPdN8Bic2bQ07rzuOi3Ui2bRnlXWHcj3uTWPCgvsX7SBu9bmtIOIcR+RfDGe 7s9CakI2JjZX9fEWILXwMwT8/U/eFcDc3FWaG9Bj7ylyKU+wCqy6eWomSp0J1o7Emtqb 1eTuFnBcxGQvQqVLsjvDae3QsOqj1hCcjggM3DJZU5sFwtMTbHaCxxCpqcSEEGvHJDCT ejsGYVJLdeqF2/ssW5ucu3beNl2NsV7M07rEyVrEbuMfnQhhBOpCWHn13r6g3YvmasLp OKzA== 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=+FX0YKQnSkl+3Eo5BAsijPilUjepYEu0nnKSimylLaQ=; b=ubEh8hOwaF3nmkhwORIIb6uhYBYyEWZtKgZapkn+DrFgE+AAAPt680GmEfQC8iVoUT 9kfnyek9W4uwZX/WRYI5Wf+caADGZe216dstle6hP7VbFtkJ5ooHXSPpEehtRc3PKSkG qYF9dhfBAeAuQbeabnY77bYHAhseYV7o7cWk0LdZcHKUy79y4RXjCb8OhZR4y2NGN+Xy 1YA8u1VOMfzjogUGQB8p1kunv6od6jlopX+HwrFD322n5VQwcBv8epamAMOioYvlijY4 K6sixLPtf2b7KjCHlARy2pp/oECiC68lTQKcLCCyagbtF983/HYTvdPknaEqaNF/Q0zO 6MEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lsvk8ncs; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p188-20020a6229c5000000b0063f2827e1dasi1751pfp.184.2023.05.22.04.55.55; Mon, 22 May 2023 04:56:07 -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=@kernel.org header.s=k20201202 header.b=lsvk8ncs; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233482AbjEVLv7 (ORCPT + 99 others); Mon, 22 May 2023 07:51:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233322AbjEVLvl (ORCPT ); Mon, 22 May 2023 07:51:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C012DA1 for ; Mon, 22 May 2023 04:51:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5DFB3611AC for ; Mon, 22 May 2023 11:51:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE2EBC4339B; Mon, 22 May 2023 11:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684756279; bh=TRV8Ny4PJMXTeyf3oIo1EZT/b+jnBF0oOM2xdHt1ejw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lsvk8ncsJzq6J/GHSZvjZVawAB94qDoWC6ys2sgjuJaP5QNX10ARI3Qp5eL8l1VVq 9MTWkFCzshBJdQfHusdOiTCdXKTM8r2bpRwDXPIp5o81CBHnR6/ZyjbvFoGdENPb+h Wavnsq+Hzzu77LtogSIvbxOdUyf5HySLQRz+dLNHw/X4yHfvVVnWqF0NXPtwUPqJ0y zPN3DV0/8tr3p3U/16CpyXY+q5fUZOcH2FqpFmnKGzBASV/4VVpio4vJ/qU3wkA2RX OLvBYSEXWqIRs7ghJPmG1fGg7DxfPSZMj2dyQlkaLmsPkGAPXM54JGDlAloZWJWvK9 E1a3u8u34pR4Q== From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Felix Kuehling , Rajneesh Bhardwaj , Harish Kasiviswanathan Cc: Arnd Bergmann , Hawking Zhang , Le Ma , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] drm/amdgpu: use %pad format string for dma_addr_t Date: Mon, 22 May 2023 13:50:31 +0200 Message-Id: <20230522115047.1169839-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org> References: <20230522115047.1169839-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766595302171440923?= X-GMAIL-MSGID: =?utf-8?q?1766595302171440923?= From: Arnd Bergmann DMA addresses can be shorter than u64, which results in a broken debug output: drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c: In function 'amdgpu_gart_table_ram_alloc': drivers/gpu/drm/amd/amdgpu/amdgpu.h:41:22: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=] drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:146:9: note: in expansion of macro 'dev_info' 146 | dev_info(adev->dev, "%s dma_addr:%llx\n", __func__, dma_addr); Use the special %pad format string and pass the DMA address by reference. Fixes: d020a29b6b58 ("drm/amdgpu: Allocate GART table in RAM for AMD APU") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index a070adf30c88..73b8cca35bab 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c @@ -143,7 +143,7 @@ int amdgpu_gart_table_ram_alloc(struct amdgpu_device *adev) return -EFAULT; } - dev_info(adev->dev, "%s dma_addr:%llx\n", __func__, dma_addr); + dev_info(adev->dev, "%s dma_addr:%pad\n", __func__, &dma_addr); /* Create SG table */ sg = kmalloc(sizeof(*sg), GFP_KERNEL); if (!sg) { From patchwork Mon May 22 11:50:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1386477vqo; Mon, 22 May 2023 04:52:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4wg/33C+P7spwI/r9ZUmjMdU5nugN33N8Bvpbe2bpBP5LrYjetUNgbqdMGNG6nSlzKWvyw X-Received: by 2002:a05:6a00:1816:b0:64c:ef3a:407f with SMTP id y22-20020a056a00181600b0064cef3a407fmr16124115pfa.29.1684756375866; Mon, 22 May 2023 04:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756375; cv=none; d=google.com; s=arc-20160816; b=Y5YI45Ybjo3jE91lxKzaFpisv8UCNFNnBs02wSRk98B3yt6XH0APPiArrwL6U5xRsY 5QGubv+7/nk9GWpLp7BLDZ5uUfyn7AmhmfIZDHEY2G7ChL328/PlOgGf83BGFFJYgsdv Cjyr/cKcM2y9dD/2hrIoK5WjurfCoTBnwruBc9MRf0ip/YXFbqrdoXvVkVZDDiAMm38T gVIFUJBauDWr0wxvUAa6K+SaUSch2OPixWjEGzyJyM+HKTvdC/017fGoTvBrxOslJkTg c4WEdcWGQw7gSTqP03/ELu2neNVPjXliAY/vJlpNdZJcgNBsaly84Jemf8saUJYtghwd 23uw== 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=Pmqi4P9BI6UlUyGcdgPdN7ZWTj3GQy8jHnmnExOSkxA=; b=ChQLzwU4x+jfJw++NlpeNHWaiVDpFLX+90+W6gJaZuNWQPLOzfqlP7mflMjWB9KyDS s7keplygrINvh5Z7s+Gr5W9nh/hApDfRvVaVlsuI4D7qJZilncW/ENtv5fyJQuJuUNfR Vqpo7qEEO+aNPiX4NQCUoGShzXz8RCmLZq80qTKJnvknexuaoi480MgiLKINJKYScq77 r9qecRhySl8eNhVUka2DauY5YeDTlp2Wiiarh8Cjj1AtQAsvsWJYyU8GPT+B6hg7YN9t eCyCB2sVbjopY1Wolxmf8hDypm2F3FKY8rRZxVkP2n3TEK+OP0aZSwzYgu1THXn/tex/ 750g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VTNepLXJ; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020aa796e9000000b0064d28b68d8fsi355383pfq.94.2023.05.22.04.52.41; Mon, 22 May 2023 04:52: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=@kernel.org header.s=k20201202 header.b=VTNepLXJ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233096AbjEVLwJ (ORCPT + 99 others); Mon, 22 May 2023 07:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbjEVLvs (ORCPT ); Mon, 22 May 2023 07:51:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E64FE6 for ; Mon, 22 May 2023 04:51:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 204336179D for ; Mon, 22 May 2023 11:51:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3408BC4339C; Mon, 22 May 2023 11:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684756287; bh=wsmVaRXDTHdYbuzmc+ErLrw25ByhRTk9OeHIp7wng8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VTNepLXJ+mYAtmR4o5JKpUOvPO1eRVNdd7Bhp2iGfAJip1Q/5PSMSIx0CI+vW2Fp6 Vq/NmHzdGFrnK14KS8GQJrTGU+eG4+EdqOoELESOGtqfl+UPv5KMXTgjdxQ/iZkS5g E8ey02Rhx6A+T41wu2pPHqoRyIMJnbfEt7hfLkwEGfubolT3Wvjgk1cKzLQQjpWfyK Lu2KuvvISEEHKmhr2QpSpVcxQw12jCW5bmFlYtdp6bGb1SoKjW3SiD/Jfny61b9n5Z SpVkb8W7HZi266CLcAGhRx8GH1P9hlVZxTsYxOSTFnvzof4aoe9KXj8mjTtXppwN9v xac9IM03fxpYQ== From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Lijo Lazar , Le Ma Cc: Arnd Bergmann , Tim Huang , Mario Limonciello , Bokun Zhang , Jingyu Wang , Hans de Goede , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] drm/amdgpu: fix acpi build warnings Date: Mon, 22 May 2023 13:50:32 +0200 Message-Id: <20230522115047.1169839-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org> References: <20230522115047.1169839-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766595101525738471?= X-GMAIL-MSGID: =?utf-8?q?1766595101525738471?= From: Arnd Bergmann Two newly introduced functions are in the global namespace but have no prototypes or callers outside of amdgpu_acpi.c, another function is static but only has a caller inside of an #ifdef: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:902:13: error: no previous prototype for 'amdgpu_acpi_get_node_id' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:928:30: error: no previous prototype for 'amdgpu_acpi_get_dev' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: 'amdgpu_acpi_get_numa_info' defined but not used [-Werror=unused-function] Avoid the warnings by marking all of them static and ensuring that the compiler is able to see the callsites. Fixes: c34db97b8217 ("drm/amdgpu: Add API to get numa information of XCC") Fixes: 1f6f659d06e1 ("drm/amdgpu: Store additional numa node information") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 873532c4adbe..1dbcd0e62478 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -899,13 +899,15 @@ static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm) * * Returns ACPI STATUS OK with Node ID on success or the corresponding failure reason */ -acpi_status amdgpu_acpi_get_node_id(acpi_handle handle, +static acpi_status amdgpu_acpi_get_node_id(acpi_handle handle, struct amdgpu_numa_info **numa_info) { -#ifdef CONFIG_ACPI_NUMA u64 pxm; acpi_status status; + if (!IS_ENABLED(CONFIG_ACPI_NUMA)) + return_ACPI_STATUS(AE_NOT_EXIST); + if (!numa_info) return_ACPI_STATUS(AE_ERROR); @@ -920,12 +922,9 @@ acpi_status amdgpu_acpi_get_node_id(acpi_handle handle, return_ACPI_STATUS(AE_ERROR); return_ACPI_STATUS(AE_OK); -#else - return_ACPI_STATUS(AE_NOT_EXIST); -#endif } -struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf) +static struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf) { struct amdgpu_acpi_dev_info *acpi_dev;