lkml.org 
[lkml]   [2015]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/10] tpm, tpm_crb: fix unaligned read of the command buffer address
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


\
 
 \ /
  Last update: 2015-10-18 13:41    [W:0.085 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site