Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1378044rwp; Thu, 13 Jul 2023 09:58:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1Abux8c3brD+g4h2f+5oaFzNbpCHA3sQYt50jstv7jjrFlJCW45fbC1aPgKzG08RfKV8n X-Received: by 2002:a17:906:4ad2:b0:994:673:8afa with SMTP id u18-20020a1709064ad200b0099406738afamr1904883ejt.28.1689267510724; Thu, 13 Jul 2023 09:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689267510; cv=none; d=google.com; s=arc-20160816; b=EuBcx8WPoXhtk6XdeJj1M5x/r/VMhajB3HdmAMVQvysxoSfwQccBNdUjCd4nSlfEaz FkD0m8e2y0NaEJ6BLG21KKqX1nvrSrc393l+ZQN5Fv78u2fiKJNmn3EYRhc8LwA0Cay0 SFvNex3UTit430eTdyoHLMANUJWSR5auo4t2UqPPTOekKOrbuFoQFZZn1kojEUTal6cy DiWRKNiZIa8oz3iwElWeHlLZQ6OPwrIEVDSyRt//o3rlYxC/B/49KPnuBLA7nMlp/hv+ 3uSc3Zfdg/uyksgDpLRlMdIxo5rZ9CwcpH2t+i+ZlUfSfzKVMG7ASkIhZ0z91mfFg2K/ ++fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R8KGuZ0GC7GtNm9a/LRNCPJOqQyAAYgY3xR0fVzkBc4=; fh=6Ns1NIhWy4zmWPIfcW0s2LAkIKu3k3+LGIwMBnpYaDc=; b=EvvzPzsgQp8jUV9w99a6IyMhHUq0mYrBD+d5Xc4SwBCdunbZ8wevWGtmqq88aNJGB2 z9DMCxX09UchpkJtmVivRKgqW7XuVBcOEPtSHhK93IAac2vhxd3HNl828BwyiU+wfDZ6 PoqJWcqBlS3RMHaiasiBUA2NYTzt8UDvAgqMk0MwhJXsZUkOOfrQEqQY7LzDQ8izBn0z Fb4mAiQEzeV928x8yQNIlsrSR94JWkpu8pHOtXu0FwMXXuYw8jM0rvt98KZugg5FnYea WP9AKeio4H8NPu9kdXNt2ZVSJiClbD2lRc0xVQVaDKcXdwB+HbaOyUzOrpigMMf0EkW5 eJ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QLUONWm5; 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 v15-20020a17090606cf00b00978ae651cacsi7728386ejb.0.2023.07.13.09.58.06; Thu, 13 Jul 2023 09:58:30 -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=QLUONWm5; 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 S235341AbjGMQmx (ORCPT + 99 others); Thu, 13 Jul 2023 12:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234736AbjGMQmo (ORCPT ); Thu, 13 Jul 2023 12:42:44 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08BD530DA; Thu, 13 Jul 2023 09:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689266547; x=1720802547; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=lPo5Yd9r9keG0po6v1x79UiBwVWcR0uuoRZOH8HjT7E=; b=QLUONWm57sK3DH3EK3GSQzReo+9FobZ4iYEbqkXeHDzWXnPSRCJ9odtG L4oi6/lU4A3GFj5DedEDw/m+R85hmZ5CuNlm+xhELw32JTIhwH/hJP1xG PlotvmehQnLYuwRBv00Dxz4/euie7RD0yLiCm2vkPaAuyEbpZssRzv7IL xMLTwVgPqBBmJ6QshQGliMunyhjqzlUQ9+TBNcpUAOLwyVqK/2v3ATv+Y OBdgoSt/6406Iid2mQGl/GlJWfqFdC5G12Cydd6LxBMwcg20JoOxVYVBC ljKa6Ul99luiBn6uYQhHxBKuZCwo1i72eIXtXmdPh+g6yeM0LVhLg4ziz w==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="429013586" X-IronPort-AV: E=Sophos;i="6.01,203,1684825200"; d="scan'208";a="429013586" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2023 09:42:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="672334689" X-IronPort-AV: E=Sophos;i="6.01,203,1684825200"; d="scan'208";a="672334689" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2023 09:42:15 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qJzOQ-002RKT-1U; Thu, 13 Jul 2023 19:42:14 +0300 Date: Thu, 13 Jul 2023 19:42:14 +0300 From: Andy Shevchenko To: srinivas pandruvada Cc: hdegoede@redhat.com, markgross@kernel.org, ilpo.jarvinen@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] platform/x86/intel/tpmi: Add debugfs interface Message-ID: References: <20230711220949.71881-1-srinivas.pandruvada@linux.intel.com> <20230711220949.71881-3-srinivas.pandruvada@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 On Wed, Jul 12, 2023 at 04:06:50PM -0700, srinivas pandruvada wrote: > On Wed, 2023-07-12 at 18:13 +0300, Andy Shevchenko wrote: > > On Tue, Jul 11, 2023 at 03:09:48PM -0700, Srinivas Pandruvada wrote: ... > > > ?struct intel_tpmi_pm_feature { > > > ????????struct intel_tpmi_pfs_entry pfs_header; > > > ????????unsigned int vsec_offset; > > > +???????struct intel_vsec_device *vsec_dev; > > > > Hmm... I don't know the layout of pfs_header, but this may be 4 bytes > > less > > if you move it upper. > The pfs_header is packed with size of 64 bit. So size will not change. So, it will be a gap of 4 bytes due to alignment, no? > > > ?}; ... > > > +???????for (i = 0; i < tpmi_info->feature_count; ++i) { > > > > Why preincrement? > Does it matter for a "for" loop increment? Stylewise. Preincrement raises a flag to the reader "what the heck is special here that we need preincrement". If not required, I would use postincrement. -- With Best Regards, Andy Shevchenko