Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1395156imw; Tue, 5 Jul 2022 08:43:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u5hSR67QnHCT+WA2MM8WK6P8xygflzAV4zGFi33bhhLccP/0aD+ydpsPwXqGNmiDDpcBNN X-Received: by 2002:a17:906:6a23:b0:722:e1ba:964c with SMTP id qw35-20020a1709066a2300b00722e1ba964cmr33700922ejc.680.1657035783935; Tue, 05 Jul 2022 08:43:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657035783; cv=pass; d=google.com; s=arc-20160816; b=buc7UuAnrmDLsBSB8AYOWfGVUl2v46dGuFAyXVBDBmgzE4btbBal/te2eb/pjpD9Zo Y8E9zpdUbX7uTojqob6F4K/l8FPqUtfvakRMs18TE0mv5aHaqpnn+PcUrP4PuRZnkhmu raigsJLzRizvV0WYUJZn+8K/J+RXpFHwV1s9YHpunp2zQwY41tpVATX/cKydCTfWXKOq eBSNqAJ4X17rxQk10+q5M70ngWLjsQfDcO/YIwd+9k9i0hTGYDcYXB0XJrIkN2zBf+CF WaDePgZz4VhE1C+y9GZ/5QyncVpCKE9XdiPXTPnXEbE0USXodGfLVQilspgJvvow5don yAew== 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=igXtDH57wIN4SiW8cUgWIu9Solswkm7Vj3w/IATqHtA=; b=VjmZYwntIr/atb1wZmHekJJiR9FiGPeyskpTFz+lIa1Kh0tll8iFluZBmPyKPc/TgY sBTaKLZAv1rdyutqLeeP+TEv74dKD4oA2A5sn6e57wUGJXj/zPai6JFXo5ew6a7Y5MuK 87xa7TGdZ1EMD/gfx62j3Z8ReyjEmgSz+esT/6H+AWQEJFjRhCiQDAO77ZbAO7J0b8u+ xuWzZUHGajzN9FBtMrs1w0vVtI+APkw9I9kbxXfxYyuTEbaXFcR64a+xNyorgUTUyFaX D5fGmOEM1sbzcTxi7j+usyDxlHq8BqddB6zGvd+NEE5NGaeQzaBIM6AKrut9W4HkRn0M vDNA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Pr74YbVy; 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 m20-20020a056402431400b00435d8d8821bsi52627849edc.2.2022.07.05.08.42.35; Tue, 05 Jul 2022 08:43:03 -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=Pr74YbVy; 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 S231783AbiGEPaM (ORCPT + 99 others); Tue, 5 Jul 2022 11:30:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231465AbiGEPaI (ORCPT ); Tue, 5 Jul 2022 11:30:08 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2050.outbound.protection.outlook.com [40.107.95.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16C321A380 for ; Tue, 5 Jul 2022 08:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d621jpX91fkXfuoUCcpZ5esEzMVKtWLJ1gUnLos3P8Ue2Tm24WaTTdElB2jULZdLVXWtCd5x5KWiJvby5GfvrKITjWKGEPzcTCefqH6wqcqffJOkYFyGD/RhNimfegTO+Pj1A0YqHqXihmVTZrc4Hsxuwwg1oonhjSffrAFUFLv79nADlue7dFcWaPozO7J5d+kYb55GnJhcX4Z/ib6oNRasmpz2duyccHEYja+FxgQCXSYBI3Lf9o+FYwm5Wvuf5/bJLI+zHWbuD5M8ehgQwZNtRPu6OCgp+B8iGS+udGgKchyidQhY7S0i1R0RLZo5N60uTdCqscnBjHbEoDShKg== 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=igXtDH57wIN4SiW8cUgWIu9Solswkm7Vj3w/IATqHtA=; b=Xv8PrKzWdI7qJ0fwIAXNVTeKAxtAkQSoudZ6RGKvq8mRqfX7mz4YI2Z4XGyRqp9zI522oaX1CYdHSc5vLcnuLXYkJz9jwLUnW0O9iOfcrbTDMucvdRTFUeWY9A+qTc7PaUlyfxXuM1dLre0G9qSRqbjG2vGBluzzTSLEKa4gQ2OHBm/6dpxCDam8Xbu8votDeM8ZiumMu3KhOz4vM2zgP61f9UlhcIFdp3zY7OfBxZgYXgZOMzKuBzvJg2cV9YtetfvjDGC/5t/mYG8DFRPkFG7fCg62/Yn4Go8rOYt2X07rrgqewuaAEDqijs5VBOYV7Qxh6Im77Xn2WVNt9KvKpw== 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=igXtDH57wIN4SiW8cUgWIu9Solswkm7Vj3w/IATqHtA=; b=Pr74YbVyKLR4qIq4CKrM259OUFY4SoxR8xujWckfbsk2ZEsdKGuiGpAFJaSqIvAhHnSWr89CluuuzqF1VyQIO0XrWwNgrqMiD6ANOozxI/z+fyJESW9dBxXRqaKQ8K2ze/DLya+XkeQfFkmDusn4XCFqK8npgfhC6p9qxFrY7YU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4123.namprd12.prod.outlook.com (2603:10b6:5:21f::23) by DS7PR12MB5959.namprd12.prod.outlook.com (2603:10b6:8:7e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.20; Tue, 5 Jul 2022 15:29:53 +0000 Received: from DM6PR12MB4123.namprd12.prod.outlook.com ([fe80::6d50:f6c5:cea4:1d95]) by DM6PR12MB4123.namprd12.prod.outlook.com ([fe80::6d50:f6c5:cea4:1d95%6]) with mapi id 15.20.5395.021; Tue, 5 Jul 2022 15:29:53 +0000 Message-ID: <5397c5d8-20d8-a366-1143-d1cec9da41f9@amd.com> Date: Tue, 5 Jul 2022 21:02:17 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH RESEND V2 1/3] drm/amdgpu: fix checkpatch warnings Content-Language: en-US To: =?UTF-8?Q?Christian_K=c3=b6nig?= , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Cc: Sunil-kumar.Dommati@amd.com, David Airlie , Basavaraj.Hiregoudar@amd.com, "Pan, Xinhui" , open list , Kai-Heng Feng , Daniel Vetter , Alex Deucher , zhuning@everest-semi.com References: <20220704135421.1215140-1-Vijendar.Mukunda@amd.com> <0bbf075f-ebd7-321f-4692-5bb5da0d638d@amd.com> From: "Mukunda,Vijendar" In-Reply-To: <0bbf075f-ebd7-321f-4692-5bb5da0d638d@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PN3PR01CA0180.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:be::17) To DM6PR12MB4123.namprd12.prod.outlook.com (2603:10b6:5:21f::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34a64f19-d3c3-404b-dcce-08da5e9b34fb X-MS-TrafficTypeDiagnostic: DS7PR12MB5959:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z66VkM90zNG5YUpjlJyHQyURU8rHzIMCLaIk2ajio3UBgvScZXvGk5JoNQZNCFFORJvZ1uaZ4WgJYY/AXnBdmazOKt5/msJE5lajJNFMiAS0dPgU8gZBzivq+NlrcaUEnyC1MBRvIpTGYwB25Cnk7SZ1Q+C3d5XMgKH23X+4UxYvThKvx8qNK+EnXLGspewS98gxAW1jo+nqDvghjgtBz1mmZsvN5gc8lfF8VlOf/zRJsVUpMjHI7Sjh2YOc8AohccWQaaiHWvHJlhIjebwwEbFG3o5y+3FvFnXn6ynh9skHGJDNagHTOrvhQm/B/V+3jeS5cwlG0o3NqL8rG9URCgI+5YpFHLMxH5hacPK/hcr/6FAzAuvD3NP3yoyH9QSe7L0jUbPEYcjxpkNLSR5Au1nxSxcgI1Ai0z6BLf0WkqDuFx5MVm/r1zYDGEMKrTtlKWdMISAzXzTfXNrZDe4xN4aPnf/En0PCTdWciWz0sWQXUUBOuK+4rkZSVj+2TB1e3R4GI/DFreFnzO/OXFd0zqJcV/9LXVXvVoNE1KulRQUWi1sUFYano+svrwWEigouT/rtMU4upxyH/1UWdDNoFsDGFh2lccBHC9+4q216WAMZd5qqQkCZaePWyNt/eWImkPDMBnsRQxH7SrUEnm+/tjukjE4xk19anHvfMn4gGLZpSZnS7C/XKUeRLn5u9ZNWE7J/U5pmxs+ooxZIaco3omhDJ1mYg3owX3BLX4vUIB3gWnBFIFdpBtf+9NLhUbUaNxx80kRxrCW5Eh9ysntjfNKU03rA9XEQMcmPzbL+0+1xo15NcCsUg1GMnz7rOyxQSqKgpBAsf5aZ8BHaKGtIYIq3wC0hiz9SKmHN3z6MoZs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4123.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(346002)(39860400002)(366004)(376002)(396003)(38100700002)(66556008)(8676002)(66476007)(4326008)(54906003)(66946007)(316002)(86362001)(31696002)(2616005)(31686004)(6486002)(41300700001)(6666004)(2906002)(478600001)(8936002)(6506007)(186003)(53546011)(26005)(83380400001)(5660300002)(6512007)(36756003)(66574015)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YmY4OWxLWmtmbDMwaVRmUm9sbW5Rald3Q24rR0N3eUZJd25lM2dVWldla0Rv?= =?utf-8?B?anM4bjZPc0I4WWh1c3NmRW1qdzFmeUVUa1VPbTRqSUJQUzhVQmgxd1NSbWZH?= =?utf-8?B?bVFIMkRtSVNoc2U4RWl5U3A2dk53Y2tXSGcvaXMySU9CenJOTG82QVNLUTND?= =?utf-8?B?QlRsQWdsczZwQ3dTQ2R1bFJlQmxmeDRnamMwRU9lTmtlUU1BN1ZwRUdMUG5E?= =?utf-8?B?ektqNlZvZEhHczhuWUxmMHhQVVEvSjU2RW13VVBWOEJ5NGtlV3B5ZytUNFVR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HRhayt1M3huL3FaSEE5aEN5OWhBek5NbG5E?= =?utf-8?Q?dNJ0BsvHgKYLA2yZJoKq3/uJM?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34a64f19-d3c3-404b-dcce-08da5e9b34fb X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4123.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2022 15:29:53.1490 (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: bpDTQKyxSk+Y4EYone8+xCwEZYqOQnuksq+RhW/9vN4oYkzCL4dzeLIyv5Urlr/qLWn6LvczeQfGe5+VQXovKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5959 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,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 7/5/22 4:51 PM, Christian König wrote: > > > Am 04.07.22 um 15:54 schrieb Vijendar Mukunda: >> From: vijendar >> >> Fixed below checkpatch warnings and errors >> >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:131: CHECK: Comparison to NULL >> could be written "apd" >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:150: CHECK: Comparison to NULL >> could be written "apd" >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:196: CHECK: Prefer kernel type >> 'u64' over 'uint64_t' >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:224: CHECK: Please don't use >> multiple blank lines >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:226: CHECK: Comparison to NULL >> could be written "!adev->acp.acp_genpd" >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:233: CHECK: Please don't use >> multiple blank lines >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:239: CHECK: Alignment should >> match open parenthesis >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:241: CHECK: Comparison to NULL >> could be written "!adev->acp.acp_cell" >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:247: CHECK: Comparison to NULL >> could be written "!adev->acp.acp_res" >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:253: CHECK: Comparison to NULL >> could be written "!i2s_pdata" >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:350: CHECK: Alignment should >> match open parenthesis >> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:550: ERROR: that open brace { >> should be on the previous line >> >> Signed-off-by: Vijendar Mukunda >> Reviewed-by: Alex Deucher >> >> changes since v1: >>      Modified commit label as drm/amdgpu >> --- >>   drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 27 +++++++++---------------- >>   1 file changed, 10 insertions(+), 17 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c >> index cc9c9f8b23b2..ba1605ff521f 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c >> @@ -128,7 +128,7 @@ static int acp_poweroff(struct generic_pm_domain >> *genpd) >>       struct amdgpu_device *adev; >>         apd = container_of(genpd, struct acp_pm_domain, gpd); >> -    if (apd != NULL) { >> +    if (apd) { > > Well that's still not correct. The variable apd is compute by an upcast > of the genpd parameter. > > Since that upcast never returns a NULL value (gpd is not the first > member of the structure) this whole check is completely nonsense. > > I strongly suggest to just remove most of those NULL checks. Will remove Null checks and post the new patch. - Vijendar > > Only the ones directly after memory allocation really make sense. > > Regards, > Christian. > >>           adev = apd->adev; >>       /* call smu to POWER GATE ACP block >>        * smu will >> @@ -147,7 +147,7 @@ static int acp_poweron(struct generic_pm_domain >> *genpd) >>       struct amdgpu_device *adev; >>         apd = container_of(genpd, struct acp_pm_domain, gpd); >> -    if (apd != NULL) { >> +    if (apd) { >>           adev = apd->adev; >>       /* call smu to UNGATE ACP block >>        * smu will >> @@ -193,7 +193,7 @@ static int acp_genpd_remove_device(struct device >> *dev, void *data) >>   static int acp_hw_init(void *handle) >>   { >>       int r; >> -    uint64_t acp_base; >> +    u64 acp_base; >>       u32 val = 0; >>       u32 count = 0; >>       struct i2s_platform_data *i2s_pdata = NULL; >> @@ -220,37 +220,32 @@ static int acp_hw_init(void *handle) >>           return -EINVAL; >>         acp_base = adev->rmmio_base; >> - >> - >>       adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), >> GFP_KERNEL); >> -    if (adev->acp.acp_genpd == NULL) >> +    if (!adev->acp.acp_genpd) >>           return -ENOMEM; >>         adev->acp.acp_genpd->gpd.name = "ACP_AUDIO"; >>       adev->acp.acp_genpd->gpd.power_off = acp_poweroff; >>       adev->acp.acp_genpd->gpd.power_on = acp_poweron; >> - >> - >>       adev->acp.acp_genpd->adev = adev; >>         pm_genpd_init(&adev->acp.acp_genpd->gpd, NULL, false); >>   -    adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell), >> -                            GFP_KERNEL); >> +    adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell), >> GFP_KERNEL); >>   -    if (adev->acp.acp_cell == NULL) { >> +    if (!adev->acp.acp_cell) { >>           r = -ENOMEM; >>           goto failure; >>       } >>         adev->acp.acp_res = kcalloc(5, sizeof(struct resource), >> GFP_KERNEL); >> -    if (adev->acp.acp_res == NULL) { >> +    if (!adev->acp.acp_res) { >>           r = -ENOMEM; >>           goto failure; >>       } >>         i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), >> GFP_KERNEL); >> -    if (i2s_pdata == NULL) { >> +    if (!i2s_pdata) { >>           r = -ENOMEM; >>           goto failure; >>       } >> @@ -346,8 +341,7 @@ static int acp_hw_init(void *handle) >>       adev->acp.acp_cell[3].platform_data = &i2s_pdata[2]; >>       adev->acp.acp_cell[3].pdata_size = sizeof(struct >> i2s_platform_data); >>   -    r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell, >> -                                ACP_DEVS); >> +    r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell, >> ACP_DEVS); >>       if (r) >>           goto failure; >>   @@ -546,8 +540,7 @@ static const struct amd_ip_funcs acp_ip_funcs = { >>       .set_powergating_state = acp_set_powergating_state, >>   }; >>   -const struct amdgpu_ip_block_version acp_ip_block = >> -{ >> +const struct amdgpu_ip_block_version acp_ip_block = { >>       .type = AMD_IP_BLOCK_TYPE_ACP, >>       .major = 2, >>       .minor = 2, >