lkml.org 
[lkml]   [2021]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] tpm/tpm_i2c_infineon: Fix init endian vendor check
On Mon, Sep 13, 2021 at 03:46:48PM +0200, Florian Eckert wrote:
> Hello Jason,
>
> > > The device works than as expected.
> > >
> > > Signed-off-by: Florian Eckert <fe@dev.tdt.de>
> > > v2:
> > > * use variable type instead of le32_to_cpus function call
> > > drivers/char/tpm/tpm_i2c_infineon.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > And if you do this it need to be made sparse clean/etc
>
> Sorry for the stupid question, but what exactly do you mean?

There is a tool called sparse that checks the endia notations and
verfies correctness

It will complain if you do

__le32 x

x = le32tocpu(x)

you neeed another variable to store the cpu version

Jason

\
 
 \ /
  Last update: 2021-09-13 17:13    [W:0.027 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site