Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756771AbdLOPFx (ORCPT ); Fri, 15 Dec 2017 10:05:53 -0500 Received: from mail-bn3nam01on0040.outbound.protection.outlook.com ([104.47.33.40]:36256 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756474AbdLOPFt (ORCPT ); Fri, 15 Dec 2017 10:05:49 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Subject: Re: [PATCH] drm/amd/display: remove redundant null check of array 'data' To: Colin King , "Koenig, Christian" , David Airlie , "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: Harry Wentland Message-ID: <299963e5-5847-a2ca-0282-40ab3cd0f590@amd.com> Date: Fri, 15 Dec 2017 10:05:39 -0500 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 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.55.250] X-ClientProxiedBy: DM5PR0401CA0092.namprd04.prod.outlook.com (10.167.105.33) To DM5PR1201MB2474.namprd12.prod.outlook.com (10.172.87.136) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 23a4c0ea-8e29-4419-5619-08d543cd52d4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307);SRVR:DM5PR1201MB2474; X-Microsoft-Exchange-Diagnostics: 1;DM5PR1201MB2474;3:Q8g5G7XS9Q1PCLTA+s7txitpWv7zgp6tMX4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Rmeg+mgppeIbD1xqCWeMbo66DmyG0IVT1EkOQ6KJVgw1/m7hNaHMy2Bv7qry58Jz4MtsIFtAOqB2ElkI1GNt3XJcyoxi1b+U7lsjVIsBzAgDCFNKJBxsNQSulrhfJcfoNXFtGHZVG90d/yrHY56LV1JDMKpCtJjJ1y9VBRo+jDv9urGGzW3PT9DpJPn9HgQmbW9NGuRiAhZpEyhjTwpeRniy+LNzMRNcqqpd0h0MfPU1mI1BXqRxu00ouXoShHaOux4UkHqEqGYygwbauHuAIJDvQ9VEn1NuonPKM7RjKSbwW5J9bHj7pszuddKSQti4hg;4:f9sL+/YMyuzowE29pmOsHsFqCuVlVhsr0a+VMi4EkW2WXs22f4UA+dXZ8u+py2q2ojA5K/9takGa2AbPeiJjWOdV4z7zAntK9Q52DWCUOa9brRvXfG2wKIslQSR2CK2ecE525FoH2WfBcwlGQzlYIRb5BuK6ABcNCCObd0/3+1FfEH7O9qJZcVX295Brl/NnGdq7pEZJ8jq7tnDEjq68L3RJjEQIq4LkwEhj2ltOqt/UXTqcKwvQm0w52zz2AyzfLIbVqR4yk5b70HJRl4EOYOt3ZB67miGDQegWpHZxU87bi590ERDC5zXPmIhWN5PfBpIw9slwPxz9bS5uCvW5AQ== 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)(8121501046)(5005006)(3231023)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR1201MB2474;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DM5PR1201MB2474; X-Forefront-PRVS: 05220145DE X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(366004)(39860400002)(376002)(346002)(396003)(377424004)(24454002)(199004)(189003)(86362001)(90366009)(105586002)(72206003)(4326008)(8936002)(52146003)(25786009)(81166006)(2501003)(8676002)(81156014)(65956001)(23676004)(478600001)(305945005)(66066001)(2201001)(230700001)(7736002)(5660300001)(2486003)(65826007)(31696002)(64126003)(58126008)(83506002)(316002)(54906003)(47776003)(65806001)(36756003)(3846002)(6116002)(31686004)(97736004)(16576012)(4001150100001)(2950100002)(229853002)(106356001)(50466002)(53936002)(6666003)(76176011)(77096006)(16526018)(6246003)(53546011)(2906002)(52116002)(6486002)(386003)(68736007)(110136005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB2474;H:[172.29.157.191];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyMDFNQjI0NzQ7MjM6N0FkS3lOV1d5VEoxZm1CYnExNWlxcFJT?= =?utf-8?B?dkJqQXZabmlTZ1ZRenBQVGNxL1dMRUpZQi9EZGwrT0t2WWhZTUROVmV2NVd2?= =?utf-8?B?Q1U5YVk2QlJxYTJQWEpjaFFydGdzMVRlbG0wRTZPVFcyQ0FuTExDNE1WU3Rh?= =?utf-8?B?YUovbTB2ZlhpSFZQWnhXaGFRSnZDWU9pQmQvajNyZzFudWRYdXVDZHRiTHpQ?= =?utf-8?B?cndUUjlzcHNHQk41b2Y1RXFwOVlRSExjb3F4U0NUR1dXaHBKVk9UdHNkMDVQ?= =?utf-8?B?ZHQyNE8vUGY2L0E3NXYxdERVVnhqWVRXNHpOZzZ1R0pZNWFReWk2MlowUm1V?= =?utf-8?B?K0JXS0tQNTUzcWtCdFh1bWhSc1RjM25YOVVHNUZia1U2OEt5SFdjdk1IQkNa?= =?utf-8?B?OUc2OXB6NXoydmJqVFR4UDdpUFJjUVlsSWc0ZFdCMUs2YnVxVVluWGlRUUlk?= =?utf-8?B?QTdDS0Q4aXVUNHhqRWwyaTE4U0EyeEEwNVBPRkQybWlMYWRUR2tPZXlQL0k2?= =?utf-8?B?Vl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++kKvy9s+mUWfif9b3BQPpWs9FPSgm/FnLPyk=;5:vJptmdeJPrNHzBi9E8APrFlasxkY3b76YDtAB8sBaS3vw2EmmzZWCSrKoFCx4vyfMRm9kxz+2W5GOc5HvLHCRM//1Nj53KP6ZWok9+PD8BmueT4nKF3bd0yBFjXN40doDJ6vJjH6zFbIz32k4U0IdmcxhMER19aNDeQOQxKB2SE=;24:tqbwQ41tqTLBykAoPAxeizhqu76pCg4t4R5JjwMBDfZQ53WXd/cx6dA6n+ws7PM6PnwWfmxMEu+2O34of8QXpKl4V1VEWLpyW3owmz68/Ls=;7:D8bo1UkRFESlJEnbqJa3VxTUNNrQ9i6+BqiSGfJZf6YTaFjhYntbTVsMygo+pIUx1rD0EDqtYWJnQqLaKoT7UMfh0qgy1i7jHOuc8rRhWGXDjG1EwGI3l1f/Z8T2hJfSfy84AuZcIrUHjbLESyIJkfOoga2eyWw8h+WayvOCgV88yLL8Llhvlq1IGosF+eNbgF9nRLPMUBBI0zb6hkjZj15aoPV/q3SDAkt5xulDt+5UED9u+txfO9TyPvoWLrAB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR1201MB2474;20:ha0hdRfxGX5UTVB6pTAwuTYzy1EuWrxUHz5c8QaF8noYE1FOZaXwHGGOmIxrsDCZgtNmG0e1vGsH/SYiR2Xd6iwNwuiTpfV33QYvtXLuChbTeUnVPhRotLF3Dyvw84D9P71/YbxfzxrJg+hhajlxOinEH1UkTjXBQEW/9rhQ0fZ3/1zPa22Oy4QZF2QclVEbuNTa8qmkRP6JxDjBa0iPSYDuyWwAI2ALyuK1Ba2TpAAqY7MbScGyutF+3rmOep5s X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2017 15:05:47.4016 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23a4c0ea-8e29-4419-5619-08d543cd52d4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB2474 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 33 On 2017-12-15 05:53 AM, Colin King wrote: > 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 Reviewed-by: Harry Wentland Harry > --- > 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); > >