Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4292590pxb; Tue, 2 Nov 2021 07:22:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiI+whapXERgrX8ub2CQD2t/qtTXqyyLm2BaodnHFpxB/8yHp+FjLPHKzmHDhHwdydhL/1 X-Received: by 2002:a17:907:7601:: with SMTP id jx1mr45711306ejc.69.1635862977499; Tue, 02 Nov 2021 07:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635862977; cv=none; d=google.com; s=arc-20160816; b=u68clBr114jrExqcn+duYj2Az6J/hGZyWJGq9va18u28cl7Gd8/S7cNxArfSxpSbFi +bRkOnNyzdHAR6WjOsht8YOYmIZA/wnAztXbwin0/NsR4II9UY16yfLwmmAW/WzXg8q6 HRw6jsSUrad0C1BoE9UryUIqHC2Onxp1UmVfGVlMjKMiocGvgEIZoDKT9fu4Pn9Ypf0t VlJmyv/Hy6iqkC1hpmHWDIHH9n1olotCKW8hE0IfCbk4foZ2A8y9efDVXclwiZVErHnY RbV2e5jJj5PyFBx8+SJhax6xiNW2kdyBjUp9wrqCwvo52d+o05Tti3ZEq9oJ/laXJDOB GTtQ== 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=GDaXd54uUw4cuAEtFwh6e0QjRhac1tHiBl7h6VYXG/c=; b=riLRvgK0tGbk0Z794ex+R3Guv64/j6UQh3B1dPSQSlc2z5x0be32yA4bEBgnIIZlbI qZvSFzY2gi4NfGOpFN0U0c7P6cJ0XAkXivMyRptXhPI2oPgin5KbiUTkoTBe7Kp5WE6J 7fLkjD8OG2IVS+yK+7PwoN/ALGdMdYP+TkUL4jpZIgR+jrI6vJjtGgvyIPktsTjjCI/f zFIH0bPtP0UQ9gfVxEEGgjTASak90OJV9MShbXJCh7zYdRzuDKz4rfY3dGy5WY/nWIqm 31bnOp2am3gTghlFEP/fZyLJ3k0XRYGrz4aucmiI4p8kAWex7gb7hgn/FxIzA/v1aDxG XVGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="QJn/USQb"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk39si3980579ejc.470.2021.11.02.07.22.17; Tue, 02 Nov 2021 07:22:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="QJn/USQb"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231133AbhKBOYk (ORCPT + 99 others); Tue, 2 Nov 2021 10:24:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbhKBOYh (ORCPT ); Tue, 2 Nov 2021 10:24:37 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BDAC0613F5 for ; Tue, 2 Nov 2021 07:22:02 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id j5so2637387lja.9 for ; Tue, 02 Nov 2021 07:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GDaXd54uUw4cuAEtFwh6e0QjRhac1tHiBl7h6VYXG/c=; b=QJn/USQbVp/0vR8XPnX2DMLOk3xYoQA/IM8xLrQIehB8YQx5EukbUbA/mJHcXBpby3 XB3CU9KVNX2xorF1SURYNJchcROb84nHp/wT4k3RkvubbLHpcf5umpqh7oT/YGBrFg5o 5bIGMLq+CBa1V7G1XxdUCu8mhgI45tMVNGe1/xU7swzROHApnGGzelcn63q4fPmgWgk3 an6jWvsRGND6+sKSiZ5kcbhF8zSsbwYfbT9H+tEVWWATJ7EsoeVELfZM+/g0xmBQf0lP hMTu50wKJp1inyMNK9NUStV8uJdPfgikGifEmJ77hVT/rA/o6gK6IprmIib98NvDsNkN lZZw== 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=GDaXd54uUw4cuAEtFwh6e0QjRhac1tHiBl7h6VYXG/c=; b=RqVLOkiHN98SMa8B3l8P1oUw8uPoni87oh4FAkPXxtAtKF37hx/Ng3MHWG64IDJ4dm DOtrxfq6jJ87Gp7s0dgu5Tr8mEbAlOVoQQ9qORv/3VnKpaJAgRGniyr8xamELwweYOS4 te1/udRoYiLQc8LYogVfyCpUI/11R//wlHzwX0TsgKwOWFbJ2/Ue1cmhPT06mS9Kryww L7C01QgR4j0P8TWqxuPJo1fndJyDRjXgPIXRQyFSv0kCB/0heEvCjjIiSpbGqLmuj4jg 11S5b+0eXlaa5a8Bpks+8pcV76h7Y8N68saCm5y/z+l6XnOMt9uPrhc8bP18JYd5pwwb oKDQ== X-Gm-Message-State: AOAM530sxPJGDePjBGNiE8KeMU517oJLDAuI342NYIGyClcSQ3PQqjM7 Maqn59vsr5hTaGD22YoRFR+Z3sy3dSlYLxh3c77+2Q== X-Received: by 2002:a2e:161c:: with SMTP id w28mr38245243ljd.132.1635862920249; Tue, 02 Nov 2021 07:22:00 -0700 (PDT) MIME-Version: 1.0 References: <20211101172127.3060453-1-pgonda@google.com> <20211101172127.3060453-5-pgonda@google.com> <952fa937-d139-bd90-825c-f7dfca8d8cb9@amd.com> In-Reply-To: From: Peter Gonda Date: Tue, 2 Nov 2021 08:21:48 -0600 Message-ID: Subject: Re: [PATCH V2 4/4] crypto: ccp - Add SEV_INIT_EX support To: Tom Lendacky Cc: David Rientjes , Marc Orr , Brijesh Singh , Joerg Roedel , Herbert Xu , John Allen , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Nov 1, 2021 at 2:02 PM Tom Lendacky wrote: > > On 11/1/21 2:18 PM, Peter Gonda wrote: > > On Mon, Nov 1, 2021 at 12:41 PM Tom Lendacky wrote: > >> On 11/1/21 12:21 PM, Peter Gonda wrote: > > ... > > >>> + > >>> + fp = filp_open(init_ex_path, O_RDONLY, 0); > >>> + if (IS_ERR(fp)) { > >>> + const int ret = PTR_ERR(fp); > >> > >> I don't think you need the "const" here. > > > > Sounds good, removed. I normally default to consting a variable if I > > don't expect/want it to change. What guidance should I be following > > here? > > Heh, I don't know... I guess since its in such a short scope it just read > easier to me. But, you're correct, const is appropriate here, so I guess > feel free to leave it in if you want. Thanks! I'll remove it here to be more consistent with this file. > > > > >> > > ... > > >> "SEV: write successful to NV file\n" > > > > Updated all messages. Should have noted the "SEV: .." format. > > It's not like we were very consistent originally, but it would be nice to > have the new messages start to maintain a consistency. > > Thanks, > Tom > > >