Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3313128rwb; Mon, 7 Aug 2023 11:21:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpHklJ7hjl4eg3s7T6ZV60HKFg61aOwrFhvXuVbs6hdbFkcnxPbyDCOZVZzuo8Bjg8nChR X-Received: by 2002:aa7:8884:0:b0:687:9909:3c75 with SMTP id z4-20020aa78884000000b0068799093c75mr12534868pfe.4.1691432485850; Mon, 07 Aug 2023 11:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691432485; cv=none; d=google.com; s=arc-20160816; b=m2/qbkvzb/PU0gE52sDGjQs8Mc/cLOvukIenmwTlRmYDuRe7O+CnG35CCL0I1R5ewD V4s+vFJKgj7nuYIBDRwcIB14Voa+76EoSvhdWkWyFp0uppoCKgnTdSfNSj2MoQw+wxue hgqfk/maAYlhOKqkA5awLDemEcVblSBsIsZWRQDyT6OW2CV1dx3tU7safsf2nZ8Q65Ad pLwNHmZ9f8azZmLXDbLGoYqJCYZX4JnZ9rtVFU7NcUzlYnx9E5a5ScWYrZHwsR0YRNcZ +PAZpUv9FJ+vDPqT3/FYB5TyzGuGwS3H3r/IdEJpdYR9Gc2hyytF+a9aJPxkYxqYsmiI yQYQ== 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=nNT2pPzXo/+0oZm3DAtNl1Zdp8iCzJdD2Cg8qDW5Fmc=; fh=YwR8hmjC2QSif+72cT3/sIS32/1FMEJSAUJ+j+OuTzU=; b=kEIIJ1qIWclyrHwFZtfCwNuk3jPutlGIuYZUef1IuwDEFx2xIadcDT161qrJagAx9t TbtJRwUzpzMYJ2aESunSQVphH34VvwsT7wEDxT7Qov8TWdsr704CWIFtWwKAKtZIgJMP DiR5yIySLdyxyJmUSwtifzEYZzwBKQMxK5OiZabdPC+50SVYuj15dNXx9WmL4hguYbuW U4AF1OyCpEXSnaNNAHtucJgY9iRNW52+Kw57eL4QPjrbS0Lx65tV5JG3b/KVSiZwCLC0 e5QAIWWwILUDxVnXVKoSsXuKMLfHPjCWmMlO3y3QUFA9xDerwf4aR22xca1+61o9SxX5 g5XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Sau5uY4A; 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 a32-20020a634d20000000b00533fce755adsi5794806pgb.130.2023.08.07.11.21.14; Mon, 07 Aug 2023 11:21:25 -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=Sau5uY4A; 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 S229572AbjHGROP (ORCPT + 99 others); Mon, 7 Aug 2023 13:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbjHGROL (ORCPT ); Mon, 7 Aug 2023 13:14:11 -0400 Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81DBE1FEB for ; Mon, 7 Aug 2023 10:13:48 -0700 (PDT) Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1bed90ee8b7so2683150fac.0 for ; Mon, 07 Aug 2023 10:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691428413; x=1692033213; 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=nNT2pPzXo/+0oZm3DAtNl1Zdp8iCzJdD2Cg8qDW5Fmc=; b=Sau5uY4A4SOGreJsBXpdzR0RFtMroS+Xw/+Dd2z/O2K7zss8phvshitDjUeP4uIwfh BsbzhMeT7vsslDRSoCacSCa+ovbnQlw8rBoXC7K0wP+Wy+1KI7q09Sf6LS+vm4ulke3O sxUFFmnLuLY871Ai+1BlzRHBxCGAmIsVSMt7LYSjy0nv8uswR5JEG07J0g3YBVq3bsze ctrP5wRMQwzyLdIiJ0LW/P1+JRc53bp8m3qHcw3Z8er45mGugQnf4BMUthx8gQWffOf6 VYgIRSicd50rPgSqTM80X4YUl82qfBzE3xs+dJlKf1EPYcS1adX+hOjfXwV6B2I58kg3 uN2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691428413; x=1692033213; 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=nNT2pPzXo/+0oZm3DAtNl1Zdp8iCzJdD2Cg8qDW5Fmc=; b=dfCBm/O53ll7YSgxcAskoPBwCyCDdKlXZBFSs7MpFguv6v64HF6HKtffxWvIEbf5QX 0zPk9ISn1G0m0yRV38jyMRKA94RwW5GMFL+MRafQE3p6Wll83id5vm5f+fuBBedpt5GT 053GzROfliBuyl+oa4QOUmrToojMaWvAcK5fxlAgCTbpdVZGH+bB3EFdsIwgivfsFd5O 5JhEaSqr0zzpLoreBbkXrA8E1I/zj3dI5XFNAsKdfTg+HuGZKeYIIBXu/Xez3BPBqbf3 JNw2q28MchCt4USlLvKql1iIr+FknvyKjt+ZuWJGiaDazL0HuXVfkYI9XRaUG85KZBOg /zQA== X-Gm-Message-State: AOJu0Yzq9rE+Upy+qVlTMHRN6AwBR5NQfX31ajIvBmhPed/9ty6tGuyf +x25PXgzOvO3GjjhLdsp8tE8oqcRMsR54q3oPmRQHSN+ X-Received: by 2002:a05:6870:148f:b0:1bb:c946:b80e with SMTP id k15-20020a056870148f00b001bbc946b80emr9826593oab.28.1691428412855; Mon, 07 Aug 2023 10:13:32 -0700 (PDT) MIME-Version: 1.0 References: <20230802032256.10846-1-sunran001@208suo.com> In-Reply-To: <20230802032256.10846-1-sunran001@208suo.com> From: Alex Deucher Date: Mon, 7 Aug 2023 13:13:22 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: Clean up errors in bios_parser2.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! As a follow up patch, care to drop the break statements after a return? On Tue, Aug 1, 2023 at 11:23=E2=80=AFPM Ran Sun wrot= e: > > Fix the following errors reported by checkpatch: > > ERROR: switch and case should be at the same indent > ERROR: code indent should use tabs where possible > > Signed-off-by: Ran Sun > --- > .../drm/amd/display/dc/bios/bios_parser2.c | 32 +++++++++---------- > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers= /gpu/drm/amd/display/dc/bios/bios_parser2.c > index 540d19efad8f..033ce2638eb2 100644 > --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c > +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c > @@ -772,20 +772,20 @@ static enum bp_result bios_parser_get_device_tag( > return BP_RESULT_BADINPUT; > > switch (bp->object_info_tbl.revision.minor) { > - case 4: > - default: > + case 4: > + default: > /* getBiosObject will return MXM object */ > - object =3D get_bios_object(bp, connector_object_id); > + object =3D get_bios_object(bp, connector_object_id); > > if (!object) { > BREAK_TO_DEBUGGER(); /* Invalid object id */ > return BP_RESULT_BADINPUT; > } > > - info->acpi_device =3D 0; /* BIOS no longer provides this = */ > - info->dev_id =3D device_type_from_device_id(object->devic= e_tag); > - break; > - case 5: > + info->acpi_device =3D 0; /* BIOS no longer provides this = */ > + info->dev_id =3D device_type_from_device_id(object->devic= e_tag); > + break; > + case 5: > object_path_v3 =3D get_bios_object_from_path_v3(bp, conne= ctor_object_id); > > if (!object_path_v3) { > @@ -1580,13 +1580,13 @@ static bool bios_parser_is_device_id_supported( > uint32_t mask =3D get_support_mask_for_device_id(id); > > switch (bp->object_info_tbl.revision.minor) { > - case 4: > - default: > - return (le16_to_cpu(bp->object_info_tbl.v1_4->supportedde= vices) & mask) !=3D 0; > - break; > - case 5: > - return (le16_to_cpu(bp->object_info_tbl.v1_5->sup= porteddevices) & mask) !=3D 0; > - break; > + case 4: > + default: > + return (le16_to_cpu(bp->object_info_tbl.v1_4->supportedde= vices) & mask) !=3D 0; > + break; > + case 5: > + return (le16_to_cpu(bp->object_info_tbl.v1_5->supportedde= vices) & mask) !=3D 0; > + break; > } > > return false; > @@ -1755,7 +1755,7 @@ static enum bp_result bios_parser_get_firmware_info= ( > case 2: > case 3: > result =3D get_firmware_info_v3_2(bp, inf= o); > - break; > + break; > case 4: > result =3D get_firmware_info_v3_4(bp, inf= o); > break; > @@ -2225,7 +2225,7 @@ static enum bp_result bios_parser_get_disp_connecto= r_caps_info( > return BP_RESULT_BADINPUT; > > switch (bp->object_info_tbl.revision.minor) { > - case 4: > + case 4: > default: > object =3D get_bios_object(bp, object_id); > > -- > 2.17.1 >