* [PATCH 0/7] drivers: Use bool function return values true/false not 1/0
@ 2015-03-30 17:43 Joe Perches
2015-03-30 17:43 ` [PATCH 1/7] drm: Use bool function return values of " Joe Perches
` (6 more replies)
0 siblings, 7 replies; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel, dm-devel, linux-raid, platform-driver-x86, netdev,
linux-pm, linux-serial
Cc: dri-devel
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(-)
--
2.1.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/7] drm: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
2015-03-30 17:43 ` [PATCH 2/7] dm_table: " Joe Perches
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel; +Cc: David Airlie, dri-devel
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/ast/ast_post.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
index 810c51d..6ce2a6f 100644
--- a/drivers/gpu/drm/ast/ast_post.c
+++ b/drivers/gpu/drm/ast/ast_post.c
@@ -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 };
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 945f1e0..704e231 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -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);
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/7] dm_table: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
2015-03-30 17:43 ` [PATCH 1/7] drm: Use bool function return values of " Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
2015-03-30 17:51 ` Mike Snitzer
2015-03-30 17:43 ` [PATCH 3/7] genwqe: " Joe Perches
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel, Alasdair Kergon, Mike Snitzer, dm-devel, Neil Brown
Cc: linux-raid
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/md/dm-table.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index e0f618b..d9b00b8 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -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,
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/7] genwqe: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
2015-03-30 17:43 ` [PATCH 1/7] drm: Use bool function return values of " Joe Perches
2015-03-30 17:43 ` [PATCH 2/7] dm_table: " Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
2015-03-30 17:43 ` [PATCH 4/7] wmi: " Joe Perches
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/misc/genwqe/card_base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h
index e735344..2e57df1 100644
--- a/drivers/misc/genwqe/card_base.h
+++ b/drivers/misc/genwqe/card_base.h
@@ -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;
}
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/7] wmi: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
` (2 preceding siblings ...)
2015-03-30 17:43 ` [PATCH 3/7] genwqe: " Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
2015-04-02 5:17 ` Darren Hart
2015-03-30 17:43 ` [PATCH 5/7] ssb: " Joe Perches
` (2 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel, Darren Hart; +Cc: platform-driver-x86
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/platform/x86/wmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 26a0bd8..aac4757 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -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)
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/7] ssb: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
` (3 preceding siblings ...)
2015-03-30 17:43 ` [PATCH 4/7] wmi: " Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
2015-03-30 17:49 ` Michael Büsch
2015-03-30 17:43 ` [PATCH 6/7] thermal: " Joe Perches
2015-03-30 17:43 ` [PATCH 7/7] serial: kgdb_nmi: " Joe Perches
6 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel, Michael Buesch; +Cc: netdev
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/ssb/driver_gige.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
index e973405..ebee6b0 100644
--- a/drivers/ssb/driver_gige.c
+++ b/drivers/ssb/driver_gige.c
@@ -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);
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/7] thermal: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
` (4 preceding siblings ...)
2015-03-30 17:43 ` [PATCH 5/7] ssb: " Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
2015-04-07 5:43 ` Zhang, Rui
2015-03-30 17:43 ` [PATCH 7/7] serial: kgdb_nmi: " Joe Perches
6 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel, Zhang Rui, Eduardo Valentin; +Cc: linux-pm
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/thermal/thermal_core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 9e20e4d..749d41a 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -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)
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 7/7] serial: kgdb_nmi: Use bool function return values of true/false not 1/0
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
` (5 preceding siblings ...)
2015-03-30 17:43 ` [PATCH 6/7] thermal: " Joe Perches
@ 2015-03-30 17:43 ` Joe Perches
6 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2015-03-30 17:43 UTC (permalink / raw)
To: linux-kernel, Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial
Use the normal return values for bool functions
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/tty/serial/kgdb_nmi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 129dc5b..117df15 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -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;
}
/*
--
2.1.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 5/7] ssb: Use bool function return values of true/false not 1/0
2015-03-30 17:43 ` [PATCH 5/7] ssb: " Joe Perches
@ 2015-03-30 17:49 ` Michael Büsch
2015-03-30 18:39 ` Kalle Valo
0 siblings, 1 reply; 13+ messages in thread
From: Michael Büsch @ 2015-03-30 17:49 UTC (permalink / raw)
To: Joe Perches, Kalle Valo; +Cc: linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 892 bytes --]
On Mon, 30 Mar 2015 10:43:21 -0700
Joe Perches <joe@perches.com> wrote:
> Use the normal return values for bool functions
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/ssb/driver_gige.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
> index e973405..ebee6b0 100644
> --- a/drivers/ssb/driver_gige.c
> +++ b/drivers/ssb/driver_gige.c
> @@ -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.
Signed-off-by: Michael Buesch <m@bues.ch>
Kalle, can you take this one, please?
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/7] dm_table: Use bool function return values of true/false not 1/0
2015-03-30 17:43 ` [PATCH 2/7] dm_table: " Joe Perches
@ 2015-03-30 17:51 ` Mike Snitzer
0 siblings, 0 replies; 13+ messages in thread
From: Mike Snitzer @ 2015-03-30 17:51 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, Alasdair Kergon, dm-devel, Neil Brown, linux-raid
On Mon, Mar 30 2015 at 1:43pm -0400,
Joe Perches <joe@perches.com> wrote:
> Use the normal return values for bool functions
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 5/7] ssb: Use bool function return values of true/false not 1/0
2015-03-30 17:49 ` Michael Büsch
@ 2015-03-30 18:39 ` Kalle Valo
0 siblings, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2015-03-30 18:39 UTC (permalink / raw)
To: Michael Büsch; +Cc: Joe Perches, linux-kernel, netdev
Michael Büsch <m@bues.ch> writes:
> On Mon, 30 Mar 2015 10:43:21 -0700
> Joe Perches <joe@perches.com> wrote:
>
>> Use the normal return values for bool functions
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>> drivers/ssb/driver_gige.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
>> index e973405..ebee6b0 100644
>> --- a/drivers/ssb/driver_gige.c
>> +++ b/drivers/ssb/driver_gige.c
>> @@ -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.
>
> Signed-off-by: Michael Buesch <m@bues.ch>
>
> Kalle, can you take this one, please?
Sure, I'll apply it in the next few days.
--
Kalle Valo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/7] wmi: Use bool function return values of true/false not 1/0
2015-03-30 17:43 ` [PATCH 4/7] wmi: " Joe Perches
@ 2015-04-02 5:17 ` Darren Hart
0 siblings, 0 replies; 13+ messages in thread
From: Darren Hart @ 2015-04-02 5:17 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, platform-driver-x86
On Mon, Mar 30, 2015 at 10:43:20AM -0700, Joe Perches wrote:
> Use the normal return values for bool functions
>
> Signed-off-by: Joe Perches <joe@perches.com>
Queued, thank you Joe.
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 6/7] thermal: Use bool function return values of true/false not 1/0
2015-03-30 17:43 ` [PATCH 6/7] thermal: " Joe Perches
@ 2015-04-07 5:43 ` Zhang, Rui
0 siblings, 0 replies; 13+ messages in thread
From: Zhang, Rui @ 2015-04-07 5:43 UTC (permalink / raw)
To: Joe Perches, linux-kernel, Eduardo Valentin; +Cc: linux-pm
> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Tuesday, March 31, 2015 1:43 AM
> To: linux-kernel@vger.kernel.org; Zhang, Rui; Eduardo Valentin
> Cc: linux-pm@vger.kernel.org
> Subject: [PATCH 6/7] thermal: Use bool function return values of true/false not
> 1/0
> Importance: High
>
> Use the normal return values for bool functions
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
Thanks,
rui
> ---
> drivers/thermal/thermal_core.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
> index 9e20e4d..749d41a 100644
> --- a/drivers/thermal/thermal_core.h
> +++ b/drivers/thermal/thermal_core.h
> @@ -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)
> --
> 2.1.2
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-04-07 5:45 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 17:43 [PATCH 0/7] drivers: Use bool function return values true/false not 1/0 Joe Perches
2015-03-30 17:43 ` [PATCH 1/7] drm: Use bool function return values of " Joe Perches
2015-03-30 17:43 ` [PATCH 2/7] dm_table: " Joe Perches
2015-03-30 17:51 ` Mike Snitzer
2015-03-30 17:43 ` [PATCH 3/7] genwqe: " Joe Perches
2015-03-30 17:43 ` [PATCH 4/7] wmi: " Joe Perches
2015-04-02 5:17 ` Darren Hart
2015-03-30 17:43 ` [PATCH 5/7] ssb: " Joe Perches
2015-03-30 17:49 ` Michael Büsch
2015-03-30 18:39 ` Kalle Valo
2015-03-30 17:43 ` [PATCH 6/7] thermal: " Joe Perches
2015-04-07 5:43 ` Zhang, Rui
2015-03-30 17:43 ` [PATCH 7/7] serial: kgdb_nmi: " Joe Perches
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).