Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp52516imn; Mon, 25 Jul 2022 09:58:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toCN0IapZjv02oiuhhR2sbOMnbY/Ty7QdFPe6SsG0VXxki6BSGX10+ItEfm38wVhq3+XPb X-Received: by 2002:a17:902:d5cf:b0:16c:e0ce:dbd8 with SMTP id g15-20020a170902d5cf00b0016ce0cedbd8mr12824771plh.55.1658768317893; Mon, 25 Jul 2022 09:58:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658768317; cv=pass; d=google.com; s=arc-20160816; b=ALY93+Ep2RAKHPSziBySFkfQ+UsWmIYG7xwtZFRoxd6IkUAoosDoaLwUrnAIhISKJc T9pJQ0bYFT7//1Mw+6c8ZUhtcXgia1yVAKiwkabxdqOr7jeFavfP9jCITT2+YtqThfXl YZR1lMJf5qwb29BgPIFEnSG/Ml+zgXEpVDc5X+tgpYuH4vX0y9JTSw+ACtybafAJsFGk egH6+tKNlPs2szSebMKky6VFRftNN/j0ycK4iveEjUK7CcWde9RFBwpFxCPyqDpJ2Vu/ gVg6yV2wn4GLmDy0ff5R/L2QlviWoeSeaNGzxcDdzohvVr151+sgFMdJzIjaRyJBa9fq a5bg== 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 :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=ArP4ymkR5UeNgV9X82T4yyqAJi4sLDacDYTXo/Ys7/s=; b=By7O3iZCNGO5NA5BSQp9xDs0cxA/6vwSxz6HlTvwflNXbjXtbR51whGAV4df0S0uwd aXd8jsSy/wTWF1z6GFA1msMFqyxRytPsuu715mk62wkqjjzdKdNuSfWfUmUulopVu3Bc aEAkMf4QK266ABTYYVBLbrr34rrQMCZ4RRNar2QTSgkuWrOQVrlhkCl0ycwl2+S1XUsQ 7PA2WEsfYUmVkE+DBEkxNdu84zMnwdRKNtgvXk7XgeoOPFmAfWl60WgTV6MRbZcq8ahT uFHy9jzcemC/TACNR4/6zIPui565xJ2fm+H4Wux0p0PxULMBp0Dz5gK/yG4ePYW7y/DG qXhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=fq6M575i; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a1709026b8a00b0016bfdca1243si12933482plk.275.2022.07.25.09.58.23; Mon, 25 Jul 2022 09:58:37 -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=@amd.com header.s=selector1 header.b=fq6M575i; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236618AbiGYQl0 (ORCPT + 99 others); Mon, 25 Jul 2022 12:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236564AbiGYQlO (ORCPT ); Mon, 25 Jul 2022 12:41:14 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2085.outbound.protection.outlook.com [40.107.95.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84EBA1EC51 for ; Mon, 25 Jul 2022 09:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFYRtA867nIkk5R6fFryegp6QSoPPb264RZS5cFIiWOJ2NeNSver88i19pXy8qkTMwMQn8qcDamRsPNeczj5EK5bkRRkRpvjIq4/nBh2+uQRqT71kxULSv5myjmQqkK+iyLrqieETDELXqEgg3cOqdS2FQatK6puMnkTBdTtYH0XKW2XG77Uub6a+v+tRneiYfQAJgar8+CuuMKCspWlKpvdHThzDUlp+mwrUUM7R+WUDRR9m4HcoMLlypgIHmpuGT8Nzj+DzitB2ODhnWaEdBlU9Zd+sUe2KLebIM7nYmhSGVtY0ApoUjXkqfTSFuLwNWgm98mJKgaMwFJSlrSEEA== 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=ArP4ymkR5UeNgV9X82T4yyqAJi4sLDacDYTXo/Ys7/s=; b=ciGVeK5P60p2nniQWqqTKFa5sHg3GTbOEF7y30+Ts4CVsgjWvTvyTw6hasjKuOet6Gc3y7DE+DMMiMTaChPSNtJLFHJQea+Ggc4syqYhyOk4ZcGJVadktGHOMHc2iaISooEpsmI6vmMkNUerpIA/gWvE8mJ6WbK6BgkPdGg17YgE01SIgDU6JyFEMNznVhgZntwFbxm7ngg43/o0RQOVcvCcQTWRxt7+NlhMIYdTsB1QyEDR4SG9M6QLxwfYD83bUKvtivDMpVcYzNkdDWB2HiUr2acGTjphPf9llMNzH1ISntOSFIIqKM2Cx11XaLIylbDYb/kC6upUBjZGPLNhLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ArP4ymkR5UeNgV9X82T4yyqAJi4sLDacDYTXo/Ys7/s=; b=fq6M575iGMKLdVVFzvwAMW9UkGu/QxzmAqLYmyXbXR+NQ2747UHjQ3ap0upVsXtVh6tAhCysudgEe6T6q6/+RJStY59Th+E41Ipu+80xBkeuhqlZThaKjVRdZa2lQY5hIqAXUOfqMT/eM/VOQJ4jqfsPJoZx33YD+WP8Kchwllg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1947.namprd12.prod.outlook.com (2603:10b6:3:111::23) by PH8PR12MB6890.namprd12.prod.outlook.com (2603:10b6:510:1ca::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.20; Mon, 25 Jul 2022 16:40:33 +0000 Received: from DM5PR12MB1947.namprd12.prod.outlook.com ([fe80::9da9:705a:18ae:5e91]) by DM5PR12MB1947.namprd12.prod.outlook.com ([fe80::9da9:705a:18ae:5e91%9]) with mapi id 15.20.5458.024; Mon, 25 Jul 2022 16:40:32 +0000 Message-ID: Date: Mon, 25 Jul 2022 12:40:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] drm/amdgpu: remove useless condition in amdgpu_job_stop_all_jobs_on_sched() Content-Language: en-US To: Andrey Strachuk , Alex Deucher Cc: =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Emma Anholt , Melissa Wen , Guchun Chen , Surbhi Kakarya , Jack Zhang , Hawking Zhang , Felix Kuehling , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org References: <20220719103954.6737-1-strochuk@ispras.ru> From: Andrey Grodzovsky In-Reply-To: <20220719103954.6737-1-strochuk@ispras.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YT3PR01CA0091.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:85::27) To DM5PR12MB1947.namprd12.prod.outlook.com (2603:10b6:3:111::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dfb9b0e7-14f4-4b22-4a1e-08da6e5c642f X-MS-TrafficTypeDiagnostic: PH8PR12MB6890:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9X7uAsSxKYdFnfS16kV8P6RYGW+MZnwVXFFASxVO4P5+hwH//3OBgfThXsBma9JZM6qiTKV3Zr+BN9S7fK9eCK2yUFhpysDJV9aeyJIK1gIt7PhqQvdpRi+NqgPtOBw6n+UeiY7fWspJOCLJvmrB4dUHVmRfUCsYThu6bwqbW6QxANZ/COghaK3iVnetoqWAGAFjxShJRJqszRcW3AMx2bysFc9zNbHPVOc5BL0HcBSKQ6wzrXNckyqCwhMECZd6U9Jk7DzQJJ+lyBaIyjmzZUM7E6OvrBMnltfffREz0f8HErqw8I1LvOp1hUxjoK2ypAdbH2hW8YEJaZodOertiAcmcuQgkd6dZMY2HC70D5ijiJrtaratHRQvHHDu+qa4J9+NU07k7/t8+ngufcJit5wzXkY2fKi3GMUcauRETNQ7p1B0Fp6Is3hLXAM8IkuUEOqsLpnnK9lLmRg0mr628I0pynCnG+3qYV22MIZZhutuEy2U/IiIg4eDHskppC56R8MS3ByLMjwqMo7LBBI8QDY5AtEMB2ZmNHmBo5Xy2X98BnX9nDVwenEcGd274NqldGTH/p4913affowaiUZWsLq4gUJq6GqrP4VieNw3rudMcQXqTjne5A7jdeAMuw7oFJlEDuzeDtzROxEWq/IwjReigXQNwKGWwdgmiANLyfxr0PLcQRyTE0jB3W5YHsFMlQXjMdjoDpRmmEtvAupHgrfdpaCIEE4Ds0tGKb+O3w01wi6bB/dIj38FPu8lW1bsFf0njw92qoJ1o4NBzeoMtqTLy5X4pNkEogfrWiWCT7H1VjhyRAiVCxGdZyDGg/Re+fSguW5SPzC+BJ1I9XilcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1947.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(376002)(346002)(396003)(136003)(39860400002)(54906003)(41300700001)(38100700002)(6636002)(316002)(2906002)(186003)(4326008)(110136005)(8676002)(66476007)(66556008)(66946007)(31686004)(36756003)(5660300002)(478600001)(53546011)(6512007)(8936002)(6486002)(83380400001)(6666004)(44832011)(31696002)(6506007)(86362001)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SEZrNDVySFZGdjdWamZtWmJ4RW9xY3lNcnNqNjFjVE00NVNneDRNR3VLQkVr?= =?utf-8?B?L3FvZHRhR0NIQU5CbW8zMGs5Y2V4V3I3Y2pjTHltTkV2NERyZjY5ZTlsTlZw?= =?utf-8?B?cTliM0dlMVpjOGFnYzYyRkd1eDVXNDE2UjF2aEYwWEdmenNKdGFZUmRzZWd2?= =?utf-8?B?OTQxRjJOWFhia3dIZVM2QVlwa3FQZ2dmOGxwNElEUElBMTRyMFdjRDJGTEtP?= =?utf-8?B?OXVOUEFaQ21peTNBSmVGbmRDTFd5dVR0K3FtL2JhWGk3WG51U1RPcVorRnlE?= =?utf-8?B?RzNmVWF3VUZlL0lHUUUxU21UdXpGRU9FYVNYY00zTm5hUkgwWlcw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bmdzL0wzYjB2YUJUQzIwUEZSOUJzMGFyQS9r?= =?utf-8?Q?IQqJ6145RrDzHiRG9nXVo04b6G/AUNgNw4QBfEaI0wuu?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfb9b0e7-14f4-4b22-4a1e-08da6e5c642f X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1947.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 16:40:32.5869 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cqckq8GXtnR2lYIoPWER2Y7nxfd2pqa/Pa/xMKkaXJYM1kYh3iLnlwU9Dcj/ctmBYX+b49ZkYI/Al72lDipalQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6890 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 Reviewed-by: Andrey Grodzovsky Andrey On 2022-07-19 06:39, Andrey Strachuk wrote: > Local variable 'rq' is initialized by an address > of field of drm_sched_job, so it does not make > sense to compare 'rq' with NULL. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Andrey Strachuk > Fixes: 7c6e68c777f1 ("drm/amdgpu: Avoid HW GPU reset for RAS.") > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c > index 67f66f2f1809..600401f2a98f 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c > @@ -285,10 +285,6 @@ void amdgpu_job_stop_all_jobs_on_sched(struct drm_gpu_scheduler *sched) > /* Signal all jobs not yet scheduled */ > for (i = DRM_SCHED_PRIORITY_COUNT - 1; i >= DRM_SCHED_PRIORITY_MIN; i--) { > struct drm_sched_rq *rq = &sched->sched_rq[i]; > - > - if (!rq) > - continue; > - > spin_lock(&rq->lock); > list_for_each_entry(s_entity, &rq->entities, list) { > while ((s_job = to_drm_sched_job(spsc_queue_pop(&s_entity->job_queue)))) {