[lkml]   [2023]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] thermal/drivers/mediatek/lvts_thermal: fix memcpy's number of bytes in lvts_calibration_init()
On Wed, Mar 08, 2023 at 10:10:34AM +0100, AngeloGioacchino Del Regno wrote:
> Il 07/03/23 14:42, ha scritto:
> > From: Balsam CHIHI <>
> >
> > Replace memcpy 2 bytes by sizeof(int) bytes of LVTS calibration data.
> sizeof(int) is architecture dependant...

On Linux sizeof(int) is always 4.

I'm just so confused what you are talking about. Are you thinking about
sizeof(long)? Are you thinking about CPUs from the 1970s? Linux wasn't
invented until the 90s so the old CPUs were already in museums at that

> please use a fixed size type instead.

This is an unusual style opinion that I have not heard before.
Hopefully, you just got ints and longs confused so we can move on
without discussing it too much. We're copying an int so sizeof(int) is
obviously correct. It's hard to know how to respond.

> Also, shouldn't this be u16?!

What? Why would you think that?

dan carpenter

 \ /
  Last update: 2023-03-27 00:51    [W:0.103 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site