[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE94847B1D9E864B8593BD8051012AF36E0D8AC9@DGGEMA505-MBS.china.huawei.com>
Date: Mon, 23 Jan 2017 06:32:55 +0000
From: zhouxianrong <zhouxianrong@...wei.com>
To: Matthew Wilcox <willy@...radead.org>
CC: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"sergey.senozhatsky@...il.com" <sergey.senozhatsky@...il.com>,
"minchan@...nel.org" <minchan@...nel.org>,
"ngupta@...are.org" <ngupta@...are.org>,
Mi Sophia Wang <Mi.Sophia.Wang@...wei.com>,
Zhouxiyu <zhouxiyu@...wei.com>,
"Duwei (Device OS)" <weidu.du@...wei.com>,
"Zhangshiming (Simon, Device OS)" <zhangshiming5@...wei.com>,
Won Ho Park <won.ho.park@...wei.com>
Subject: 答复: [PATCH] mm: extend zero pages to same element pages for zram
Yes, memset's prototype is int but
the implement of arch is unsigned char; for example, in arm64
.weak memset
ENTRY(__memset)
ENTRY(memset)
mov dst, dstin /* Preserve return value. */
and A_lw, val, #255
orr A_lw, A_lw, A_lw, lsl #8
orr A_lw, A_lw, A_lw, lsl #16
orr A_l, A_l, A_l, lsl #32
-----邮件原件-----
发件人: Matthew Wilcox [mailto:willy@...radead.org]
发送时间: 2017年1月23日 14:26
收件人: zhouxianrong
抄送: Sergey Senozhatsky; linux-mm@...ck.org; linux-kernel@...r.kernel.org; akpm@...ux-foundation.org; sergey.senozhatsky@...il.com; minchan@...nel.org; ngupta@...are.org; Mi Sophia Wang; Zhouxiyu; Duwei (Device OS); Zhangshiming (Simon, Device OS); Won Ho Park
主题: Re: [PATCH] mm: extend zero pages to same element pages for zram
On Sun, Jan 22, 2017 at 10:58:38AM +0800, zhouxianrong wrote:
> 1. memset is just set a int value but i want to set a long value.
memset doesn't set an int value.
DESCRIPTION
The memset() function fills the first n bytes of the memory area
pointed to by s with the constant byte c.
It sets a byte value. K&R just happened to choose 'int' as the type to store that "unsigned char" in. Probably for very good reasons which make absolutely no sense today.
Powered by blists - more mailing lists