From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.7397.1680872844687660617 for ; Fri, 07 Apr 2023 06:07:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EiNm39oH; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0E2D650F4 for ; Fri, 7 Apr 2023 13:07:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61E41C4339C for ; Fri, 7 Apr 2023 13:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680872843; bh=JPpP7WOpzkS6moaHm0NsWLigSIRNmPcD35DL1wP5xFQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EiNm39oH5hDihuT6u9GxJOFK9Q+LPXEkIcW6dniCwFVdhrJox4KR4S8yr99IRj532 Bhl83zcEgTyP/MA8+PEdwHJD8x0Q4AHm9Mc3aL+lIIhp60Vr5O6hQVZQPnJXPFJwcw LQr/YFkw2iAH2Xu73HavMrW2l5RG/VAbTEBjNojoWFdfbV6q4cQaLST4GGsDhd1NRf /V4Nyr3vZd/cUZ7mGso2I9/YaBtjX4K0gcK7L5Q+iTo8WXaXKZneJEi8d+UhkrA3JF HtBaxzsxErDJNGRpMuG+3kHl626KLc7SjpZSkhK1fBI/rnqUjNwRWjU/0iRBv/ls4L EcOoEHFfwpthw== Received: by mail-lf1-f49.google.com with SMTP id br6so54408610lfb.11 for ; Fri, 07 Apr 2023 06:07:23 -0700 (PDT) X-Gm-Message-State: AAQBX9eyKD6WpIU9iWBeXa6IQ+m+O/UuVKYdg/2/b4nxhagU0QBDGOGF gGlHwBFRKd/VtPJaJuKBzJzSBFMdDETuoq6KPFo= X-Google-Smtp-Source: AKy350ZIbtwj4QKyqITcFh4AluU0iMJpIzx+om5H7ZOhlB+9qkxmleAD5JFKBBC0DfE8vWywtJS7sxEwZwxCgikKwTw= X-Received: by 2002:ac2:5dc1:0:b0:4eb:3f68:553f with SMTP id x1-20020ac25dc1000000b004eb3f68553fmr715643lfq.9.1680872841438; Fri, 07 Apr 2023 06:07:21 -0700 (PDT) MIME-Version: 1.0 References: <77a6f44f-cd1f-71a7-0964-c8bc9fc103d5@bsdio.com> <20230407103934.86756-1-marcin.juszkiewicz@linaro.org> In-Reply-To: From: "Ard Biesheuvel" Date: Fri, 7 Apr 2023 15:07:10 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v2] add ArmCpuInfo EFI application To: Marcin Juszkiewicz Cc: devel@edk2.groups.io, Ard Biesheuvel , Leif Lindholm , Rebecca Cran Content-Type: text/plain; charset="UTF-8" On Fri, 7 Apr 2023 at 14:46, Marcin Juszkiewicz wrote: > > W dniu 7.04.2023 o 12:55, Ard Biesheuvel pisze: > > Hello Marcin, > > > > Thanks for this - it looks useful. > > Some comments below. > > Thanks. > > On Fri, 7 Apr 2023 at 12:40, Marcin Juszkiewicz > > wrote: > >> ... > >> + char* description; > >> + char* bits; > > > > CONST > > It is not const. > The pointer is not const but the string is const char *bits; allows you to make 'bits' point to different constant string literals. char *bits; is only needed if you are pointing 'bits' at a string and subsequently modify the /contents/ of the string, but i don't thank that is what you are doing here. > >> + > >> + > >> + bits = "3:0 "; > >> + value = aa64mmfr0_el1 & 0xf; > >> + switch(value) > > > > Space after switch > > done > > >> + if(value == 0b0110) > > > > Space after if > > done > > > etc etc > > > > There are some other style issues here, which I am sure the CI will > > whine about, so you might want to run uncrustify on it. > > done >