Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5228424rdb; Sat, 16 Sep 2023 07:58:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlpdqIK5aLQaNRGM9l7Z/uKZpRZ3dVawZZpTLH/rrCA5zJcDH6anMBp3qCu6dFKBQLtQSl X-Received: by 2002:a17:903:2442:b0:1c3:aa8d:4daa with SMTP id l2-20020a170903244200b001c3aa8d4daamr5153531pls.44.1694876330081; Sat, 16 Sep 2023 07:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694876330; cv=none; d=google.com; s=arc-20160816; b=Laae/BlAeyB0glwc1j+66MUppJAjHDZ15D2Zx2I5+etimEUT8Cjy67kkvhuHjcGUzu bGpsjO+4fXmOiTMw+8PaeWHCI6yxt95ki+VqL5Nw0XOmVPaT7audjCFo5G1nlPhHkdIh xhiy1QfNMTmfbIxpuQ8Ovv3pJ1VduyvXpnY6Ezg/x4Jnnhbclf7Yl4674BahybF19sDG 3uaFaWThhnF8iXU6sXskNFhQlas9cr9Eew9fJE2jbrwVxE/ykRBHxMg/dWocqGxmHnov dWUyo+Ehseqr5LfHElT3XSNrYpdiAmOergIExDW1BemALRLoghoQm3FFo0i48nyJNoKk JLnw== 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=/IgdmKyG2oBgLUj8iDGVi77dhR1poilu0MDEaA6E+Ac=; fh=V3FOp2x1qD1Imbim6j04GU+WriVa4Pb49KghutoBw98=; b=dw1rW6/focf3d0g+2g3ddksCvTdRyQBEtyl+sS8yQTVfwXyfKiQ3t6tMHudH6SUYpQ F4AgO+9Dba31PZcxxcayAkmZs/MlOj12tNK1+97mi8Ep3Syftzkmlv9JPAAtXs1uRk/W vagEdv7UdUtktmy/0qrBuVNoL63XuSngDHLQDm/jh+ydiX0mSFxkHxhUth9AJlfZUO2k D25hobE9o0uHRDc4Ug+RYW1U0NMGtCICo6U/eYFNnHcRC0k2xSaXVe6WAFcyngmPge0W Li2X0xVvghahiOkXrxC4nl4XHtSXXMO1TRMaF1kzAy0iXIPwjpdga70MKpPzjVxUJ7Z3 iEow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SZbHFk8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x10-20020a170902ec8a00b001bf2931ccdesi5349821plg.232.2023.09.16.07.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 07:58:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SZbHFk8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4B8D9809E72A; Sat, 16 Sep 2023 06:43:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234156AbjIPNgC (ORCPT + 99 others); Sat, 16 Sep 2023 09:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234448AbjIPNf6 (ORCPT ); Sat, 16 Sep 2023 09:35:58 -0400 Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8334E197 for ; Sat, 16 Sep 2023 06:35:53 -0700 (PDT) Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-57358a689d2so1888930eaf.2 for ; Sat, 16 Sep 2023 06:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694871353; x=1695476153; darn=vger.kernel.org; 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=/IgdmKyG2oBgLUj8iDGVi77dhR1poilu0MDEaA6E+Ac=; b=SZbHFk8KlpVKV7S+Enh6mw2jknoNu5PJBAFAwmn8Op5AnYiBW2jpwlSKyMKt3/vq9F Cc0WfxKL6q83bqWP3z01s+r35tFAZplNdOvWfjqDD5jrd9jpzkVpeN/2TK6kbQoUTnl1 XMq11A5BKp6wOPA8F/U0KuobDmtQhl+fUO3NfxHASXBw1qTwi4B9MGBVkqkbNgWtjOKi SfAdeSkYE2Yx5mCZm0BZkJnF2uqh/p7hz9PbEifDgs8zRipmobKqgMtiWNpX99BHuaPX ZfKH5GS9lM+LbJt0p+ixoUd3GqnN5yB4navzo8Y+8Gcbi7eh4z9k6rlJrwDAA1hcl8iB 7Wug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694871353; x=1695476153; 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=/IgdmKyG2oBgLUj8iDGVi77dhR1poilu0MDEaA6E+Ac=; b=LL2G0LCBJHPDT650FzPLiSkE1+kuP3mEuav6muYU6erIWhsr6U5YGYPVLPWdi+JhFp wM0hGZCGH/0h7fO87LVDeMaTRfPdlSllRlfl9wPBGVdVIQa1f8IVxfrgnt7jYVeiw7dM nn2aFbOcHdmUaqCmP4ogAyqRU9oVbFn2lyIJEPRIYYIKkG67wZSkMtLMCaVPmMOXsFbv C2Yu8FncZLd9m8riKxVshgdhMNsXvOCCZ51FdFvmOa9IhjrwDU262dQ0CvB2qX9f63uX tfopNLwkDLw4U1e/ejZ3XXzuPvD9LoYjd37uitEW8MijmFEQ+b0R9gqGrx5gJhIXMvSn 4OaA== X-Gm-Message-State: AOJu0YzP43rVoN3N1mRqbhFQeamuBp6D3twf9qPSwXyP8ZTo6TprA1Bu Qst9rOrLOShkRMaKkDA+pd1wXAwcvP0yQqcc9ys= X-Received: by 2002:a4a:dfcb:0:b0:576:8b2b:1ea with SMTP id p11-20020a4adfcb000000b005768b2b01eamr4825690ood.2.1694871352661; Sat, 16 Sep 2023 06:35:52 -0700 (PDT) MIME-Version: 1.0 References: <20230916130653.243532-1-hdegoede@redhat.com> In-Reply-To: <20230916130653.243532-1-hdegoede@redhat.com> From: Andy Shevchenko Date: Sat, 16 Sep 2023 16:35:16 +0300 Message-ID: Subject: Re: [PATCH v3] x86/platform/uv: Rework NMI "action" modparam handling To: Hans de Goede Cc: Steve Wahl , Justin Ernst , Kyle Meyer , Dimitri Sivanich , Russ Anderson , Darren Hart , Andy Shevchenko , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Justin Stitt 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 16 Sep 2023 06:43:04 -0700 (PDT) On Sat, Sep 16, 2023 at 4:07=E2=80=AFPM Hans de Goede = wrote: > > Rework NMI "action" modparam handling: > > 1. Replace the uv_nmi_action string with an enum; and > 2. Use sysfs_match_string() for string parsing in param_set_action() Reviewed-by: Andy Shevchenko ... > static int param_get_action(char *buffer, const struct kernel_param *kp) > { > - return sprintf(buffer, "%s\n", uv_nmi_action); > + return sprintf(buffer, "%s\n", actions[uv_nmi_action]); > } Recently I have sent a patch to make all *printf() to be sysfs_emit() in params.c a s I believe that those are for sysfs only. That said, I think this is the case here. But, this is out of scope of the change and up to you what to do with this (meanwhile you are using *sysfs*_match_string() which emphasizes the use case already). --=20 With Best Regards, Andy Shevchenko