Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6DC5C4332F for ; Wed, 24 Nov 2021 19:40:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbhKXTny (ORCPT ); Wed, 24 Nov 2021 14:43:54 -0500 Received: from mail-dm6nam08on2047.outbound.protection.outlook.com ([40.107.102.47]:20403 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229557AbhKXTnt (ORCPT ); Wed, 24 Nov 2021 14:43:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahKEJWSXGDFg6Zw8Z06RCXznPWT1jOHxeB7O04M0TKWmnHZewuLCLZC4kgDbVQju7HT22J8+fR5qk7LhDzxlxmXk2rCYg98Em4GtQa2aRTEnronD/32kQTQ/d1nKw8zKD7UY+OBLJZcHB0tOVsyCG4I+IqRWVPAYezBo27t7iDiULuqUD3GW5/7DJDZcxLrATAsprXAYzonxEORd4s/kEd+6ifvLQL7oAK8eGosqUcU3/bR6AcVppofPXXjvr0IqlCbEsf1k/XT+nUWvhP8oQUm89q8k07BOX0YLR8pyrObKK/fJWeBdtaLXFTWTuZu30sgKNTU0TEwUgybMiu/+/A== 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=K2DNW0At5jQoy7e5O9nmpPAwtSoiukQncX/v6irjAm4=; b=OKOUczbBp7yV3w1zZkYPgg0H6FtSgMJHDBCnIkgx+Pz8FLxqgoqVjfqsUrP2lA9UP+Kk4iU6/8nSZNag6NGrwuKutyo+/YWv6CBEEPJu3XJgYxRjhxHxsh+MQU/8sEud5qjqS1bxvcHnmSPbAQdJTryD3s2G3G8DXrGAua0tlQTWTG0BDNUG8jXtTOWJy0A3zarE5kEyJpDOtBT6tZauke62Yx+KUs3VrAgdkZ2sOibKRYB3JikrUP4NUeLgTeB3uRpdlvpntssCxDCY7m+SagkP2PLv6FjdH7ps+lIAqdJHbtKCcs19izvd3avJQbrc7cpEY9pJ6QjYLnA9nVniBA== 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=K2DNW0At5jQoy7e5O9nmpPAwtSoiukQncX/v6irjAm4=; b=QWAhc96tuw+Zg2Jo17ZEn01tgP9BBksW+C1zPsvZjYy9oRJ7Cs/l5Jy4UcOFc916xllTQzSBi4SQZdIWZjnoCaZZ/uO2YMQW/9kqVXBPryTsoadwT3TAYUTLCOO1ezJt3AVFXF7yELshgJx7j7MYv+cl81/uO0S61pb4w7qdIFQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB5564.namprd12.prod.outlook.com (2603:10b6:610:65::24) by CH2PR12MB5564.namprd12.prod.outlook.com (2603:10b6:610:65::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Wed, 24 Nov 2021 19:40:37 +0000 Received: from CH2PR12MB5564.namprd12.prod.outlook.com ([fe80::6147:a3dc:dba5:60ea]) by CH2PR12MB5564.namprd12.prod.outlook.com ([fe80::6147:a3dc:dba5:60ea%9]) with mapi id 15.20.4713.025; Wed, 24 Nov 2021 19:40:37 +0000 Subject: Re: [PATCH] drm/amd/display: Fix warning comparing pointer to 0 To: Jiapeng Chong , harry.wentland@amd.com Cc: sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1637749236-27107-1-git-send-email-jiapeng.chong@linux.alibaba.com> From: Rodrigo Siqueira Jordao Message-ID: <5be550b1-361f-1028-764c-62020e1f23ac@amd.com> Date: Wed, 24 Nov 2021 14:40:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <1637749236-27107-1-git-send-email-jiapeng.chong@linux.alibaba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1PR13CA0222.namprd13.prod.outlook.com (2603:10b6:208:2bf::17) To CH2PR12MB5564.namprd12.prod.outlook.com (2603:10b6:610:65::24) MIME-Version: 1.0 Received: from [IPv6:2607:fea8:56e0:6d60:eb8c:d5ab:cfa1:462] (2607:fea8:56e0:6d60:eb8c:d5ab:cfa1:462) by BL1PR13CA0222.namprd13.prod.outlook.com (2603:10b6:208:2bf::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.13 via Frontend Transport; Wed, 24 Nov 2021 19:40:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18625548-cde6-4509-236e-08d9af8249d7 X-MS-TrafficTypeDiagnostic: CH2PR12MB5564: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Fc42Ve5ZCO9cLMTgP9JDtbD+TEOyunSt5QSwT751BKyL7IFi3aMmDPL3GDD3Wy2fBPIjqQb2rFmkDZF/5cSHmzwNSzcldpZ+oC0oRwJ4DP9+DpEeQuY8gAdx5/EprpckaTeiDB5hpFH5qiNYWqe2hgMV9zrHWiCVXdNNP7h5EP2hrWPydMS0ROySTnnW3IJLM31OR1rlmOc4JmPKpuZct4exe/lgo3uHHLFNnxeAyliCjOHI2UQS9uLW5+ZpiHfGhDxz38YVh91xwsnZ8dXll+E8WJyxZ5jAlUsZGQdSM8s2EmtlmFH/iZFf43u4JAARHe+/COIheBjSM1W4NrAW8llRB96jSqNTqTkEWzAjhk0s6EG3xdn3udM5kZcVZHQe2gdEfEyT80GkdJNoG2KeuRQZ12Hr3DmAYNFcdyn+USqqs+Q4zKUpS4LqI2C17kPZUWL932X+7tI3WOWlxFYjCrE9L+Y6VfP2uIt+D4HppV1BGPjQ97e7b877AMhcRr+0+daLfazVO+l1FQHUWDA2wfhipIZuEgH+ZC7QHeaH5AxMW8gfCVIE521b9A0TbUzrfaluzusAfLOpCmyRLcSkylHt4RMPHCDw9PL85KN/0swIg3hQh0lT5Qxw8b0hTDyKwlvyfUEJk63bmJDwgxTFcF2K2l0ARZbbH3GWKWhaNa3FIzzXpLu/HMBB+Z1444jie8V0TtN4Lt1bLId6F+m2teZgV7/DuHsLwfZrtvV2qQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR12MB5564.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(186003)(508600001)(53546011)(6636002)(8676002)(6486002)(8936002)(2906002)(31696002)(31686004)(66946007)(4326008)(5660300002)(36756003)(38100700002)(2616005)(316002)(66476007)(83380400001)(4001150100001)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Message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YTUs3Ym9HS3NQOTNEQnJYSHE2YTBaUUVYTmUxbDJUdW1yM0lj?= =?utf-8?B?eFV4dnNhN3hwV1RmcUdYR1VvZzVpYU5tS1BlT2VBWmdSazZnN3J2a21kY05s?= =?utf-8?B?MHl6MThQVFE3eTRWNGN1V3dzWUR0cHFTVXZua0JiOUxSRVV4Y3JabC8yWXpV?= =?utf-8?B?R0VNKzZMNStvT1B5UTBkb0xzSE15aUdyZEhjUHJSZjZkTU9saS9GdU1RbTVv?= =?utf-8?B?OVA4Y0kxSUdrS25TN2tJUHU1V0kzVy9IcW15QTU0UExnMzZ2TVNBS3JLNnZi?= =?utf-8?B?M3NPUTJyWmovOFJnTDNoUFFzbDdKT3V0TGdPM1Y4bjBZNmJReXVVbmpad2pM?= =?utf-8?B?aGIydGYvenhFSlhxL05Nd0lKcERrRTAwdTZIN1BOOExndCtUM3MydWcxbDJo?= =?utf-8?B?SVczdTg0Rm5zRW90d1RKa1ptWVRCTTlFR2RQWEZGOXl3YVE5WCtZdVJtOUg2?= =?utf-8?Q?xXzvAtjsgUqqf0fRSWo5Go3rx77OF5OrG3pJh6rAcY=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18625548-cde6-4509-236e-08d9af8249d7 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB5564.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2021 19:40:37.1560 (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: mIbhENKXYhGqkDwwDHMXNxNFNJFhmGUFKA08XNqIQmTmndob2Rzh7nPR3uV+PXjW1JqifNmJK0C7YJsl2Y3NuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5564 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-11-24 5:20 a.m., Jiapeng Chong wrote: > Fix the following coccicheck warning: > > ./drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c:96:14-15: WARNING > comparing pointer to 0. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c > index 122ba29..ec636d0 100644 > --- a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c > +++ b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c > @@ -93,7 +93,7 @@ static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc, > TABLE_CASE(420, 12, min); > } > > - if (table == 0) > + if (!table) > return; > > index = (bpp - table[0].bpp) * 2; > Reviewed-by: Rodrigo Siqueira Applied to amd-staging-drm-next Thanks