From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752761AbbJRLQI (ORCPT ); Sun, 18 Oct 2015 07:16:08 -0400 Received: from mga09.intel.com ([134.134.136.24]:34697 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbbJRLPl (ORCPT ); Sun, 18 Oct 2015 07:15:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,697,1437462000"; d="scan'208";a="666670096" Date: Sun, 18 Oct 2015 14:15:36 +0300 From: Jarkko Sakkinen To: Peter =?iso-8859-1?Q?H=FCwe?= Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com, dhowells@redhat.com, artem.bityutskiy@linux.intel.com, Marcel Selhorst Subject: Re: [PATCH 01/10] tpm, tpm_crb: fix unaligned read of the command buffer address Message-ID: <20151018111536.GA7391@intel.com> References: <1445020843-9382-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1445020843-9382-2-git-send-email-jarkko.sakkinen@linux.intel.com> <201510180502.55677.PeterHuewe@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201510180502.55677.PeterHuewe@gmx.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 18, 2015 at 05:02:55AM +0200, Peter Hüwe wrote: > Am Freitag, 16. Oktober 2015, 20:40:20 schrieb Jarkko Sakkinen: > > + pa = ((u64) le32_to_cpu(ioread32(&priv->cca->cmd_pa_high)) << 32) + > > + (u64) le32_to_cpu(ioread32(&priv->cca->cmd_pa_low)); > > The canonical form would be > > + pa = ((u64) le32_to_cpu(ioread32(&priv->cca->cmd_pa_high)) << 32) | > > + (u64) le32_to_cpu(ioread32(&priv->cca->cmd_pa_low)); > ? > Or am I missing something? > Shall I fix-up? Please do. Current works but definitely your form is correct. > Thanks, > Peter /Jarkko