Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3344784rwb; Mon, 7 Aug 2023 11:57:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0uACDvlPCZ1xaPYlvY6srtloApXX4YgSOCOP9Q4tSF3povG7mSlpH6W7/vTlbdcBPg6bU X-Received: by 2002:a17:90a:68c4:b0:268:b7a2:62f1 with SMTP id q4-20020a17090a68c400b00268b7a262f1mr8623069pjj.27.1691434661762; Mon, 07 Aug 2023 11:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691434661; cv=none; d=google.com; s=arc-20160816; b=nVNOZJsoRQrds/VhzuuY3wydKAcDAB9jVB9ujQVKm0/Kwv7INbzfSdT8dZoQ5CfND1 pCuwSQTWsXpsQGZli+Humfz9ZqTftRjVqqsKGhpJHh65VteEXts5jwoHyz6K15Ctb4qQ JhiycbkrelNjI7lsnXxOpMuek/tU5qpwKwooKvQJvquhei9K9aiqBVHHjLeW2xObG/XA t6oFV3I1uWDxkl9k6EO40dcOcKN/BMF1mTOCily4/cl8rU+2vubDFtT5sZ/jD4sEmMg2 U6mSOEd+P6uFWGuJn+Gkr8eJjVpHjIdk7BHTs2evstIR8RX1KR516ZSoDLPv1R7UCoRr +pSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VRFYnEPdLG8+V3CbBn+Rgg8YFLvKXfz9kmIHrHlJZqY=; fh=YwR8hmjC2QSif+72cT3/sIS32/1FMEJSAUJ+j+OuTzU=; b=LH4ZgzGh595gQc3B8nKjCfKIy/jvZ3UsVa2yxx9cMEFI60WeoTXrUoMP7vP1xwxkQw DpMKTpYeuno37y7SPyGkrLeM/3MYhBehrBf8kUX6lJgR0Zdqq3TZRbyPRwRd91ngHW1L uTVf9YLEJ235RF5DKf9frjgWm5HqdUxDmQ9Q33WC0S/8LQD/YwrAxfGSP5tB7iin8Inl Z+DMFGeHk4/B5sMOKdlVrBXbkq4eRLGPqyISf+hHg07J7HiyBuRBbMtQtNqGkGNk5q/M PM/Ko0StAxhe5klo+iWJVLe6GvxICsRCjNw4YlMYi2e2jD1MS9KNa8K750DeWRtn5ZDn M7IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=i3AZl7f1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs7-20020a17090af50700b00267ec79de52si8308352pjb.11.2023.08.07.11.57.30; Mon, 07 Aug 2023 11:57:41 -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=@gmail.com header.s=20221208 header.b=i3AZl7f1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231623AbjHGRaI (ORCPT + 99 others); Mon, 7 Aug 2023 13:30:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231534AbjHGRaG (ORCPT ); Mon, 7 Aug 2023 13:30:06 -0400 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D245310F3 for ; Mon, 7 Aug 2023 10:30:04 -0700 (PDT) Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6bcccbd9365so3698237a34.2 for ; Mon, 07 Aug 2023 10:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691429404; x=1692034204; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VRFYnEPdLG8+V3CbBn+Rgg8YFLvKXfz9kmIHrHlJZqY=; b=i3AZl7f1zQofjB/HlnVbZ0HkHBJAKfQRelucEctSEMbl3SzjzuOLPDMB3JyLPFd3Jo y/afLAWDZkGKugC/SslQIaj42iw2fBK5bAg0NJvAPvyEfnXp1N4J95KebsMtI5IQlgMt NMWEM1l0ba1qcCgKdR46GTsKUyolgRKeWaJm7PSy26bb98/2C4X4vtnmgJBPDgHx9Z0C oPs+dFG+87CDjhFjsz/3A6MuHm6WYG4JSLFu7ZqSltqLAIDBcqb6i+J+fJ4EUCqpHKo1 1i0TpKUo9T/IF/FfUr799Mc9ec4zbzUFgf4CBZ2jGLYo3566dqTOwct9jJrCOYvPanN0 qA5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691429404; x=1692034204; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VRFYnEPdLG8+V3CbBn+Rgg8YFLvKXfz9kmIHrHlJZqY=; b=aJ6cjxCofiK9ZB08PIdOu2a61eQe4ihT8uWUAq0eRSl8yx1zGOXZFS1UbLVAV09O/E /SOZPQtPo6E2kUYQiTN8LdHP28M3JddKa7LYQ0Px2lg+o3rGpY23aLzsuba0PHwQKjVl Fy/JxiKT4m6V4IiuWXds0JQeSb68Zx3QBABTsKWmgxQOFw0Kn37N8tztOEYS7C+iMRyX ACJlZ95SC9yHvHbIyNeDCXF0Z8cawd1zMp6gBvf4c9CKg2bD647JRj+xvgTE3jtaRlX6 3MeRGBoV4Tfnd0EuSAMkNbCWgxtxK0S2FowTC/nmC5ICQeZAkL9D/UHV9eyvtYn2nGV+ hugw== X-Gm-Message-State: AOJu0YygblHdHHvz4pqFovLIt8F0scx4cBySAVLzmJx/oz6im6mhburL LGbs97Nsa6e1MZo3hNbPEYjHPZRoxZ93bjomV70= X-Received: by 2002:a05:6871:6a9:b0:1ba:2c39:5cf3 with SMTP id l41-20020a05687106a900b001ba2c395cf3mr12446829oao.31.1691429404084; Mon, 07 Aug 2023 10:30:04 -0700 (PDT) MIME-Version: 1.0 References: <20230802073439.13432-1-sunran001@208suo.com> In-Reply-To: <20230802073439.13432-1-sunran001@208suo.com> From: Alex Deucher Date: Mon, 7 Aug 2023 13:29:53 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: Clean up errors in nv.c To: Ran Sun Cc: alexander.deucher@amd.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Applied. Thanks! On Wed, Aug 2, 2023 at 3:34=E2=80=AFAM Ran Sun wrote= : > > Fix the following errors reported by checkpatch: > > ERROR: that open brace { should be on the previous line > > Signed-off-by: Ran Sun > --- > drivers/gpu/drm/amd/amdgpu/nv.c | 48 +++++++++++---------------------- > 1 file changed, 16 insertions(+), 32 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu= /nv.c > index 51523b27a186..414c3c85172d 100644 > --- a/drivers/gpu/drm/amd/amdgpu/nv.c > +++ b/drivers/gpu/drm/amd/amdgpu/nv.c > @@ -67,21 +67,18 @@ > static const struct amd_ip_funcs nv_common_ip_funcs; > > /* Navi */ > -static const struct amdgpu_video_codec_info nv_video_codecs_encode_array= [] =3D > -{ > +static const struct amdgpu_video_codec_info nv_video_codecs_encode_array= [] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 2304, 0)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 4096, 23= 04, 0)}, > }; > > -static const struct amdgpu_video_codecs nv_video_codecs_encode =3D > -{ > +static const struct amdgpu_video_codecs nv_video_codecs_encode =3D { > .codec_count =3D ARRAY_SIZE(nv_video_codecs_encode_array), > .codec_array =3D nv_video_codecs_encode_array, > }; > > /* Navi1x */ > -static const struct amdgpu_video_codec_info nv_video_codecs_decode_array= [] =3D > -{ > +static const struct amdgpu_video_codec_info nv_video_codecs_decode_array= [] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4= 096, 3)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4= 096, 5)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 4096, 52)}, > @@ -91,8 +88,7 @@ static const struct amdgpu_video_codec_info nv_video_co= decs_decode_array[] =3D > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 435= 2, 0)}, > }; > > -static const struct amdgpu_video_codecs nv_video_codecs_decode =3D > -{ > +static const struct amdgpu_video_codecs nv_video_codecs_decode =3D { > .codec_count =3D ARRAY_SIZE(nv_video_codecs_decode_array), > .codec_array =3D nv_video_codecs_decode_array, > }; > @@ -108,8 +104,7 @@ static const struct amdgpu_video_codecs sc_video_code= cs_encode =3D { > .codec_array =3D sc_video_codecs_encode_array, > }; > > -static const struct amdgpu_video_codec_info sc_video_codecs_decode_array= _vcn0[] =3D > -{ > +static const struct amdgpu_video_codec_info sc_video_codecs_decode_array= _vcn0[] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4= 096, 3)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4= 096, 5)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 4096, 52)}, > @@ -120,8 +115,7 @@ static const struct amdgpu_video_codec_info sc_video_= codecs_decode_array_vcn0[] > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1, 8192, 435= 2, 0)}, > }; > > -static const struct amdgpu_video_codec_info sc_video_codecs_decode_array= _vcn1[] =3D > -{ > +static const struct amdgpu_video_codec_info sc_video_codecs_decode_array= _vcn1[] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4= 096, 3)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4= 096, 5)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 4096, 52)}, > @@ -131,27 +125,23 @@ static const struct amdgpu_video_codec_info sc_vide= o_codecs_decode_array_vcn1[] > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 435= 2, 0)}, > }; > > -static const struct amdgpu_video_codecs sc_video_codecs_decode_vcn0 =3D > -{ > +static const struct amdgpu_video_codecs sc_video_codecs_decode_vcn0 =3D = { > .codec_count =3D ARRAY_SIZE(sc_video_codecs_decode_array_vcn0), > .codec_array =3D sc_video_codecs_decode_array_vcn0, > }; > > -static const struct amdgpu_video_codecs sc_video_codecs_decode_vcn1 =3D > -{ > +static const struct amdgpu_video_codecs sc_video_codecs_decode_vcn1 =3D = { > .codec_count =3D ARRAY_SIZE(sc_video_codecs_decode_array_vcn1), > .codec_array =3D sc_video_codecs_decode_array_vcn1, > }; > > /* SRIOV Sienna Cichlid, not const since data is controlled by host */ > -static struct amdgpu_video_codec_info sriov_sc_video_codecs_encode_array= [] =3D > -{ > +static struct amdgpu_video_codec_info sriov_sc_video_codecs_encode_array= [] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 2160, 0)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 7680, 43= 52, 0)}, > }; > > -static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array= _vcn0[] =3D > -{ > +static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array= _vcn0[] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4= 096, 3)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4= 096, 5)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 4096, 52)}, > @@ -162,8 +152,7 @@ static struct amdgpu_video_codec_info sriov_sc_video_= codecs_decode_array_vcn0[] > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1, 8192, 435= 2, 0)}, > }; > > -static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array= _vcn1[] =3D > -{ > +static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array= _vcn1[] =3D { > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4= 096, 3)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4= 096, 5)}, > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 409= 6, 4096, 52)}, > @@ -173,20 +162,17 @@ static struct amdgpu_video_codec_info sriov_sc_vide= o_codecs_decode_array_vcn1[] > {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 435= 2, 0)}, > }; > > -static struct amdgpu_video_codecs sriov_sc_video_codecs_encode =3D > -{ > +static struct amdgpu_video_codecs sriov_sc_video_codecs_encode =3D { > .codec_count =3D ARRAY_SIZE(sriov_sc_video_codecs_encode_array), > .codec_array =3D sriov_sc_video_codecs_encode_array, > }; > > -static struct amdgpu_video_codecs sriov_sc_video_codecs_decode_vcn0 =3D > -{ > +static struct amdgpu_video_codecs sriov_sc_video_codecs_decode_vcn0 =3D = { > .codec_count =3D ARRAY_SIZE(sriov_sc_video_codecs_decode_array_vc= n0), > .codec_array =3D sriov_sc_video_codecs_decode_array_vcn0, > }; > > -static struct amdgpu_video_codecs sriov_sc_video_codecs_decode_vcn1 =3D > -{ > +static struct amdgpu_video_codecs sriov_sc_video_codecs_decode_vcn1 =3D = { > .codec_count =3D ARRAY_SIZE(sriov_sc_video_codecs_decode_array_vc= n1), > .codec_array =3D sriov_sc_video_codecs_decode_array_vcn1, > }; > @@ -536,8 +522,7 @@ static void nv_program_aspm(struct amdgpu_device *ade= v) > > } > > -const struct amdgpu_ip_block_version nv_common_ip_block =3D > -{ > +const struct amdgpu_ip_block_version nv_common_ip_block =3D { > .type =3D AMD_IP_BLOCK_TYPE_COMMON, > .major =3D 1, > .minor =3D 0, > @@ -642,8 +627,7 @@ static int nv_update_umd_stable_pstate(struct amdgpu_= device *adev, > return 0; > } > > -static const struct amdgpu_asic_funcs nv_asic_funcs =3D > -{ > +static const struct amdgpu_asic_funcs nv_asic_funcs =3D { > .read_disabled_bios =3D &nv_read_disabled_bios, > .read_bios_from_rom =3D &amdgpu_soc15_read_bios_from_rom, > .read_register =3D &nv_read_register, > -- > 2.17.1 >