hugetlb:Make the function vma_shareable bool
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mike Kravetz
Acked-byQuoted 24 lines · Nicholas Krause
This makes the function
vma_shareablebool now due to this particular function only ever returning either one or zero as its return value.Signed-off-by Nicholas Krause <[email protected]>--- mm/hugetlb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/hugetlb.c +1
-1@@ -3789,7 +3789,7 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma,return saddr; } -static int vma_shareable (struct vm_area_struct *vma,unsigned long addr) +static bool vma_shareable (struct vm_area_struct *vma,unsigned long addr) {unsigned long base = addr &PUD_MASK ;unsigned long end = base +PUD_SIZE ;
mm/hugetlb.c static int vma_shareable(struct vm_area_struct *vma, unsigned long addr) · line 3806
Quoted 10 lines
mm/hugetlb.c +2
-2@@ -3799,8 +3799,8 @@ static int vma_shareable(struct vm_area_struct *vma, unsigned long addr)*/ if (vma->vm_flags &VM_MAYSHARE && vma->vm_start <= base && end <= vma->vm_end) -return 1 ; -return 0 ; +return true; +return false; }/*
I was looking at the page table sharing code just last week.
Signature · 1 line
Mike Kravetz
Naoya Horiguchi
Acked-byQuoted 5 lines · Nicholas Krause
This makes the function
vma_shareablebool now due to this particular function only ever returning either one or zero as its return value.Signed-off-by Nicholas Krause <[email protected]>
David Rientjes
Acked-byQuoted 5 lines · Nicholas Krause
This makes the function
vma_shareablebool now due to this particular function only ever returning either one or zero as its return value.Signed-off-by Nicholas Krause <[email protected]>
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · nick
David,
This was already acknowledged, however I am over 150 different patches lying around on my system for various fixes/cleanups in many different subsystems and based on my rep people seem to be just ignoring them. If someone looks at them first they should go through. Below is a patch for fixing a bug in the Intel network drivers.
./scripts/get_maintainer.pl suggests this should go to Jeff Kirsher <[email protected]> for review.
It looks like a cleanup that would only suppress output to the kernel log, so might be better to just make this function void.
You might also have luck with the "TRIVIAL PATCHES" section of ./MAINTAINERS for things like this.
Quoted 48 lines
Nick
From950ace789c2cc371233ea0204e9baccfea7630bcMon Sep 17 00:00:00 2001
From: Nicholas Krause <[email protected]>
Date: Mon, 29 Jun 2015 22:55:22 -0400
Subject: [PATCH] i40e:Return-ENODEVif hardware has no support for certain
required features in the functioni40e_init_pf_fcoeThis makes the function
i40e_init_pf_fcoecorrectly return-ENODEVas a error return for when the underlying hardware does not have support for FCOE or DCB rather then 0 to it's callers in order to comply with checks run by these particular function's callers to find out if the underlying hardware supports these features.Signed-off-by Nicholas Krause <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/i40e/i40e_fcoe.c +4
-3@@ -273,7 +273,8 @@ out:* i40e_fcoe_sw_init - sets up the HW for FCoE * @pf: pointer to PF * -* Returns 0 if FCoE is supported otherwise the error code +* Returns 0 if FCoE is supported otherwise -ENODEV if +* the hardware does not support it **/ int i40e_init_pf_fcoe (struct i40e_pf *pf) {@@ -287,13 +288,13 @@ int i40e_init_pf_fcoe(struct i40e_pf *pf)if (!pf->hw.func_caps.fcoe) {dev_info (&pf->pdev->dev,"FCoE capability is disabled\n" ); -return 0 ; +return -ENODEV ; }if (!pf->hw.func_caps.dcb) {dev_warn (&pf->pdev->dev,"Hardware is not DCB capable not enabling FCoE.\n" ); -return 0 ; +return -ENODEV ; }/* enable FCoE hash filter */