Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5180939rwd; Mon, 12 Jun 2023 00:51:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pcXGeb5Qr5B4AAN5Zms88W3pwTwQOeAag8UctqR20iLy+UqXBUX2IflbhXhg5BXKAPASk X-Received: by 2002:a05:6358:cb27:b0:123:3cc5:e6be with SMTP id gr39-20020a056358cb2700b001233cc5e6bemr3059647rwb.9.1686556289572; Mon, 12 Jun 2023 00:51:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686556289; cv=pass; d=google.com; s=arc-20160816; b=tO71FoPAV9guXRlgh6Y7qVeoEWMQWli+Cmip1w/wImyhB7maeDAjEHeS7pqp+FKgVS 14rFJ5JlzkW/0vwnKF2zY7KU8ubJ1PLxxE/WEEun1bQxot4DgvfzSf87mWJilCEvCNfg uZPjwhP5jh4KxA/fj1UpX7KBWCLtceHxUE/rrbwSEQ8hUsF0I5+u0SDff2I6u9eI5fpB P3uT+m/iZoOcy9WbURl5tjeRgltAONtb06piu9e7iQZ38bUVAyGLmAry2H2M9F7UfB3M v2g3f2/qANOTQj9IsU2jucCe02Pd897qNciEcfE0K2KtpCi+17CsjwgX0uGj4tGOuDCE dwtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=FPVJrFtbhZ63iKZ+rMIRF4jllvNfNH2iq/xI5D6TAEA=; b=BpNxYBY8nlK4I/4QFBLaPGK4aNXrkuyiXRTdJOZP9T6wFcGRWexWJMBKIKcVFyW3j4 Y0Vh1i4SjAn0quXdPA0QAMyuT7dWq4mXrqFgI62rgTS+xVR30xjcUJBjpaa362H+PWdD iXyCMZtNV/rRYyMMh+uvDPl27vXBb2w4M3uOadllgK953aUtkapEsEQsJ+dLBmZwvNJm jzAyil5AoEflkMu9rU3OwbszKav6jAdohN0rsMCPRsjuW6LTdTUdRQeqXD9jfbtNlQvd kEgMo+UUn2iOl6QFMGCY3+zWYLqghjJby6r7KxmSuNCHQhBcNTHzDQS0oxv8ZJ+nocsq ra0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=U4K9Z2l6; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a633c42000000b0051b35cb52b2si6430618pgn.565.2023.06.12.00.51.16; Mon, 12 Jun 2023 00:51:29 -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=@vivo.com header.s=selector2 header.b=U4K9Z2l6; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235296AbjFLHoz (ORCPT + 99 others); Mon, 12 Jun 2023 03:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234726AbjFLHok (ORCPT ); Mon, 12 Jun 2023 03:44:40 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20720.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::720]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B673810C4 for ; Mon, 12 Jun 2023 00:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iLxwGKkrY4F8vDei9sZyUMEQVpTbDjE78R59PWV1ZznTKPYef3VXAA0AkPyyQYiNggO/dHGsNwCM6HdKTS8VNt9zkA7Ec0TQJxQRVlMuXcRf5u/m7ohSP+RtSD0dMP67yeFK9ys+XS4eHLGZ4dDWCD1pu6IkyiUa3XIyF4vH1B+ojqGSuRSQSfWavLXWEXBsygXpTxa0WwqqxjzLSP3LDBE5WLV4/ZEdBgIQmrEZB5+yg53Fw+NTO5uzt5KY7DRIev8FxQTS/T38coTHfxXdGewpHpKUgjELaa5EtbBn/fVlr8RPL6uSlUdh7KHTyJcr9Pr9JfndIyETYgimBNQE8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FPVJrFtbhZ63iKZ+rMIRF4jllvNfNH2iq/xI5D6TAEA=; b=AEPiOFmjXQRYiIBYOz0HuqGSWAMSoEWbSnUChQMOZedVOCh2VXWyJ+5V+fIrLeKfQ9YqI/xDgnxNb5KfSCryLj2u1kqn86tZpTRzgcexxneQ5PuadBATO27dUHEr38+UL2+34qevenviRe/fGe2FjSA0NEhdnB4AR772dtxpRDPB0V1vtL/rRUN85+NyAu3cb627nZm1VTnxK0xmmUioNSNg66u7vPmOndr3DpOklamnaLrq/OTYbzoaGXKnx5xtv6oN26tL9Rdipg877HaprceHoZzxP4Qipnw1q3Rtf23xSG7Oa0ZOObBmCt1hxCeJM6I0iHKsZdye3eEfU+drMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FPVJrFtbhZ63iKZ+rMIRF4jllvNfNH2iq/xI5D6TAEA=; b=U4K9Z2l6TQ0gG8Dxn4fKEPDdSwyH7Ewi6hqxT1XFYwEvsVz598b74pUbslyr5h9952cCy7tHc0BbD5CPCZcU+gkf7o2+eCFvJZIOCLUd9bNcK7xuR+YFdu9MSMYmk4kh3crdGcFyM4D2mhhqc4RQVb+s6bSFVa5xjsNDQn3jLrWzs6M7JcuF7jXuTRj9/kAxvhc8+bsImO5lvVmTTeUgFE1ZkirHs6LDQi8vCCKq6C5TY70xj6LuOtepLkXDR8M8YfSk0TNkTpAYidflgQJj8pq0d5/lCq+nYCTrZGYnwc7Ut9dP2DviTPdCyCKQzWJQANN69E4erfgqZUJWPwJLIA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) by KL1PR0601MB4081.apcprd06.prod.outlook.com (2603:1096:820:2e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Mon, 12 Jun 2023 07:00:07 +0000 Received: from TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::f652:a96b:482:409e]) by TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::f652:a96b:482:409e%5]) with mapi id 15.20.6455.030; Mon, 12 Jun 2023 07:00:07 +0000 From: Lu Hongfei To: Felix Kuehling , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org (open list:AMD KFD), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, luhongfei@vivo.com Subject: [PATCH] gpu: drm/amd: Fix the bug in list_for_each_entry() loops Date: Mon, 12 Jun 2023 14:59:54 +0800 Message-Id: <20230612065954.24014-1-luhongfei@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCP286CA0103.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b4::16) To TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6697:EE_|KL1PR0601MB4081:EE_ X-MS-Office365-Filtering-Correlation-Id: 6341cf40-4fa9-462d-6912-08db6b12a7ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uXFljPKZkJQyRq7zLb3ARZ9+lm67RFXM0wZkffHmtY7jsZZTK6zf7TNsifP+8HDNxQWPRdUxJ5UV2v7wHHewyVNIDruzXC4ZqFAD3e9PKqdYf1qB3O/9CaOme9Fam6aq7aNWaHkRPReDjIsPqnywK2lJc2e0AWuXocDsFGXXuHF097V+Rl6sIZb0ubWfju4TlE2evh9NnTHjLzI8u/ipaO3ysQa3docBYKvUzsdiKMez7jKf0O7gfLIJXfyyCIzm7rU/k6BuGW+gH5SUiCwrSeoMIhi8YwUsi7FWAFGl0WHobv98xY6R4jvLJABCp/awWuEHOK7ZObDWH3W7yigvB/fvmH1KwihNeSrvtsqUiXJXi14bt2Rl98/wLb5pG5/tZ+bb8jlrfl+sCJ7zWMhlaSg4JqCQd4l6sQmwWJbn0ROa5a3XMCiAeWLD87iK4BQU0T+n7Hg6e2YxyWcaellPGmE0/KtCoPmbu18tehcffRC8RgHP5Z/1/hdnfK+qP0py3Gka94A5+CcJTJBJqILjveTs+g3UZimcN9S5Vtf6f+f7WrUAlL3a2vPjx3wWLJRWWJQ74zcU1lSzXZmdtSmQdWEaDWUcS8dLwN6iIMXCasDTBXuDKoESD0Kk94EbGhAL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB6697.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(376002)(346002)(396003)(136003)(451199021)(2616005)(83380400001)(921005)(38100700002)(86362001)(38350700002)(36756003)(478600001)(110136005)(4326008)(6486002)(6666004)(8936002)(8676002)(4744005)(2906002)(5660300002)(52116002)(66556008)(66946007)(66476007)(41300700001)(316002)(186003)(107886003)(6506007)(6512007)(1076003)(26005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fPgANkFV8H+khGHfBIRG6Z4FTesLLp6VTtRecNVA2zFflEcE99YkavHpVCOd?= =?us-ascii?Q?GGo6UAPE1V7b3Rpbb9kv4RleEiiY9ps2VrQTS6cjjoV73mT4rRJl3nUce/TJ?= =?us-ascii?Q?wtos1C7ne8qDu/HYk1sszT0v2ElFXpf9hQr0InObe21dFl5f1g3mmF+lyt7Q?= =?us-ascii?Q?uvmU0ZJ2+q5rMxc6YsCWhtX4ERLXGX+igpqKespDEzbzAGpOj3hSz/3AxQNu?= =?us-ascii?Q?hBkzjv2mCDE6z2m3jbCfoBziPauMkmfg/js/xs/yKdFms1cVSX5LK4bu8FTM?= =?us-ascii?Q?eJh0gPag+gjBNE7eQUD3KTvg1e4OVqf9B206tQS6e2uJ/hQT6g8/ayek+LIG?= =?us-ascii?Q?w9m2aJvJRVLgdbwsZqa6giniQooooW266yCujNy7w+3qnaKyt3x4UzNEUpIj?= =?us-ascii?Q?j1er2pSEfbzbMrh6HnaPTgyV36X703QGi2u/KWgoZLdk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vWHe/5sNBLoqRV9AMDrsJKYKkR13sjoVyvQsBKH?= =?us-ascii?Q?VfKJRh9qPedg7g4+YxKjdVifC0RnwvRiGDd4uqfJ+qJ3MDmZS4G0taw0FTfE?= =?us-ascii?Q?ScwPRjxkJ2+kay4VxwRIAz3nEJnyu5lOPq32VSAOv9v4uO7qdj7GMH/k5NRG?= =?us-ascii?Q?XIwHPcLi7svLIjwxLhT68P8wuLqJeudoo8Km7aaMV38tDPOXtH7HeIQwqDfu?= =?us-ascii?Q?bIoneCZfkuKgRTCKp1rlvZdQGkJXmgHAeTlGdEuL?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6341cf40-4fa9-462d-6912-08db6b12a7ca X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6697.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 07:00:07.4261 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7co9VpFAzS9U5Of9XH0o1hOJOSOfKFiOFi3pez65ISIAMjw91/CIHFR0zO1aXV54ETrn1pesNF9bpLl0rJilWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4081 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 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 pqn bound in list_for_each_entry loop will not be null, so there is no need to check whether pqn is NULL or not. We could remove this check. Signed-off-by: Lu Hongfei --- drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c index cd34e7aaead4..10d0cef844f0 --- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c @@ -1097,9 +1097,6 @@ void kfd_dbg_set_enabled_debug_exception_mask(struct kfd_process *target, pqm = &target->pqm; list_for_each_entry(pqn, &pqm->queues, process_queue_list) { - if (!pqn) - continue; - found_mask |= pqn->q->properties.exception_status; } -- 2.39.0