From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbcITMDz (ORCPT ); Tue, 20 Sep 2016 08:03:55 -0400 Received: from mga02.intel.com ([134.134.136.20]:7023 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbcITMDy (ORCPT ); Tue, 20 Sep 2016 08:03:54 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,367,1470726000"; d="scan'208";a="1033629618" Date: Tue, 20 Sep 2016 15:03:49 +0300 From: Jarkko Sakkinen To: "Winkler, Tomas" Cc: Peter Huewe , "moderated list:TPM DEVICE DRIVER" , open list Subject: Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions Message-ID: <20160920120349.GA30749@intel.com> References: <1474316530-17315-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1474316530-17315-3-git-send-email-jarkko.sakkinen@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B542EB9D8@hasmsx108.ger.corp.intel.com> <20160920095605.GA32433@intel.com> <5B8DA87D05A7694D9FA63FD143655C1B542EBC24@hasmsx108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B542EBC24@hasmsx108.ger.corp.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 20, 2016 at 09:57:48AM +0000, Winkler, Tomas wrote: > > > On Tue, Sep 20, 2016 at 07:08:40AM +0000, Winkler, Tomas wrote: > > > > > > > -----Original Message----- > > > > From: Jarkko Sakkinen [mailto:jarkko.sakkinen@linux.intel.com] > > > > Sent: Monday, September 19, 2016 23:22 > > > > To: Peter Huewe > > > > Cc: moderated list:TPM DEVICE DRIVER > > > devel@lists.sourceforge.net>; open list > > > > > > > > Subject: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions > > > > > > > > Sparse reports "bad constant expression" for the use of cpu_to_be32 > > > > inside enums tpm_capabilities and tpm_sub_capabilities. Even though > > > > it is probably expanded to a constant expression, it is probably cleaner > > not to use it there. > > > > > > > > > Swap macros were rewritten due to possible compiler bug > > > https://lkml.org/lkml/2016/5/2/597 > > > And the warning is actually a bug in sparse, it fails to detect constant > > expression now. > > > > I still think that these must be change in order to have some consistency in > > the subsystem. Now there are two differing conventions. > > Nothing against the convention just the commit message is misleading > in that sense. Tomas Right. I can edit it to say that "sanitize the constant declarations" or something like that. /Jarkko