Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp375466iog; Wed, 29 Jun 2022 01:57:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vseR5rTzPGza63EQ3XMTv3YTI2E2vWkYPpB4Xgt0H4XfEihVPXyScIqEjCzjUrU5UoI5mU X-Received: by 2002:a17:906:106:b0:715:7cdf:400f with SMTP id 6-20020a170906010600b007157cdf400fmr2169602eje.1.1656493073121; Wed, 29 Jun 2022 01:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656493073; cv=none; d=google.com; s=arc-20160816; b=hF2nGg7+MNXDgu41ugp1FjYwMfxJLvG+gWd7rC7NRrGEWxvWFxbxz+Pbo4/k/b1TQf YsU9niLiMukao4y2jeCHf81DAhD7Rcvdwi2TvHvuXEzb/D/YsaPNzmO3pQ0udThJsO23 vua4/K90dhVvElu44GY3BYVBsO1ZOM/VhSxt4iT1ah+l0Emnf48JZYxtFMpl4e+gzHMT cpPHsS9jtj02BrsM4tFYbbuyrHFUqXP5+NAgB/zzTXy3Iq+lkNyX99ixzqo/ChuKZLeF flOCB3e+xGv89JoSnuJmcD3gBiz/n+7TOQ2/+H8WCka7rChowPOw9l8LEmokg5PpEGHA clIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=eTc78v95ubymf58d3ta1eNVK0UnTqz5b5X3f5R/qjoY=; b=wJWnvJBTW/3OZAgcEnx7ChsCeE84QRTz1eoP1F81dsv0zfmrLNiF7SVo8D43JLezgS OxhVxuoYb9aOdh1g/DtHKJmDSmB9V68wxiTppHBhNk9n7BrcyGoAN5megPlQ3rKSKqYE kpojeMD2THgtGb1ENtPH/6wkusH2z7XHSKPn1FhPAHnKrTtZYt66neWwe6H8T793aYcO OuH3qBtfF0jC+y7Hmf68Hlm0QCzLaSWmnht5CBTZgtGJs55LGPwws9s8Ten2Sf1XpEPf ii9Tz0mbtZXMU3rcA+mN3Zr7nd6O8GBfCPvlFMv49b/MJO9rWhCKXm2pxl9yXaZTi5B2 BzTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZltiPlY0; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a056402069300b00435a08a355dsi16978733edy.404.2022.06.29.01.57.27; Wed, 29 Jun 2022 01:57:53 -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=@intel.com header.s=Intel header.b=ZltiPlY0; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231590AbiF2Ihh (ORCPT + 99 others); Wed, 29 Jun 2022 04:37:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232912AbiF2Ihb (ORCPT ); Wed, 29 Jun 2022 04:37:31 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 345F93C721 for ; Wed, 29 Jun 2022 01:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656491851; x=1688027851; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=AyjMVTaQTJCbb9rBYdh6t7GNExFz5BIYwoEuevlJ+Cg=; b=ZltiPlY0wyup6akN1PbwUcV73Z8qcTyPtGb/Dq5sePRAPmWsJWqC0TSe 70w760zXpkfBMWR4rn2qryI+mcrYxsqIU5+p9mRvPYEHiHA//Wp/Zgy1j vBxxSUULKGNQPaMEQ2jmNh9j2Exb40OKag1SdSWbRh+lsutaao9sgC7Qj GKDyccW65Dgo5o7aFaNsdKHHBHTsSwbtdmxCHM337mnyALPs34M9B7SM1 1iso9TcNRECR28AvRwpzsGCyZ6ocrV0pJy9Q3wrQVrv6iO6JdDpSh3sCE TJc52XR5+5vZOIMxIjdphJtL62tnQZrJYFQ1zTAyOfc4s41fBNWerUc9x g==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="283066558" X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="283066558" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 01:37:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="588228562" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 29 Jun 2022 01:37:14 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 29 Jun 2022 01:37:13 -0700 Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by ORSMSX602.amr.corp.intel.com ([10.22.229.15]) with mapi id 15.01.2308.027; Wed, 29 Jun 2022 01:37:13 -0700 From: "Winkler, Tomas" To: Greg Kroah-Hartman , "Usyskin, Alexander" CC: Jani Nikula , Joonas Lahtinen , "Vivi, Rodrigo" , David Airlie , Daniel Vetter , "Tvrtko Ursulin" , "Lubart, Vitaly" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3 13/14] mei: debugfs: add pxp mode to devstate in debugfs Thread-Topic: [PATCH v3 13/14] mei: debugfs: add pxp mode to devstate in debugfs Thread-Index: AQHYii6cshzBS1Jzdke8w99Tn+SqLa1mD+iw Date: Wed, 29 Jun 2022 08:37:13 +0000 Message-ID: References: <20220619133721.523546-1-alexander.usyskin@intel.com> <20220619133721.523546-14-alexander.usyskin@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 x-originating-ip: [10.184.70.1] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 >=20 > On Sun, Jun 19, 2022 at 04:37:20PM +0300, Alexander Usyskin wrote: > > From: Tomas Winkler > > > > CC: Vitaly Lubart > > Signed-off-by: Tomas Winkler >=20 > We can not take patches without any changelog text, you know this :( Okay, will add some more info.=20 >=20 > > --- > > drivers/misc/mei/debugfs.c | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c > > index 1ce61e9e24fc..4074fec866a6 100644 > > --- a/drivers/misc/mei/debugfs.c > > +++ b/drivers/misc/mei/debugfs.c > > @@ -86,6 +86,20 @@ static int mei_dbgfs_active_show(struct seq_file > > *m, void *unused) } DEFINE_SHOW_ATTRIBUTE(mei_dbgfs_active); > > > > +static const char *mei_dev_pxp_mode_str(enum mei_dev_pxp_mode > state) > > +{ #define MEI_PXP_MODE(state) case MEI_DEV_PXP_##state: return > #state > > + switch (state) { > > + MEI_PXP_MODE(DEFAULT); > > + MEI_PXP_MODE(INIT); > > + MEI_PXP_MODE(SETUP); > > + MEI_PXP_MODE(READY); >=20 > Just spell out the case and return lines, don't create macros for no good > reason please. We use those print macros paradigm consistently int the code, the macro has= a very limited scope. We are aware of wrong sides of macros but this just little of synthetic sug= ar no some wild usage. We believe it helps readability, and it keeps the code consistent. Other usages: hbm.c:#define MEI_HBM_STATUS(status) case MEI_HBMS_##status: return #status hbm.c:#define MEI_CL_CS(status) case MEI_CL_CONN_##status: return #status hbm.c:#define MEI_HBM_STATE(state) case MEI_HBM_##state: return #state init.c:#define MEI_DEV_STATE(state) case MEI_DEV_##state: return #state init.c:#define MEI_PG_STATE(state) case MEI_PG_##state: return #state Thanks Tomas