Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp205954rwd; Wed, 17 May 2023 17:15:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Cl1ZfXp6GS+nwI43WPcUfgeNsXvVYuMFC4UTX+fu22UeS40TF/SncpNH+fLVMG+TPJfoj X-Received: by 2002:a17:90b:198b:b0:24e:1c3d:e624 with SMTP id mv11-20020a17090b198b00b0024e1c3de624mr609999pjb.25.1684368943024; Wed, 17 May 2023 17:15:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684368943; cv=pass; d=google.com; s=arc-20160816; b=FLptRbevhaNOu9xg1j+LCwVYPN9b7HNjGneELJUhQ2SDZCLvSi7Fy074S9Bg6T97lj PsL+HV1Yw/hBpjc2TSZklQAJEqg8o0xwuY9CfZjKdjGN7miPW/w/TdHQtlxQ904in8NM tK9VFRGo8rHYubqkJr1UjfMyfz2Dbf/s1xPp2OlW7g1cXa850vCVmpzbykOcBPGH3WhC 7cng3jm169Q57Iwl3NyNG4wmZ51PXyTcgRp4+EMDI6C4ZqfkVdmoYmljuSyyFPUhB6DH bXbDCEULuUFuf9VElBA11fGiOkhNz57la/Yez1fNol97gyamyn7sdklvF82SfQ1ziNaR OO6Q== 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:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=fcGjjmDLENj8upWSQ4eMZMGK6vHVPw0zwfyRPWcp0RI=; b=uPvPzir7K9+waTzMOhvNPCClIV9mium9TR+/mJszzzfAEcXL+t1Cxov2jmkC1884T4 8WBvvbqCo7UhsCSUfDXyBJz7BZgtBWwq/4OZV4EMiX1Ve0/DivN15j/AuVcONNSBmDGB f+O0X1hkypRccb72qG5OpFECqX56rPxjGycma0/pg6+qkpYDUJM+ecNudiiKL6hAW7Uz 6I0RpdmhGb5oWDWPkd9wYz113qraAxTPIqqv5J+Ad49Jrjg+b1GCiH7yQBALZlCLLkcQ usLUn3i7JLukjo5Xl9k0CB3ts7ZhevyKn2b48KF6rBcCWVMxaaJcOVJPuq9bCndSCtPK A//Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=QNV4PAIj; 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 dw5-20020a17090b094500b002531eb75916si296770pjb.101.2023.05.17.17.15.31; Wed, 17 May 2023 17:15:43 -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=QNV4PAIj; 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 S229661AbjERAB1 (ORCPT + 99 others); Wed, 17 May 2023 20:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjERABZ (ORCPT ); Wed, 17 May 2023 20:01:25 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2047.outbound.protection.outlook.com [40.107.94.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E480DA2 for ; Wed, 17 May 2023 17:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IqxXEWYgymFGQeTTdleCRqqlqKDaiLh2hrBzILHM9IHCqg20ZVmCEIZ51r6Fn/WVvWvDRaG7P7cYu3alc23NTaKAB0KB8itIZ/QPy+m/+MK63hdcHFYQxi3ytetaB++uX63bDu49En8nw2bfzBNxjhG8gHjrkQVADvE2sLpHaxJ5rWEATLmZc6BwlxpGeNHNytaZ/zPKfQIFiEkZZF91E8SN1M2Iuv7jRg10Kz2T3rnnL88SFm4LI2dXOZy3S9PuFnE2FGMcfNgqObLELYRCfcY6/pmSNC3LcX62HunUo+dg4xiFcnhqH6uBlm4IlWwegPbSzD/mPI2k1jDsk3hvkw== 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=fcGjjmDLENj8upWSQ4eMZMGK6vHVPw0zwfyRPWcp0RI=; b=MbRFXA19UUYV164YidlYR7gCqTb6E4xMCfDSdmiuUaSXt1Uiz6uvL8NzjvWloHX2lb6PJ3KUYqFD+lp4L/X0GmxRnHxzFUcDjvxA320j3Q6udjiaQ9oiRb5tK7xJbAC7WRAPw7G2dKu1ZeZPcajSkLkqcExpmybFnyVTlJg1GIjK+dLAh3ttvz955U5+GTnZfegiUsqVbQFQvDMd1j1V2jcCZ8V0B34W2jvbQXSp7kJtHCmP7u9F+GkokVWDFcAphSSM5OExB6lKANMQ1gztQEF86AkBzY2uH0rKflqKEp8oYf00iimD+UuFm/I9vlHBNVnx7yjle5sUUChnRTB5xA== 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=fcGjjmDLENj8upWSQ4eMZMGK6vHVPw0zwfyRPWcp0RI=; b=QNV4PAIjML+MXMp20RMSBY+e65KnuNY5LJpoPNYBKfcGyUC/8ArMoCAf33LBiSxzSEW3myPFttBjDFKRqtQQyhjM0lcPLstOqlQvMx0vvSt/tWU1Sop+wyhNLs1pU8tl5JaOzdfqeuM/YYwrDBwFTf89V0/hNiOA9oq+e3F3QuU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB2941.namprd12.prod.outlook.com (2603:10b6:208:a9::12) by CH0PR12MB5236.namprd12.prod.outlook.com (2603:10b6:610:d3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.33; Thu, 18 May 2023 00:01:21 +0000 Received: from MN2PR12MB2941.namprd12.prod.outlook.com ([fe80::3d88:4b4e:e0aa:3c36]) by MN2PR12MB2941.namprd12.prod.outlook.com ([fe80::3d88:4b4e:e0aa:3c36%4]) with mapi id 15.20.6411.017; Thu, 18 May 2023 00:01:21 +0000 Message-ID: <77868d83-c213-86ad-76ff-3949c075995a@amd.com> Date: Wed, 17 May 2023 18:01:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 1/3] drm/amd/display: drop redundant memset() in get_available_dsc_slices() To: Hamza Mahfooz , amd-gfx@lists.freedesktop.org Cc: Christophe JAILLET , Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Qingqing Zhuo , Aurabindo Pillai , Hans de Goede , Hersen Wu , Stylon Wang , Jun Lei , Wenjing Liu , Leon Huang , Mike Hsieh , Cruise Hung , Nasir Osman , pengfuyuan , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20230517183350.314082-1-hamza.mahfooz@amd.com> Content-Language: en-US From: Rodrigo Siqueira Jordao In-Reply-To: <20230517183350.314082-1-hamza.mahfooz@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BLAPR05CA0030.namprd05.prod.outlook.com (2603:10b6:208:335::11) To MN2PR12MB2941.namprd12.prod.outlook.com (2603:10b6:208:a9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB2941:EE_|CH0PR12MB5236:EE_ X-MS-Office365-Filtering-Correlation-Id: 108934a3-fc93-4007-c980-08db573302ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F5/5PvG2OlvV5pLe+JO9R7jvIusslm8ApNSYSwxkXGNctA4CDwv4GeJ8v7MSphE73uZhZUOiUq6LUgwm3ai1IgrgLrQf51WtpZtvo8cTr9zMLRzjk7K4EoiZgn5tlHmtr4Jk7FLhjZm2fTiW4PGbLCzCW9z89VROvZoEQuwW9USrBYUHbJnCHuvV6apuKpLkpa1fSkv2SPXJcqjvmUdRDOBgSth6+RuaDxggdm2UgC6Uj/xfmVAOAEOcdbY35Msan8oYi8CngYVOyO8vwP0bIT8quBwVRENAXJvmsypb2WfDUGfHJUSPGrt/rjnV3k2IBBXuupQ0XaL/InFXNe76fK06ckjZKWhu5vxe5zYDWk87zy9zzJBqSfmqHI1TW5u6ldLkErsSB4tMTr4a1pVKyRuKyRJtKR5t7VxjyEGxHVHLNlC6+1XSS4LUF8R7YoEMn/odQVJKB9tp/1ieZNAeAL1pKnGBdlGJmJfyHII5w16yRJ35zeG6+Hp5IJ8y0bn3Acns2zvBy+xJNp/1USHUNquaPcXzl+tcbvNRU+W03b8psUcBc6qZ0wVfwzljyi9JRoEs4ogNyiZLJKCOj0w/Wm38WLU7ibbdw6tMTjYk7fqLFY4qJF84ZwWtM1sW2Bi3a6z4W8ZGDHLO7+yc7lYY7Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB2941.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(346002)(376002)(366004)(136003)(451199021)(6512007)(6506007)(31696002)(53546011)(186003)(2906002)(86362001)(83380400001)(2616005)(36756003)(38100700002)(6666004)(41300700001)(6486002)(66476007)(66946007)(66556008)(316002)(4326008)(54906003)(31686004)(478600001)(5660300002)(8936002)(8676002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Tmc1MzkvMmhYeGRmdEZxQzBWSU96b0NaK2pkanFKc3EzRWdBT3NZQXFsZ1pC?= =?utf-8?B?aWdKbGZ4Y0Rpa1VpcUdMckY5UWNiMTZya2xUN0hiRjRwc0xLY3prVTl2RVY1?= =?utf-8?B?YWhwRzY5THdPRjdlSUhRZXJvblFFcmtOZ2JpbXhXYm9ONU9OUjFTOXFHbE4z?= =?utf-8?B?NDVwbmY2eldSb2lmVElRQzJSNnJwOCtuMS9WVGdVY2xpTUlFeWg4eVljYTBa?= =?utf-8?B?RVVZN1M4Vk1QaFRKVndGblM3N1JaYjcxQUowN1V0V1dua29UUW1sQk9PR3Bq?= =?utf-8?B?M1RwME10OC9oSnJxTDlCYWd1cS9aVTdoS2FyVzl1a1UvNXdVa3VUVDNJMEJt?= =?utf-8?B?NVdMSUxsTzFTeVcvU3ZxZjlFVjlqTCtXU2loTFhQRVpmQ0RJT3o2SlpIbmxy?= =?utf-8?B?Zm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4KIbKWDKRCIT?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 108934a3-fc93-4007-c980-08db573302ab X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB2941.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 00:01:20.6654 (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: RWsrnucVlk0JudvdPUtg3WPRvPc7Png/EmeVtOg5x1hNnJHBbIOG1AfQynDSvaCWyT7l+kaz9keLOeLdn410vA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5236 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, 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 On 5/17/23 12:33, Hamza Mahfooz wrote: > get_available_dsc_slices() returns the number of indices set, and all of > the users of get_available_dsc_slices() don't cross the returned bound > when iterating over available_slices[]. So, the memset() in > get_available_dsc_slices() is redundant and can be dropped. > > Fixes: 97bda0322b8a ("drm/amd/display: Add DSC support for Navi (v2)") > Reported-by: Christophe JAILLET > Signed-off-by: Hamza Mahfooz > --- > drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c > index b9a05bb025db..58dd62cce4bb 100644 > --- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c > +++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c > @@ -645,8 +645,6 @@ static int get_available_dsc_slices(union dsc_enc_slice_caps slice_caps, int *av > { > int idx = 0; > > - memset(available_slices, -1, MIN_AVAILABLE_SLICES_SIZE); > - > if (slice_caps.bits.NUM_SLICES_1) > available_slices[idx++] = 1; > Reviewed-by: Rodrigo Siqueira