[PATCH] MAINTAINERS: add the necessary '/' according to entry rules

2015-01-16 Thread Yaowei Bai
Signed-off-by: Yaowei Bai bywxiao...@163.com --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3589d67..d46a77c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -270,12 +270,12 @@ F:drivers/acpi/ F: drivers/pnp

[PATCH] Documentation/acpi: add the missing '='

2015-01-15 Thread Yaowei Bai
Signed-off-by: Yaowei Bai bywxiao...@163.com --- Documentation/acpi/enumeration.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index b60d2ab..9b121a5 100644 --- a/Documentation/acpi/enumeration.txt

[PATCH] Documentation/vm: there should have a 'non' according to the context

2015-02-10 Thread Yaowei Bai
Signed-off-by: Yaowei Bai bywxiao...@163.com --- Documentation/vm/balance | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/vm/balance b/Documentation/vm/balance index c46e68c..3a2cacf 100644 --- a/Documentation/vm/balance +++ b/Documentation/vm/balance @@ -8,7

[PATCH] mm/page_alloc: add a necessary 'leave'

2015-02-10 Thread Yaowei Bai
Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7633c50..c88d495 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -172,7 +172,7 @@ static void __free_pages_ok(struct

[PATCH] mm/oom_kill.c: fix a typo

2015-03-09 Thread Yaowei Bai
Alter 'taks' - 'task' Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/oom_kill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 642f38c..5d6a458 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -408,7 +408,7 @@ bool

Re: [PATCH] README: make the README agnostic to version numbers

2015-03-09 Thread Yaowei Bai
On Fri, Mar 06, 2015 at 09:59:38AM -0600, Josh Poimboeuf wrote: On Tue, Mar 03, 2015 at 10:08:02PM +0800, Yaowei Bai wrote: As we have moved to 4.x, it should be reflected in README. Signed-off-by: Yaowei Bai bywxiao...@163.com --- README | 34 +- 1

Re: [PATCH] README: make the README agnostic to version numbers

2015-03-10 Thread Yaowei Bai
On Mon, Mar 09, 2015 at 11:34:50AM -0500, Josh Poimboeuf wrote: Personally I don't think the 4.x numbers add anything to the understanding of the document. Maybe the reason you think so is that you are quite familiar with the kernel, but we should also take care of the ones who are not familiar

[PATCH 1/2] mm/page_alloc.c: Add '(' and ')' in comment

2015-03-02 Thread Yaowei Bai
Add parentheses to make the two deltas consistent. Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7abfa70..12c96ad 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c

[PATCH 2/2] mm/page_alloc.c: fix a grammar in comment

2015-03-02 Thread Yaowei Bai
Alter 'controls' - 'control'. Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 12c96ad..5158fa2 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5716,7 +5716,7

[PATCH] Update version number references in README

2015-03-01 Thread Yaowei Bai
As we have moved to 4.x, it should be reflected in README. Signed-off-by: Yaowei Bai bywxiao...@163.com --- README | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README b/README index a24ec89..67fc7a8 100644 --- a/README +++ b/README

[PATCH 2/2] README: Change gzip/bzip2 to xz compression format

2015-03-03 Thread Yaowei Bai
Kernel.org is only hosting patches and kernel compressed with xz, so change the old gzip/bzip2 instances to xz. Signed-off-by: Yaowei Bai bywxiao...@163.com --- README | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/README b/README index 67fc7a8..69c68fb

[PATCH 1/2] Update version number references in README

2015-03-03 Thread Yaowei Bai
As we have moved to 4.x, it should be reflected in README. Signed-off-by: Yaowei Bai bywxiao...@163.com --- README | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README b/README index a24ec89..67fc7a8 100644 --- a/README +++ b/README

[PATCH 1/3] mm/page_alloc: fix a terrible misleading comment

2015-08-22 Thread Yaowei Bai
The comment says that the per-cpu batchsize and zone watermarks are determined by present_pages which is definitely wrong, they are both calculated from managed_pages. Fix it. Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 3/3] mm/memblock: fix memblock comment

2015-08-22 Thread Yaowei Bai
's/amd/and/' Signed-off-by: Yaowei Bai bywxiao...@163.com --- include/linux/memblock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index cc4b019..273aad7 100644 --- a/include/linux/memblock.h +++ b/include/linux

[PATCH 2/3] mm/page_alloc: add a helper function to check page before alloc/free

2015-08-22 Thread Yaowei Bai
The major portion of check_new_page() and free_pages_check() are same, introduce a helper function check_one_page() for readablity. Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 54 +++--- 1 file changed, 23 insertions(+), 31

[PATCH] Documentation: add 'crashkernel=auto' entry into kernel-parameters.txt

2015-08-22 Thread Yaowei Bai
There is no 'crashkernel=auto' entry in kernel-parameters.txt, borrow it from kexec-kdump-howto.txt file in the kexec-tools-2.0.0 package. Signed-off-by: Yaowei Bai bywxiao...@163.com --- Documentation/kernel-parameters.txt | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v2] Documentation: add 'crashkernel=auto' entry into kernel-parameters.txt

2015-08-24 Thread Yaowei Bai
There is no 'crashkernel=auto' entry in kernel-parameters.txt, borrow it from kexec-kdump-howto.txt file in the kexec-tools-2.0.0 package. Signed-off-by: Yaowei Bai bywxiao...@163.com --- Documentation/kernel-parameters.txt | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH 1/2] mm/page_alloc: change sysctl_lower_zone_reserve_ratio to sysctl_lowmem_reserve_ratio

2015-08-25 Thread Yaowei Bai
We use sysctl_lowmem_reserve_ratio rather than sysctl_lower_zone_reserve_ratio to determine how aggressive the kernel is in defending lowmem from the possibility of being captured into pinned user memory. To avoid misleading, correct it in some comments. Signed-off-by: Yaowei Bai bywxiao...@163

[PATCH 2/2] Documentation: clarify in calculating zone protection

2015-08-25 Thread Yaowei Bai
Every zone's protection is calculated from managed_pages not present_pages, to avoid misleading, correct it. Signed-off-by: Yaowei Bai bywxiao...@163.com --- Documentation/sysctl/vm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/sysctl/vm.txt b

[PATCH 1/2] fs/stat.c: drop the last new_valid_dev check

2015-11-13 Thread Yaowei Bai
New_valid_dev() always returns true, so that's unnecessary to perform new_valid_dev() checks in some filesystems. Most checks of new_valid_dev() have been removed so let's drop this last one and then we can remove new_valid_dev() from the source code. No functional change. Signed-off-by: Yaowei

[PATCH 2/2] include/linux/kdev_t.h: remove new_valid_dev()

2015-11-13 Thread Yaowei Bai
As all new_valid_dev() checks have been removed it's time to drop new_valid_dev() itself. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/kdev_t.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/kdev_t.h b/include

[PATCH 1/2] KVM: kvm_is_visible_gfn can be boolean

2015-11-13 Thread Yaowei Bai
This patch makes kvm_is_visible_gfn return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 6 +++--- 2

[PATCH 2/2] KVM: kvm_para_has_feature can be boolean

2015-11-13 Thread Yaowei Bai
This patch makes kvm_para_has_feature return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/kvm_para.h | 6 ++ 1 file changed, 2 insertions

[PATCH 2/2] init/do_mounts: initrd_load can be boolean

2015-11-16 Thread Yaowei Bai
This patch makes initrd_load return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- init/do_mounts.h| 4 ++-- init/do_mounts_initrd.c | 6 +++--- 2 files c

[PATCH 1/2] init/main.c: obsolete_checksetup can be boolean

2015-11-16 Thread Yaowei Bai
This patch makes obsolete_checksetup return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- init/main.c | 10 +- 1 file changed, 5 insertions(+), 5 del

Re: [PATCH 6/7] mm/gfp: make gfp_zonelist return directly and bool

2015-11-16 Thread Yaowei Bai
On Mon, Nov 16, 2015 at 02:05:46AM -0800, David Rientjes wrote: > On Mon, 16 Nov 2015, Yaowei Bai wrote: > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > index 6523109..1da03f5 100644 > > --- a/include/linux/gfp.h > > +++ b/include/linux/gfp.h &

Re: [PATCH 4/7] mm/vmscan: page_is_file_cache can be boolean

2015-11-16 Thread Yaowei Bai
On Mon, Nov 16, 2015 at 02:10:10AM -0800, David Rientjes wrote: > On Mon, 16 Nov 2015, Yaowei Bai wrote: > > > diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h > > index cf55945..af73135 100644 > > --- a/include/linux/mm_inline.h > > +++ b/include

Re: [PATCH 7/7] mm/mmzone: refactor memmap_valid_within

2015-11-16 Thread Yaowei Bai
On Mon, Nov 16, 2015 at 01:45:01PM +0100, Michal Hocko wrote: > On Mon 16-11-15 14:51:26, Yaowei Bai wrote: > [...] > > @@ -72,16 +72,10 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, > > } > > > > #ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL > > -i

Re: [PATCH 1/2] KVM: kvm_is_visible_gfn can be boolean

2015-11-15 Thread Yaowei Bai
On Sat, Nov 14, 2015 at 06:07:51PM +0800, Amos Jianjun Kong wrote: > On Sat, Nov 14, 2015 at 11:21 AM, Yaowei Bai > <baiyao...@cmss.chinamobile.com> wrote: > > This patch makes kvm_is_visible_gfn return bool due to this particular > > function only using either one or

[PATCH] KVM: powerpc: kvmppc_visible_gpa can be boolean

2015-11-15 Thread Yaowei Bai
In another patch kvm_is_visible_gfn is maken return bool due to this function only returns zero or one as its return value, let's also make kvmppc_visible_gpa return bool to keep consistent. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- arch/power

[PATCH 7/7] mm/mmzone: refactor memmap_valid_within

2015-11-15 Thread Yaowei Bai
This patch makes memmap_valid_within return bool due to this particular function only using either one or zero as its return value. This patch also refactors memmap_valid_within for simplicity. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include

[PATCH 5/7] mm/lru: remove unused is_unevictable_lru function

2015-11-15 Thread Yaowei Bai
Since commit a0b8cab3 ("mm: remove lru parameter from __pagevec_lru_add and remove parts of pagevec API") there's no user of this function anymore, so remove it. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/mmzone.h | 5 - 1 file changed, 5 de

[PATCH 6/7] mm/gfp: make gfp_zonelist return directly and bool

2015-11-15 Thread Yaowei Bai
This patch makes gfp_zonelist return bool due to this particular function only using either one or zero as its return value. This patch also makes gfp_zonelist return directly by removing if. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include

[PATCH 4/7] mm/vmscan: page_is_file_cache can be boolean

2015-11-15 Thread Yaowei Bai
This patch makes page_is_file_cache return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/mm_inline.h | 6 +++--- 1 file chan

[PATCH 1/7] ipc/shm: is_file_shm_hugepages can be boolean

2015-11-15 Thread Yaowei Bai
This patch makes is_file_shm_hugepages return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/shm.h | 6 +++--- ipc

[PATCH 0/7] some small improvement

2015-11-15 Thread Yaowei Bai
This patchset only performs some small improvement to mm. First, make several functions return bool to improve readability, and then remove unused is_unevictable_lru function and refactor memmap_valid_within for simplicity. No functional change. Yaowei Bai (7): ipc/shm: is_file_shm_hugepages

[PATCH 3/7] mm/memblock: memblock_is_memory/reserved can be boolean

2015-11-15 Thread Yaowei Bai
This patch makes memblock_is_memory/reserved return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/memblock.h | 4 ++

[PATCH 2/7] mm/hugetlb: is_file_hugepages can be boolean

2015-11-15 Thread Yaowei Bai
This patch makes is_file_hugepages return bool to improve readability due to this particular function only using either one or zero as its return value. This patch also removed the if condition to make is_file_hugepages return directly. No functional change. Signed-off-by: Yaowei Bai <bai

Re: [PATCH 07/17] fs/ext4: remove unnecessary new_valid_dev check

2015-10-29 Thread Yaowei Bai
On Thu, Oct 29, 2015 at 02:09:01PM -0400, Theodore Ts'o wrote: > On Mon, Sep 28, 2015 at 09:50:37PM +0800, Yaowei Bai wrote: > > As new_valid_dev always returns 1, so !new_valid_dev check is not > > needed, remove it. > > > > Signed-off-by: Yaowei Bai <bywxiao...

Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

2015-10-08 Thread Yaowei Bai
On Thu, Oct 01, 2015 at 10:49:41PM +0200, Mikulas Patocka wrote: > > > On Wed, 30 Sep 2015, Yaowei Bai wrote: > > > On Tue, Sep 29, 2015 at 05:03:24PM +0200, Mikulas Patocka wrote: > > > Hi > > > > > > I suppose that you should remove the function

Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check

2015-10-08 Thread Yaowei Bai
On Tue, Sep 29, 2015 at 04:47:30PM +0300, Boaz Harrosh wrote: > On 09/28/2015 04:43 PM, Yaowei Bai wrote: > > As new_valid_dev always returns 1, so !new_valid_dev check is not > > needed, remove it. > > > > Signed-off-by: Yaowei Bai <bywxiao...@163.com

[PATCH 3/9] net/nfnetlink: lockdep_nfnl_is_held can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes lockdep_nfnl_is_held return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/netfilter/nfnetlink.h | 6 +++--- net/net

[PATCH 8/9] net/inetdevice: bad_mask can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes bad_mask return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/inetdevice.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 7/9] net/inetdevice: inet_ifa_match can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes inet_ifa_match return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/inetdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 9/9] net/core: lockdep_rtnl_is_held can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes lockdep_rtnl_is_held return bool due to this particular function only using either one or zero as its return value. In another patch lockdep_is_held is also made return bool. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/rtnetlink

[PATCH 00/17] fs: remove unnecessary new/huge_valid_dev check

2015-10-08 Thread Yaowei Bai
Hi Andrew, Could you please consider take patchset to mm-tree: http://marc.info/?l=linux-kernel=144344695929685=2 This patchset removes unnessary new_valid_dev() check in several filesystems because this function always return true. This patchset also removes huge_valid_dev() function because

[PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes can_dropped_invalid_skb return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/can/dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH 5/9] net/dccp: dccp_list_has_service can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes dccp_list_has_service return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/dccp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 0/9] net: small improvement

2015-10-08 Thread Yaowei Bai
This patchset makes several functions in net return bool to improve readability and/or simplicity because these functions only use one or zero as their return value. No functional changes. Yaowei Bai (9): net/netlink: lockdep_genl_is_held can be boolean net/ieee80211: ieee80211_is_* can

[PATCH 1/9] net/netlink: lockdep_genl_is_held can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes lockdep_genl_is_held return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/genetlink.h | 2 +- net/netlink/genetlink.c

[PATCH 6/9] net/dccp: dccp_bad_service_code can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes dccp_bad_service_code return bool due to these particular functions only using either one or zero as their return value. dccp_list_has_service is also been made return bool in this patchset. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- ne

[PATCH 2/9] net/ieee80211: ieee80211_is_* can be boolean

2015-10-08 Thread Yaowei Bai
This patch makes ieee80211_is_* return bool to improve readability due to these particular functions only using either one or zero as their return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/ieee80211.

Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean

2015-10-09 Thread Yaowei Bai
On Fri, Oct 09, 2015 at 12:14:31PM +0200, Marc Kleine-Budde wrote: > On 10/08/2015 03:28 PM, Yaowei Bai wrote: > > This patch makes can_dropped_invalid_skb return bool due to this > > particular function only using either one or zero as its return > > value. > >

[PATCH] mm/mmzone: memmap_valid_within can be boolean

2015-11-17 Thread Yaowei Bai
This patch makes memmap_valid_within return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/mmzone.h | 6 +++--- mm/mmzone.c| 8 -

[PATCH 1/2] security: remove unused cap_is_fs_cap function

2015-11-16 Thread Yaowei Bai
Since commit 3bc1fa8a ("LSM: remove BSD secure level security module") there is no user of cap_is_fs_cap any more, so remove it. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/capability.h | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 2/2] security/capability.h: cap_issubset/isclear can be boolean

2015-11-16 Thread Yaowei Bai
This patch makes cap_issubset/isclear return bool due to these functions only using either one or zero as their return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/capability.h | 16 1 file changed, 8 insertions

[PATCH] mm/zonelist: enumerate zonelists array index

2015-11-17 Thread Yaowei Bai
Hardcoding index to zonelists array in gfp_zonelist() is not a good idea, let's enumerate it to improve readability. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/gfp.h| 4 ++-- include/linux/mmzone.h | 20 +--- 2

[PATCH 2/5] fs/namespace.c: path_is_under can be boolean

2015-11-16 Thread Yaowei Bai
This patch makes path_is_under return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- fs/namespace.c | 4 ++-- include/linux/fs.h | 2

Re: [PATCH 6/7] mm/gfp: make gfp_zonelist return directly and bool

2015-11-17 Thread Yaowei Bai
On Mon, Nov 16, 2015 at 09:44:11PM -0800, David Rientjes wrote: > On Tue, 17 Nov 2015, Yaowei Bai wrote: > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > index 6523109..14a6249 100644 > > --- a/include/linux/gfp.h > > +++ b/include/linux/gfp.h > &g

[PATCH 2/2] fs/ceph: ceph_frag_contains_value can be boolean

2015-11-16 Thread Yaowei Bai
This patch makes ceph_frag_contains_value return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/ceph/ceph_frag.h | 2 +-

[PATCH 1/2] fs/ceph: remove unused functions in ceph_frag.h

2015-11-16 Thread Yaowei Bai
These functions were introduced in commit 3d14c5d2b ("ceph: factor out libceph from Ceph file system"). Howover, there's no user of these functions since then, so remove them for simplicity. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- include/linux/ceph/

[PATCH 3/5] fs/dcache.c: is_subdir can be boolean

2015-11-16 Thread Yaowei Bai
This patch makes is_subdir return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com> --- fs/dcache.c| 14 +++--- include/linux/fs.

[PATCH 1/5] fs/block_dev.c: make sb_is_blkdev_sb return bool when CONFIG_BLOCK undefined

2015-11-16 Thread Yaowei Bai
Currently when CONFIG_BLOCK is defined sb_is_blkdev_sb returns bool, while when CONFIG_BLOCK is not defined it returns int. Let's keep consistent to make sb_is_blkdev_sb return bool as well when CONFIG_BLOCK isn't defined. No functional change. Signed-off-by: Yaowei Bai <bai

[PATCH v3] mm/page_alloc: add a helper function to check page before alloc/free

2015-08-27 Thread Yaowei Bai
-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 54 +++--- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5b5240b..0c9c82a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c

Re: [PATCH v2] mm/page_alloc: add a helper function to check page before alloc/free

2015-08-27 Thread Yaowei Bai
On Tue, Aug 25, 2015 at 04:03:22PM +0200, Michal Hocko wrote: On Tue 25-08-15 21:26:30, Yaowei Bai wrote: [...] static inline int check_new_page(struct page *page) { - const char *bad_reason = NULL; - unsigned long bad_flags = 0; - - if (unlikely(page_mapcount(page

Re: [PATCH 2/2] Documentation: clarify in calculating zone protection

2015-08-26 Thread Yaowei Bai
On Tue, Aug 25, 2015 at 05:06:33PM +0200, Michal Hocko wrote: On Tue 25-08-15 22:01:31, Yaowei Bai wrote: Every zone's protection is calculated from managed_pages not present_pages, to avoid misleading, correct it. This can be folded in to your previous patch http://marc.info/?l=linux-mmm

[PATCH] mm/page_alloc: remove unused parameter in init_currently_empty_zone()

2015-08-26 Thread Yaowei Bai
to be used to tell whether the call of these two functions is being made on behalf of a hotplug event, or happening at boot-time. However, init_currently_empty_zone() does not use this parameter at all, so remove it. Signed-off-by: Yaowei Bai bywxiao...@163.com --- include/linux/mmzone.h | 3

Re: [PATCH v2] mm/page_alloc: add a helper function to check page before alloc/free

2015-08-26 Thread Yaowei Bai
On Tue, Aug 25, 2015 at 04:03:22PM +0200, Michal Hocko wrote: On Tue 25-08-15 21:26:30, Yaowei Bai wrote: [...] static inline int check_new_page(struct page *page) { - const char *bad_reason = NULL; - unsigned long bad_flags = 0; - - if (unlikely(page_mapcount(page

Re: [PATCH v2] Documentation: add 'crashkernel=auto' entry into kernel-parameters.txt

2015-08-25 Thread Yaowei Bai
On Mon, Aug 24, 2015 at 11:26:23AM -0600, Jonathan Corbet wrote: On Mon, 24 Aug 2015 23:04:29 +0800 Yaowei Bai bywxiao...@163.com wrote: There is no 'crashkernel=auto' entry in kernel-parameters.txt, borrow it from kexec-kdump-howto.txt file in the kexec-tools-2.0.0 package. OK, so I

[PATCH v2] mm/page_alloc: add a helper function to check page before alloc/free

2015-08-25 Thread Yaowei Bai
The major portion of check_new_page() and free_pages_check() are same, introduce a helper function check_one_page() for simplification. Change in v2: - use bad_flags as parameter directly per Michal Hocko Signed-off-by: Yaowei Bai bywxiao...@163.com --- mm/page_alloc.c | 49

Re: [PATCH v3] mm/page_alloc: add a helper function to check page before alloc/free

2015-09-09 Thread Yaowei Bai
On Tue, Sep 08, 2015 at 09:19:07PM +0200, Vlastimil Babka wrote: > On 08/27/2015 02:51 PM, Yaowei Bai wrote: > > The major portion of check_new_page() and free_pages_check() are same, > > introduce a helper function check_one_page() for simplification. > > > >

Re: [PATCH v3] mm/page_alloc: add a helper function to check page before alloc/free

2015-09-09 Thread Yaowei Bai
On Wed, Sep 09, 2015 at 03:39:54PM +0200, Vlastimil Babka wrote: > On 09/08/2015 09:19 PM, Vlastimil Babka wrote: > >bloat-o-meter looks favorably with my gcc, although there shouldn't be a real > >reason for it, as the inlining didn't change: > > > >add/remove: 1/1 grow/shrink: 1/1 up/down:

[PATCH 3/3] mm/compaction: add an is_via_compact_memory helper function

2015-09-16 Thread Yaowei Bai
-off-by: Yaowei Bai <bywxiao...@163.com> --- mm/compaction.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index c5c627a..a8e6593 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1197,6 +1197,15 @@

[PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly

2015-09-16 Thread Yaowei Bai
Delete unnecessary if to let inactive_anon_is_low_global return directly. No functional changes. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- mm/vmscan.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 2d978b2..2785d8e

[PATCH 2/3] mm/oom_kill: introduce is_sysrq_oom helper

2015-09-16 Thread Yaowei Bai
Introduce is_sysrq_oom helper function indicating oom kill triggered by sysrq to improve readability. No functional changes. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- mm/oom_kill.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mm/oom_kill.

[PATCH] fs/ubifs: remove unnecessary new_valid_dev check

2015-09-29 Thread Yaowei Bai
As currently new_valid_dev always returns 1, so new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/ubifs/dir.c | 3 --- fs/ubifs/misc.h | 9 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs

Re: [PATCH 17/17] fs/ubifs: remove unnecessary new_valid_dev check

2015-09-29 Thread Yaowei Bai
On Mon, Sep 28, 2015 at 09:20:32PM +0200, Richard Weinberger wrote: > On Mon, Sep 28, 2015 at 4:53 PM, Yaowei Bai <bywxiao...@163.com> wrote: > > As new_valid_dev always returns 1, so new_valid_dev check is not > > needed, remove it. > > > > Signed-off-b

[PATCH 3/3] kernel/audit: audit_tree_match can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes audit_tree_match return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/audit.h | 2 +- kernel/audit_tree.c | 6 +++--- 2

[PATCH 2/3] kernel/audit: audit_string_contains_control can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes audit_string_contains_control return bool to improve readability due to this particular function only using either one or zero as its return value. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/audit.h | 2 +- kernel/audit.c| 6 +++--- 2 files c

[PATCH 1/8] kernel/trace: report_latency in trace_sched_wakeup.c can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes report_latency return bool to improve readability, indicating whether this new latency should be reported/recorded. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/trace_sched_wakeup.c | 8 1 file changed, 4 insertions

[PATCH 7/8] kernel/trace: is_legal_op can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes is_legal_op return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/trace_events_filter.c | 8 1 file chan

[PATCH 1/3] kernel/audit: audit_dummy_context can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes audit_dummy_context return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/audit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 3/8] kernel/trace: rb_is_reader_page can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes rb_is_reader_page return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion

[PATCH 6/8] kernel/trace: rb_event_is_commit can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes rb_event_is_commit return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/ring_buffer.c | 4 ++-- 1 file changed, 2 inse

[PATCH 5/8] kernel/ring_buffer: rb_per_cpu_empty can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes rb_per_cpu_empty return bool to improve readability. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/ring_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ring_buffer.c b/kernel

[PATCH 4/8] kernel/ring_buffer: ring_buffer_empty{cpu} can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes ring_buffer_empty and ring_buffer_empty_cpu return bool to improve readability. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/ring_buffer.h | 4 ++-- kernel/trace/ring_buffer.c | 10 +- 2 files changed, 7 insertions

[PATCH 8/8] kernel/trace: ftrace_event_is_function can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes ftrace_event_is_function return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/trace.h| 2 +- kernel

[PATCH 0/8] cleanups for trace

2015-09-29 Thread Yaowei Bai
This patchset just make some functions return bool to improve readability and/or simplicity. No functional change. Yaowei Bai (8): kernel/trace: report_latency in trace_sched_wakeup.c can be boolean kernel/trace: report_latency in trace_irqsoff.c can be boolean kernel/trace

[PATCH 2/8] kernel/trace: report_latency in trace_irqsoff.c can be boolean

2015-09-29 Thread Yaowei Bai
This patch makes report_latency return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- kernel/trace/trace_irqsoff.c | 8 1 file changed, 4 insertions(+), 4 del

Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check

2015-09-29 Thread Yaowei Bai
On Tue, Sep 29, 2015 at 04:47:30PM +0300, Boaz Harrosh wrote: > On 09/28/2015 04:43 PM, Yaowei Bai wrote: > > As new_valid_dev always returns 1, so !new_valid_dev check is not > > needed, remove it. > > > > Signed-off-by: Yaowei Bai <bywxiao...@163.com

Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

2015-09-30 Thread Yaowei Bai
valid_dev,new_valid_dev)(x) so i just left new_valid_dev untouched and removed other users in fs first. > > Mikulas > > > On Mon, 28 Sep 2015, Yaowei Bai wrote: > > > As new_valid_dev always returns 1, so !new_valid_dev check is not > > needed, remove it. > >

[PATCH] kernel/locking: lock_is_held can be boolean

2015-09-30 Thread Yaowei Bai
This patch makes lock_is_held return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- include/linux/lockdep.h | 2 +- kernel/locking/lockdep.

[PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/jfs/namei.c | 3 --- fs/jfs/super.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 35976bd..9d7551f

[PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/hpfs/namei.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 9e92c9c..ae4d5a1 100644 --- a/fs/hpfs/namei.c

[PATCH 14/17] fs/nilfs2: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/nilfs2/namei.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 37dd6b0..c9a1a49 100644 --- a/fs/

[PATCH 13/17] fs/nfs: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/nfs/dir.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 3d8e4ff..ce5a218 100644 --- a/fs/nfs/dir.c +++ b/

[PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/ext2/namei.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index b4841e3..3267a80 100644 --- a/fs/ext2/n

[PATCH 17/17] fs/ubifs: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/ubifs/dir.c | 3 --- fs/ubifs/misc.h | 9 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c

[PATCH 12/17] fs/ncpfs: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/ncpfs/dir.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 93575e9..2d9891a 100644 --- a/fs/ncpfs/dir.c ++

[PATCH 16/17] fs/stat: remove unnecessary new_valid_dev check

2015-09-28 Thread Yaowei Bai
As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai <bywxiao...@163.com> --- fs/stat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/stat.c b/fs/stat.c index 1aa..d4a61d8 100644 --- a/fs/stat.c +++ b/fs/stat.c @@

  1   2   3   4   >