Re: [PATCH] fs: ramfs: simplify len calculation in ramfs_find_chunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Jul 2024 11:09:32 +0200, Ahmad Fatoum wrote:
> ramfs_find_chunk finds the correct chunk and additionally returns via
> argument pointers the offset to use and the remaining length.
> 
> While correct, the way the remaining len is calculated can be simplified
> by using the offset previously calculated:
> 
>   data->ofs  +        data->size - pos
>   data->size -  pos + data->ofs
>   data->size - (pos - data->ofs)
>   data->size - (*ofs)
> 
> [...]

Applied, thanks!

[1/1] fs: ramfs: simplify len calculation in ramfs_find_chunk
      https://git.pengutronix.de/cgit/barebox/commit/?id=e2f6209720d8 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux