linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jason Wessel <jason.wessel@windriver.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>, Michael Buesch <m@bues.ch>,
	linux-ide@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net,
	linux-mm@kvack.org, linux-pm@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH 16/25] include/linux: Use bool function return values of true/false not 1/0
Date: Tue, 31 Mar 2015 08:41:22 +0100	[thread overview]
Message-ID: <20150331074122.GI9447@x1> (raw)
In-Reply-To: <5edb9453646625a405ef0a642bec0819c0e6c2eb.1427759009.git.joe@perches.com>

On Mon, 30 Mar 2015, Joe Perches wrote:

> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  include/linux/blkdev.h               |  2 +-
>  include/linux/ide.h                  |  2 +-
>  include/linux/kgdb.h                 |  2 +-
>  include/linux/mfd/db8500-prcmu.h     |  2 +-

Acked-by: Lee Jones <lee.jones@linaro.org>

>  include/linux/mm.h                   |  2 +-
>  include/linux/power_supply.h         |  8 ++++----
>  include/linux/ssb/ssb_driver_extif.h |  2 +-
>  include/linux/ssb/ssb_driver_gige.h  | 16 ++++++++--------
>  8 files changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 5d93a66..eced869 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1591,7 +1591,7 @@ static inline bool blk_integrity_merge_bio(struct request_queue *rq,
>  }
>  static inline bool blk_integrity_is_initialized(struct gendisk *g)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  #endif /* CONFIG_BLK_DEV_INTEGRITY */
> diff --git a/include/linux/ide.h b/include/linux/ide.h
> index 93b5ca7..1ba07db 100644
> --- a/include/linux/ide.h
> +++ b/include/linux/ide.h
> @@ -1411,7 +1411,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *);
>  extern void ide_acpi_set_state(ide_hwif_t *hwif, int on);
>  #else
>  static inline int ide_acpi_init(void) { return 0; }
> -static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; }
> +static inline bool ide_port_acpi(ide_hwif_t *hwif) { return false; }
>  static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; }
>  static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; }
>  static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; }
> diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
> index e465bb1..840f494 100644
> --- a/include/linux/kgdb.h
> +++ b/include/linux/kgdb.h
> @@ -292,7 +292,7 @@ extern bool kgdb_nmi_poll_knock(void);
>  #else
>  static inline int kgdb_register_nmi_console(void) { return 0; }
>  static inline int kgdb_unregister_nmi_console(void) { return 0; }
> -static inline bool kgdb_nmi_poll_knock(void) { return 1; }
> +static inline bool kgdb_nmi_poll_knock(void) { return true; }
>  #endif
>  
>  extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
> diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
> index 0bd6944..3b06175 100644
> --- a/include/linux/mfd/db8500-prcmu.h
> +++ b/include/linux/mfd/db8500-prcmu.h
> @@ -744,7 +744,7 @@ static inline int db8500_prcmu_load_a9wdog(u8 id, u32 val)
>  
>  static inline bool db8500_prcmu_is_ac_wake_requested(void)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  static inline int db8500_prcmu_set_arm_opp(u8 opp)
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 4a3a385..164108c 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -819,7 +819,7 @@ static inline int cpu_pid_to_cpupid(int nid, int pid)
>  
>  static inline bool cpupid_pid_unset(int cpupid)
>  {
> -	return 1;
> +	return true;
>  }
>  
>  static inline void page_cpupid_reset_last(struct page *page)
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 75a1dd8..b0b45c7 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -350,12 +350,12 @@ static inline bool power_supply_is_amp_property(enum power_supply_property psp)
>  	case POWER_SUPPLY_PROP_CURRENT_NOW:
>  	case POWER_SUPPLY_PROP_CURRENT_AVG:
>  	case POWER_SUPPLY_PROP_CURRENT_BOOT:
> -		return 1;
> +		return true;
>  	default:
>  		break;
>  	}
>  
> -	return 0;
> +	return false;
>  }
>  
>  static inline bool power_supply_is_watt_property(enum power_supply_property psp)
> @@ -378,12 +378,12 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp)
>  	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
>  	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX:
>  	case POWER_SUPPLY_PROP_POWER_NOW:
> -		return 1;
> +		return true;
>  	default:
>  		break;
>  	}
>  
> -	return 0;
> +	return false;
>  }
>  
>  #endif /* __LINUX_POWER_SUPPLY_H__ */
> diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h
> index a410e84..5766b6f 100644
> --- a/include/linux/ssb/ssb_driver_extif.h
> +++ b/include/linux/ssb/ssb_driver_extif.h
> @@ -198,7 +198,7 @@ struct ssb_extif {
>  
>  static inline bool ssb_extif_available(struct ssb_extif *extif)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  static inline
> diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
> index 0688472..65f7740 100644
> --- a/include/linux/ssb/ssb_driver_gige.h
> +++ b/include/linux/ssb/ssb_driver_gige.h
> @@ -75,7 +75,7 @@ static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
>  	if (dev)
>  		return !!(dev->dev->bus->sprom.boardflags_lo &
>  			  SSB_GIGE_BFL_ROBOSWITCH);
> -	return 0;
> +	return false;
>  }
>  
>  /* Returns whether we can only do one DMA at once. */
> @@ -85,7 +85,7 @@ static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
>  	if (dev)
>  		return ((dev->dev->bus->chip_id == 0x4785) &&
>  			(dev->dev->bus->chip_rev < 2));
> -	return 0;
> +	return false;
>  }
>  
>  /* Returns whether we must flush posted writes. */
> @@ -94,7 +94,7 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
>  	struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
>  	if (dev)
>  		return (dev->dev->bus->chip_id == 0x4785);
> -	return 0;
> +	return false;
>  }
>  
>  /* Get the device MAC address */
> @@ -158,7 +158,7 @@ static inline void ssb_gige_exit(void)
>  
>  static inline bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
>  {
> @@ -166,19 +166,19 @@ static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
>  }
>  static inline bool ssb_gige_is_rgmii(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
>  {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2015-03-31  7:41 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
2015-03-31 15:54   ` Tony Lindgren
2015-03-31 15:58   ` Paolo Bonzini
2015-03-31 16:05     ` Marc Zyngier
2015-03-30 23:46 ` [PATCH 02/25] arm64: " Joe Perches
2015-03-31 15:29   ` Will Deacon
2015-03-30 23:46 ` [PATCH 03/25] hexagon: " Joe Perches
2015-03-30 23:46 ` [PATCH 04/25] ia64: " Joe Perches
2015-03-30 23:46 ` [PATCH 05/25] mips: " Joe Perches
2015-03-30 23:46 ` [PATCH 06/25] powerpc: " Joe Perches
2015-03-31  1:49   ` Benjamin Herrenschmidt
2015-03-31  1:57     ` Joe Perches
2015-03-30 23:46 ` [PATCH 07/25] s390: " Joe Perches
2015-03-31  7:13   ` Heiko Carstens
2015-03-30 23:46 ` [PATCH 08/25] sparc: " Joe Perches
2015-03-30 23:46 ` [PATCH 09/25] tile: " Joe Perches
2015-03-30 23:46 ` [PATCH 10/25] unicore32: " Joe Perches
2015-03-30 23:46 ` [PATCH 11/25] x86: " Joe Perches
2015-03-31 16:05   ` Paolo Bonzini
2015-03-30 23:46 ` [PATCH 12/25] virtio_console: " Joe Perches
2015-03-31  5:32   ` Amit Shah
2015-03-30 23:46 ` [PATCH 13/25] csiostor: " Joe Perches
2015-03-30 23:46 ` [PATCH 14/25] dcache: " Joe Perches
2015-03-30 23:46 ` [PATCH 15/25] nfsd: nfs4state: " Joe Perches
2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
2015-03-31  7:41   ` Lee Jones [this message]
2015-04-06 19:39   ` Sebastian Reichel
2015-03-30 23:46 ` [PATCH 17/25] sound: " Joe Perches
2015-03-31  7:11   ` Mark Brown
2015-03-30 23:46 ` [PATCH 18/25] rcu: tree_plugin: " Joe Perches
2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
2015-03-31  8:53   ` Peter Zijlstra
2015-03-31  9:03     ` Ingo Molnar
2015-03-31 16:46       ` Joe Perches
2015-04-01  6:58         ` Peter Zijlstra
2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
2015-04-07  9:27           ` Ingo Molnar
2015-04-07  9:36           ` about the flood of trivial patches and the Code of Conflict " Ingo Molnar
2015-04-07  9:39             ` Ingo Molnar
2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
2015-04-07 11:18             ` Ingo Molnar
2015-04-07 11:27               ` Peter Zijlstra
2015-04-07 13:21               ` about the flood of trivial patches and the Code of Conduct Peter Hurley
2015-04-07 11:28             ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Richard Weinberger
2015-04-07 11:32               ` Peter Zijlstra
2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
2015-04-07 13:21                   ` Steven Rostedt
2015-04-07 13:28                     ` Richard Weinberger
2015-04-07 12:31                 ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Rafael J. Wysocki
2015-04-07 13:28                   ` Steven Rostedt
2015-04-08 23:37                     ` Rafael J. Wysocki
2015-04-09  0:04                       ` Joe Perches
2015-04-13 12:17                       ` One Thousand Gnomes
2015-04-08  3:22                 ` Theodore Ts'o
2015-04-07 12:35           ` Joe Perches
2015-03-31  9:09     ` [PATCH 19/25] sched: Use bool function return values of true/false not 1/0 Joe Perches
2015-04-01  5:17   ` Jason Low
2015-04-01  5:46     ` [PATCH V2 " Joe Perches
2015-03-30 23:46 ` [PATCH 20/25] ftrace: " Joe Perches
2015-03-30 23:46 ` [PATCH 21/25] slub: " Joe Perches
2015-04-01  3:29   ` David Rientjes
2015-03-30 23:46 ` [PATCH 22/25] bridge: " Joe Perches
2015-03-30 23:46 ` [PATCH 23/25] netfilter: " Joe Perches
2015-03-31 16:58   ` Pablo Neira Ayuso
2015-03-30 23:46 ` [PATCH 24/25] security: " Joe Perches
2015-03-31  6:03   ` John Johansen
2015-03-30 23:46 ` [PATCH 25/25] sound: wm5100-tables: " Joe Perches
2015-04-01 11:54   ` Charles Keepax
2015-03-31  0:07 ` [PATCH 00/25] treewide: " Casey Schaufler
2015-03-31  0:14   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150331074122.GI9447@x1 \
    --to=lee.jones@linaro.org \
    --cc=davem@davemloft.net \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jason.wessel@windriver.com \
    --cc=joe@perches.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=m@bues.ch \
    --cc=netdev@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).