[Crash-utility] Re: [PATCH v4 ] Adding the zram decompression algorithm "lzo-rle" to support kernel versions >= 5.1

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

 



On 2024/04/16 15:49, Yulong Tang wrote:
>> On Mon, Apr 15, 2024 at 2:32 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab(a)nec.com&gt;
>> wrote:
>>
>>
>> Sure. The macro '#if __BYTE_ORDER == __BIG_ENDIAN' takes effect on a
>> big-endian machine. But it requires to include the header file 'byteswap.h'
>> as below:
>> #include <byteswap.h>
>>
>> In addition, there is a similar implementation, but I haven't tested it
>> with Yulong's case. Can you help to check if this can work well for you?
>> Yulong.
>>
>> static inline uint16_t
>> get_unaligned_le16 (const uint8_t *p)
>> {
>>    return p[0] | p[1] << 8;
>> }

Ah nice, this looks simple and better.  If it works well on a big-endian 
machine too, let's go with this.

>>
> 
> Hi, Lianbo
> 
> It works well in my case(little-endian). This looks promising, but I don't have a big-endian machine to test it on.

Thank you for testing, Yulong.

Thanks,
Kazu
--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux