[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 5/6] tools: Use new byteswap helper
- To: Lin Liu <lin.liu@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 23 May 2022 13:10:53 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7fPPiBlgOPs6P6JF+blXy1krqzPMpVTVaSWtLH9QW94=; b=Dja7mO19nj2Er8lvq1xoS3DAY1+ioNKQG6sScSaOOhG/F0S17su7TLmQFdHI/p4L3lCzeEwB9f9qOCuMZ0qb2Su0JCfglyrb9LNM5rE9n1ikFFTHRk1D+jYNlRQaoRYXUEVLUfw/LI26wIqNFDK3YASe7QCu2SwRTC8ihxBWoR2NFpj2mfHEeMKC4j0+/1t8b7G30Sw5MBnRXf/2caj8Xw54AWeqslFMjNuLZ7zoiQJEDKjTOG61IMZWKPmn/cCZQpOVlQNNPpMFY+aE+0Yi7XkVno7cyQuHuggz65Oo/LGgtmqioAqZgvB2hcVWQLWWgAEJZouhIQZxdeYVh2ET+g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ljXMtkR+XpfZw4dwNvzd9XfdAq1YI6dFC42VUP3i1cA+bAr9XDjHkeZmGJUoimB1tkrdrzYpnwfXl6R6ws0RaZpnrepGQlAi2t42poB+qrh8rD9l1MfsKCGN6tLu922UApBG5aqOESoWpKrnpPQiV8m0Iy9KAtZ5Z+f//tnULVQ0NW+UB69Tt+EeI+VALbwxBJuIK+ptkAWFZMby8sUAgYeMlaDqVQ1lDpCrS6FuA5OiDnL7OWG+ZDGsnIc5P89CD2p3N5onks901VGrOdYc84UFXEKL6amtnHHo9RBmok4s9KcHpIgfCpzjCqbghXYmkgcl69789+09PaM5XZYAEg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 23 May 2022 11:11:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 23.05.2022 11:52, Lin Liu wrote:
> --- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
> +++ b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
> @@ -34,6 +34,11 @@ static inline u32 le32_to_cpup(const u32 *p)
> return cpu_to_le32(*p);
> }
>
> +static inline u32 le32_to_cpu(u32 val)
> +{
> + return le32_to_cpup((const u32 *)&val);
> +}
Why the cast? And why not uint32_t?
Jan
|