Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755378AbdLOMTC (ORCPT ); Fri, 15 Dec 2017 07:19:02 -0500 Received: from mail-sn1nam02on0073.outbound.protection.outlook.com ([104.47.36.73]:34918 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755283AbdLOMTA (ORCPT ); Fri, 15 Dec 2017 07:19:00 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Subject: Re: [PATCH] drm/amd/display: remove redundant null check of array 'data' To: Colin King , David Airlie , Harry Wentland , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171215105343.11372-1-colin.king@canonical.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <034400d8-22ec-f5fe-a958-6c61e487784a@amd.com> Date: Fri, 15 Dec 2017 13:18:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171215105343.11372-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [2a02:908:1251:7981:38f9:6824:e094:2a6] X-ClientProxiedBy: AM5PR0602CA0010.eurprd06.prod.outlook.com (10.175.46.148) To BN6PR12MB1299.namprd12.prod.outlook.com (10.168.227.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 556ea717-e0ec-4d2c-ab9d-08d543b603ff X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307);SRVR:BN6PR12MB1299; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1299;3:0pHQTbB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/mN+kt2Sy1poq3yrKxjJQlX9S9d5u1NCcojkf0Bq0vSXS7mcKfeB64UHJngYi21tltXluc5jL3JkKFeLWLqTEG3VL+2wdjVZsCOzvVuMdfMoVgfUKBAFKw0frg8VDmtVKtemYM/R0jUxfeiXT6WVnkuYXFhDeixp4HGO2EwhJJo7011tEjJcqfEZ3JVlAzszA0Jme9yx1MKxfKtXgMLI6shXT+YC2xh7sQ9L9lL78W7c+fMPZg1N6sHXqBLzOlnrCntlqmVfneFTXTLNParjL/8QzSZ2ZZZkb7Bd8er2s1KsThDlsc3UJq90oz+v6U/GGyRuq+DzcQ3pqIT5Ac;4:s64+Mbt0SJnofSXrjRncUZx9Av1WjkRmjQbZfxRYkkUnvz7SI2la8HkLLXs3/ZQFOsoqHXVeuBnDa4jKBIfJkKt/xcmMZMX055kNTr0oO3slkZZCyR2daqgYPlcL5K2Vrhe44e4+0h7CrXyNMo3and1KT+h65ul43kx/4pfZEaQ1te/u35xRJAquG1Wf4BHwsBFgvM9wNq/An1Ug+iJU/waXNO5nmNT5E3b5RXk4IiI6YFbqAvvnvn1YcfDKoDd4bTCdn/UnFGdiU5lUrKtxc4ErzJOHhAMxrFaL+Xnjz1O9VYixbBVmC0NAMhJGk3LznWUdcssi0SQ10NKOAO/PKA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(198206253151910); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(3231023)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011);SRVR:BN6PR12MB1299;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:BN6PR12MB1299; X-Forefront-PRVS: 05220145DE X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(376002)(366004)(396003)(39860400002)(189003)(199004)(65826007)(229853002)(1706002)(36756003)(5660300001)(6486002)(97736004)(47776003)(316002)(65956001)(65806001)(110136005)(58126008)(81166006)(2870700001)(31686004)(2906002)(81156014)(8676002)(31696002)(68736007)(72206003)(8936002)(86362001)(50466002)(7736002)(67846002)(105586002)(106356001)(386003)(76176011)(52116002)(305945005)(2486003)(52146003)(52396003)(478600001)(2950100002)(23676004)(6666003)(64126003)(4326008)(53936002)(25786009)(6246003)(83506002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1299;H:[IPv6:2a02:908:1251:7981:38f9:6824:e094:2a6];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMjk5OzIzOlJXbW9ZZUtab0lEcy9MYWdGVVp1L0Vod1RG?= =?utf-8?B?dTdGUDc5WXRnL29FamprL04vU1ZNdGpYWDVrVE1UMDRIcnlxazc3aW1Uc1BP?= =?utf-8?B?Z1ZOdHQ3NVBOUkYvNmtHYXRsSDA5Zy9nSGkxSk1DNTBUR21yRk0wTklTWUpV?= =?utf-8?B?MU9FdjY0Q0pVMjNrU0E4UWFBaUs0dm5PZWxRR1p6OTA0OUlyMlRsNkNaaEJB?= =?utf-8?B?TVdGc29za1VzTWdLMlVob0FQK0lKdlp1NGdNa2NidUdPbTdtaWEzaU5lQnNX?= =?utf-8?B?bFlPS1VXZHFkQzNmSm9QTjR4WGR6aEtYTWx6S0h2a3JsVnhQb1YyT1NTRlEr?= =?utf-8?B?RGFDdGxkMjVYVDJMMmg2K1JtdWlGZ3RLYmtBTkVPTWtKeXh2L1M5by9ybnlS?= =?utf-8?B?bzQzZllGaVdMeHd1bHNGTTd6cXh6L0ZNYWYvVXBJNSt1QTdFTnU0dkd1bDNI?= =?utf-8?B?LzVSaTQzSUVlZjNxY1lkZFUzc0JGSGswR2tsSlFpYmVtME9IbkVBbm5sK3pn?= =?utf-8?B?Titzc1NLdkJKckxReU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ByXINWTErKkWyXo2PVFUVM3h5OwUgp7XXOsr7gbY6lwERr7zZtXkmE6lW2xW2X3PYdwk1T88vM/REzG9gBzh6t3L3ILmmGSubUAZLs7h5Ctmlf9faKnS4I26kq4ugwA9sgc81STYP9Frg9sy2dcZhEb8vMRaM5cMChg1or5FvPidn7LroHK1lc06TgVOykjXvQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1299;20:0XlY5P9wjRUr34QaRPjiVlVoKhr7bVIaa1Rxa/RjLHylVLSQ/dM54ARo5DxuTGdpiQYUUiAy++ug1beFYi1ESdWniVwUZNyHEq9cgsaN45knu04rEtIKaDhj/ThTP/bZxd6gtmCUiz1enNgbI0esqUs26jxSnZ49k374ywXYm1Wl3PidW+sGn/+m/n62WmRMMBRh8PuuP70JGUp7Tui5PC7qSf1+p3J1nJQWRuKWQiUDq3kM4LQ9KOl2YnJ1ZJ4B X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2017 12:18:55.7051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 556ea717-e0ec-4d2c-ab9d-08d543b603ff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1299 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1185 Lines: 30 Am 15.12.2017 um 11:53 schrieb Colin King: > From: Colin Ian King > > The null check on aconnector->base.edid_blob_ptr->data is redundant > since data is an array and can never be null. Remove it. > > Detected by CoverityScan, CID#1460369 ("Array compared against 0") > > Signed-off-by: Colin Ian King Acked-by: Christian König > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index ccbf10e3bbb6..c388778dbba3 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -2725,8 +2725,7 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector) > }; > struct edid *edid; > > - if (!aconnector->base.edid_blob_ptr || > - !aconnector->base.edid_blob_ptr->data) { > + if (!aconnector->base.edid_blob_ptr) { > DRM_ERROR("No EDID firmware found on connector: %s ,forcing to OFF!\n", > aconnector->base.name); >