drivers: Use bool function return values true/false not 1/0
Subsystems (14)
cover drivers: Use bool function return values true/false not 1/0
Joe Perches (7):
drm: Use bool function return values of true/false not 1/0
dm_table: Use bool function return values of true/false not 1/0
genwqe: Use bool function return values of true/false not 1/0
wmi: Use bool function return values of true/false not 1/0
ssb: Use bool function return values of true/false not 1/0
thermal: Use bool function return values of true/false not 1/0
serial: kgdb_nmi: Use bool function return values of true/false not
1/0
drivers/gpu/drm/ast/ast_post.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- drivers/md/dm-table.c | 20 ++++++++++---------- drivers/misc/genwqe/card_base.h | 2 +- drivers/platform/x86/wmi.c | 4 ++-- drivers/ssb/driver_gige.c | 2 +- drivers/thermal/thermal_core.h | 2 +- drivers/tty/serial/kgdb_nmi.c | 6 +++--- 8 files changed, 20 insertions(+), 20 deletions(-)
Signature · 1 line
2.1.2
PATCH 2/7 dm_table: Use bool function return values of true/false not 1/0
Use the normal return values for bool functions
--- drivers/md/dm-table.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/md/dm-table.c +10 -10
@@ -1336,14 +1336,14 @@ static bool dm_table_supports_flush(struct dm_table *t, unsigned flush)continue ;if (ti->flush_supported) -return 1 ; +return true;if (ti->type->iterate_devices && ti->type->iterate_devices (ti, device_flush_capable, &flush)) -return 1 ; +return true; } -return 0 ; +return false; }static bool dm_table_discard_zeroes_data (struct dm_table *t)
@@ -1356,10 +1356,10 @@ static bool dm_table_discard_zeroes_data(struct dm_table *t) ti =dm_table_get_target (t, i++);if (ti->discard_zeroes_data_unsupported) -return 0 ; +return false; } -return 1 ; +return true; } static int device_is_nonrot(struct dm_target *ti, struct dm_dev *dev,
@@ -1405,10 +1405,10 @@ static bool dm_table_all_devices_attribute(struct dm_table *t,if (!ti->type->iterate_devices || !ti->type->iterate_devices (ti, func,NULL )) -return 0 ; +return false; } -return 1 ; +return true; } static int device_not_write_same_capable(struct dm_target *ti, struct dm_dev *dev,
@@ -1465,14 +1465,14 @@ static bool dm_table_supports_discards(struct dm_table *t)continue ;if (ti->discards_supported) -return 1 ; +return true;if (ti->type->iterate_devices && ti->type->iterate_devices (ti, device_discard_capable,NULL )) -return 1 ; +return true; } -return 0 ; +return false; } void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
Signature · 1 line
2.1.2
PATCH 4/7 wmi: Use bool function return values of true/false not 1/0
In reply to Joe PerchesUse the normal return values for bool functions
--- drivers/platform/x86/wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/wmi.c +2 -2
@@ -239,10 +239,10 @@ static bool find_guid(const char *guid_string, struct wmi_block **out)if (memcmp (block->guid, guid_input,16 ) ==0 ) {if (out) *out = wblock; -return 1 ; +return true; } } -return 0 ; +return false; }static acpi_status wmi_method_enable (struct wmi_block *wblock,int enable)
Signature · 1 line
2.1.2
PATCH 6/7 thermal: Use bool function return values of true/false not 1/0
In reply to Joe PerchesUse the normal return values for bool functions
--- drivers/thermal/thermal_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/thermal_core.h +1 -1
@@ -115,7 +115,7 @@ static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz)static inline bool of_thermal_is_trip_valid (struct thermal_zone_device *tz,int trip) { -return 0 ; +return false; }static inline const struct thermal_trip *of_thermal_get_trip_points (struct thermal_zone_device *tz)
Signature · 1 line
2.1.2
PATCH 7/7 serial: kgdb_nmi: Use bool function return values of true/false not 1/0
In reply to Joe PerchesUse the normal return values for bool functions
--- drivers/tty/serial/kgdb_nmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/tty/serial/kgdb_nmi.c +3 -3
@@ -173,18 +173,18 @@ static int kgdb_nmi_poll_one_knock(void)bool kgdb_nmi_poll_knock (void ) {if (kgdb_nmi_knock <0 ) -return 1 ; +return true;while (1 ) {int ret; ret =kgdb_nmi_poll_one_knock ();if (ret ==NO_POLL_CHAR ) -return 0 ; +return false;else if (ret ==1 )break ; } -return 1 ; +return true; }/*
Signature · 1 line
2.1.2
PATCH 1/7 drm: Use bool function return values of true/false not 1/0
In reply to Joe PerchesUse the normal return values for bool functions
--- drivers/gpu/drm/ast/ast_post.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/ast/ast_post.c +1 -1
@@ -64,7 +64,7 @@ bool ast_is_vga_enabled(struct drm_device *dev)return ch &0x04 ; } } -return 0 ; +return false; }static const u8 extreginfo[] = {0x0f ,0x04 ,0x1c ,0xff };
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
@@ -502,7 +502,7 @@ bool vmw_fence_obj_signaled(struct vmw_fence_obj *fence)struct vmw_fence_manager *fman =fman_from_fence (fence);if (test_bit (FENCE_FLAG_SIGNALED_BIT , &fence->base.flags)) -return 1 ; +return true;vmw_fences_update (fman);
Signature · 6 lines
2.1.2 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/7 ssb: Use bool function return values of true/false not 1/0
In reply to Joe PerchesUse the normal return values for bool functions
--- drivers/ssb/driver_gige.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ssb/driver_gige.c +1 -1
@@ -242,7 +242,7 @@ static int ssb_gige_probe(struct ssb_device *sdev,bool pdev_is_ssb_gige_core (struct pci_dev *pdev) {if (!pdev->resource[0 ].name) -return 0 ; +return false;return (strcmp (pdev->resource[0 ].name,SSB_GIGE_MEM_RES_NAME ) ==0 ); }EXPORT_SYMBOL (pdev_is_ssb_gige_core);
Signature · 1 line
2.1.2
PATCH 3/7 genwqe: Use bool function return values of true/false not 1/0
In reply to Joe PerchesUse the normal return values for bool functions
--- drivers/misc/genwqe/card_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/genwqe/card_base.h +1 -1
@@ -495,7 +495,7 @@ int genwqe_user_vunmap(struct genwqe_dev *cd, struct dma_mapping *m,static inline bool dma_mapping_used (struct dma_mapping *m) {if (!m) -return 0 ; +return false;return m->size !=0 ; }
Signature · 1 line
2.1.2
Michael Büsch
maintainerRe: [PATCH 5/7] ssb: Use bool function return values of true/false not 1/0
In reply to Joe PerchesQuoted 12 lines · On Mon, 30 Mar 2015 10:43:21 -0700 Joe Perches <[email protected]> wrote:
Use the normal return values for bool functions
Signed-off-by Joe Perches <[email protected]>--- drivers/ssb/driver_gige.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/driver_gige.c +0
-0
drivers/ssb/driver_gige.c static int ssb_gige_probe(struct ssb_device *sdev, · line 248
Quoted 8 lines
drivers/ssb/driver_gige.c +1
-1@@ -242,7 +242,7 @@ static int ssb_gige_probe(struct ssb_device *sdev,bool pdev_is_ssb_gige_core (struct pci_dev *pdev) {if (!pdev->resource[0 ].name) -return 0 ; +return false;return (strcmp (pdev->resource[0 ].name,SSB_GIGE_MEM_RES_NAME ) ==0 ); }EXPORT_SYMBOL (pdev_is_ssb_gige_core);
Looks good.
Kalle, can you take this one, please?
Signature · 1 line
Michael
Mike Snitzer
AppliedRe: [PATCH 2/7] dm_table: Use bool function return values of true/false not 1/0
In reply to Joe PerchesQuoted 3 lines · Joe Perches
Use the normal return values for bool functions
Signed-off-by Joe Perches <[email protected]>
Applied, thanks.
Re: [PATCH 5/7] ssb: Use bool function return values of true/false not 1/0
In reply to Michael BüschQuoted 26 lines · Michael Büsch
Quoted 12 lines · On Mon, 30 Mar 2015 10:43:21 -0700 Joe Perches <[email protected]> wrote:
Use the normal return values for bool functions
Signed-off-by Joe Perches <[email protected]>--- drivers/ssb/driver_gige.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ssb/driver_gige.c +0
-0drivers/ssb/driver_gige.c static int ssb_gige_probe(struct ssb_device *sdev, · line 248
Quoted 8 lines
drivers/ssb/driver_gige.c +1
-1@@ -242,7 +242,7 @@ static int ssb_gige_probe(struct ssb_device *sdev,bool pdev_is_ssb_gige_core (struct pci_dev *pdev) {if (!pdev->resource[0 ].name) -return 0 ; +return false;return (strcmp (pdev->resource[0 ].name,SSB_GIGE_MEM_RES_NAME ) ==0 ); }EXPORT_SYMBOL (pdev_is_ssb_gige_core);Looks good.
Quoted 3 lines
Signed-off-by Michael Buesch <[email protected]>Kalle, can you take this one, please?
Sure, I'll apply it in the next few days.
Signature · 1 line
Kalle Valo
Darren Hart
AppliedRe: [PATCH 4/7] wmi: Use bool function return values of true/false not 1/0
In reply to Joe PerchesQuoted 3 lines · Joe Perches
Use the normal return values for bool functions
Signed-off-by Joe Perches <[email protected]>
Queued, thank you Joe.
Signature · 2 lines
Darren Hart Intel Open Source Technology Center
RE: [PATCH 6/7] thermal: Use bool function return values of true/false not 1/0
In reply to Joe PerchesQuoted 11 lines
-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Tuesday, March 31, 2015 1:43 AM
To: [email protected]; Zhang, Rui; Eduardo Valentin
Cc: [email protected]
Subject: [PATCH 6/7] thermal: Use bool function return values of true/false not 1/0
Importance: High
Quoted 3 lines
Use the normal return values for bool functions
Signed-off-by Joe Perches <[email protected]>
Applied.
Thanks,
rui
Quoted 20 lines
--- drivers/thermal/thermal_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/thermal_core.h +0
-0@@ -115,7 +115,7 @@ static inline int of_thermal_get_ntrips(struct
thermal_zone_device*tz) static inline bool of_thermal_is_trip_valid(structthermal_zone_device*tz,drivers/thermal/thermal_core.h +1
-1int trip) { -return 0 ; +return false; } static inline const struct thermal_trip * of_thermal_get_trip_points(struct
thermal_zone_device*tz)
--
2.1.2