From patchwork Mon Mar 30 23:46:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 6126521 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2EEEEBF4A6 for ; Mon, 30 Mar 2015 23:50:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A66420450 for ; Mon, 30 Mar 2015 23:50:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D8B82043C for ; Mon, 30 Mar 2015 23:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754155AbbC3Xr4 (ORCPT ); Mon, 30 Mar 2015 19:47:56 -0400 Received: from smtprelay0036.hostedemail.com ([216.40.44.36]:33792 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754085AbbC3Xrv (ORCPT ); Mon, 30 Mar 2015 19:47:51 -0400 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id BDF6423411; Mon, 30 Mar 2015 23:47:49 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::::::::::::::::::::::, RULES_HIT:2:41:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1535:1605:1730:1747:1777:1792:2198:2199:2393:2559:2562:3138:3139:3140:3141:3142:3865:4049:4118:4250:4321:4605:5007:6261:10004:10848:11026:11473:11657:11658:11914:12043:12048:12296:12438:12517:12519:12555:13255:13972:14096:14394:21080, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: sleep54_26f1d9a0cdd28 X-Filterd-Recvd-Size: 7341 Received: from joe-laptop.perches.com (pool-71-119-66-80.lsanca.fios.verizon.net [71.119.66.80]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Mon, 30 Mar 2015 23:47:47 +0000 (UTC) From: Joe Perches To: linux-kernel@vger.kernel.org, "David S. Miller" , Jason Wessel , Samuel Ortiz , Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Michael Buesch Cc: linux-ide@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, linux-mm@kvack.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 16/25] include/linux: Use bool function return values of true/false not 1/0 Date: Mon, 30 Mar 2015 16:46:14 -0700 Message-Id: <5edb9453646625a405ef0a642bec0819c0e6c2eb.1427759009.git.joe@perches.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the normal return values for bool functions Signed-off-by: Joe Perches Acked-by: Lee Jones Acked-By: Sebastian Reichel --- include/linux/blkdev.h | 2 +- include/linux/ide.h | 2 +- include/linux/kgdb.h | 2 +- include/linux/mfd/db8500-prcmu.h | 2 +- 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) {