Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3449853pxb; Fri, 4 Feb 2022 08:47:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8L2hSBsHwoYFjwIhSiBRUzBH5RRGM28ynx035qKswuoMPU6iakiW+g4aOLtoQ9kGH6aVh X-Received: by 2002:aa7:c258:: with SMTP id y24mr3959203edo.288.1643993248188; Fri, 04 Feb 2022 08:47:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643993248; cv=none; d=google.com; s=arc-20160816; b=ilbWzKeO30b2phjfzaB4kjcUO8o6GqciDWeYsTRoi8l+zhAv8pxvirSx3EL38IWVqQ 48NrMVgqKYUTmszieftXqsoO5OfNytYxjTt6TFG2Ulk5gbOiMcEs7tj16r6Eppzo5mJF FNhZUukjgkjzNwdbwJdDiiE8pI6l9vEeHYc+Jb71/JF6LtVIQMZItazW0sEvQ4Nr5B5/ 4ULBDgbK3IGKLfhoVaypxOwRcvGf34MM62+z7b8llA7/JUh8MbjWKZ2XoQ0EzGEI5ctj N8TM9/k517Gdfs7+SbE2qPtx7iYgBCI5HfwOl3tJzp/MaB7oYQZqpjb3UKz7LiclLBug eXBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WrQwIpuL5QQfrgQ1xY53TifwqFAdlu7lxhrd4A0K1Og=; b=XLXjde2kdUQ28Ts5QU7GWEaukJYDkbGSPIbnnZ782SRCj6Df79sK3gyFH8NS4pP34F 2lXzpCXRFcYye6cTmLBkKaQg6dd1TXJxEgZMw/dleieWM6QmgOrx+ffAWfitnUKnPoOP IMcXGiq+kp/QGHEhL2xI963CYiuKiCTctuugsU6bX0YmM/VEIoQecDCkeXl8MlcmmHNe xDFEexNWlgAs9DnudTktw3aBeBbibYiYPjtRu17o56PrOIgyyP8nitoOZkVKwmjMOu6D eE37IHFFFoWscqUAw94oixd6+9eVA9tmOBhFov88dQ3bG9pL/NS2eH7vb1lD3wYUzizC nOGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=ZUhCgpFY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he20si1544620ejc.771.2022.02.04.08.47.00; Fri, 04 Feb 2022 08:47:27 -0800 (PST) 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=@jms.id.au header.s=google header.b=ZUhCgpFY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343640AbiBDGzo (ORCPT + 99 others); Fri, 4 Feb 2022 01:55:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242384AbiBDGzm (ORCPT ); Fri, 4 Feb 2022 01:55:42 -0500 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2183FC06173D for ; Thu, 3 Feb 2022 22:55:42 -0800 (PST) Received: by mail-qv1-xf2b.google.com with SMTP id g3so33453qvb.8 for ; Thu, 03 Feb 2022 22:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WrQwIpuL5QQfrgQ1xY53TifwqFAdlu7lxhrd4A0K1Og=; b=ZUhCgpFYZFBMz0t/T/beYFLKyn+oTMgDvYNPCbrlZ+O0b0zjcOqM77KZwgcsko/rfY Opae/By9+juSbUqZyAJn3N+M/IW4QNYoDVqQn5S8v1Wg9cw35yR5424cTMW/AzJfReQW d4r4Sn5ZhN1aL1JuGq5Xyb2RcWHA5vjxUlYPU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WrQwIpuL5QQfrgQ1xY53TifwqFAdlu7lxhrd4A0K1Og=; b=geOgxHztpWYUNroPCgSPTIweCdAgpafbez6xJgqEVQUPPVA6TsRfaL6caOZ7bVE0lu 8CthvFnQfm8ukdd7OCAvl+SKiEbIo/cG9SZ2qj1YTMe0nqiBjWkG5WunFlGFnTpqwf2/ aueQFvWmaf4a/U5t8kpfgjr5AmuykaisCJQoib32PL3IIfo/qIzpcjF0K88WQ2NchfnW jdmgrn8T58QPAls5M5v/N0qjbnXPhk7v1J2jeOfpm9OYCBdsLmJ08MNPfkvtp7xr8YD/ m1ayWfdtfRnb8yvPY+Z67Q4KlfgBVEhNM2Fi9p+oCueJJx55HhOddrVW5sLJzVuyv/1W 18YA== X-Gm-Message-State: AOAM532W/ltKaN8hxrdjlR2zsOLaE0OrnYP+waxB7V0tFtXHrU4DdDeN ZYLT7AKf8Esi9ClKeiTxXrWfiAHQ6+ufwU3Gcu8= X-Received: by 2002:ad4:5f89:: with SMTP id jp9mr908243qvb.130.1643957739826; Thu, 03 Feb 2022 22:55:39 -0800 (PST) MIME-Version: 1.0 References: <20220203115344.267159-1-joel@jms.id.au> <20220203115344.267159-2-joel@jms.id.au> In-Reply-To: From: Joel Stanley Date: Fri, 4 Feb 2022 06:55:26 +0000 Message-ID: Subject: Re: [PATCH v2 1/3] firmware: Add boot information to sysfs To: Greg Kroah-Hartman Cc: Arnd Bergmann , Andrew Jeffery , "Rafael J . Wysocki" , Linux Kernel Mailing List , Linux ARM , linux-aspeed Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Feb 2022 at 12:44, Greg Kroah-Hartman wrote: > > On Thu, Feb 03, 2022 at 10:23:42PM +1030, Joel Stanley wrote: > > diff --git a/include/linux/firmware_bootinfo.h b/include/linux/firmware_bootinfo.h > > new file mode 100644 > > index 000000000000..3fe630b061b9 > > --- /dev/null > > +++ b/include/linux/firmware_bootinfo.h > > @@ -0,0 +1,22 @@ > > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > > I have to ask, do you really mean "or later"? Yeah. That's what we're told we should use. > > +/* Copyright 2022 IBM Corp. */ > > + > > +#include > > +#include > > + > > +#define BOOTINFO_SET(b, n, v) b.n.en = true; b.n.val = v > > Please use a while {} loop around these two statements. > > Didn't checkpatch warn you about that? No, it didn't. I'll add it. > > > +struct bootinfo_entry { > > + bool en; > > What does "en" mean? "enabled"? If so, please spell it out. > > > + bool val; > > How can a "value" have a boolean? Is this "valid"? Again, please spell > it out, we have no lack of letters to use here to keep people from being > confused. I meant value. I think it's reasonable for a value to be true or false. I'll make the names clearer with docs as you suggest. > > Can you please use kernel-doc comments to describe this structure? > > > > +}; > > + > > +struct bootinfo { > > + struct bootinfo_entry abr_image; > > + struct bootinfo_entry low_security_key; > > + struct bootinfo_entry otp_protected; > > + struct bootinfo_entry secure_boot; > > + struct bootinfo_entry uart_boot; > > +}; > > Same here, please use kernel-doc > > > + > > +int __init firmware_bootinfo_init(struct bootinfo *bootinfo_init); > > __init is not needed on a function definition like this. ack.