* [PATCH] sched: use unsigned int for one-bit bitfield in sched_dl_entity
@ 2017-11-17 6:50 Xin Long
2017-11-17 8:20 ` Luca Abeni
0 siblings, 1 reply; 3+ messages in thread
From: Xin Long @ 2017-11-17 6:50 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Peter Zijlstra, luca abeni
This patch is to fix the 'dubious one-bit signed bitfield' error reported
by sparse, when using 'make C=2'.
Fixes: 799ba82de01e ("sched/deadline: Use C bitfields for the state flags")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/linux/sched.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a5dc7c9..3e35a37 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -473,10 +473,10 @@ struct sched_dl_entity {
* conditions between the inactive timer handler and the wakeup
* code.
*/
- int dl_throttled : 1;
- int dl_boosted : 1;
- int dl_yielded : 1;
- int dl_non_contending : 1;
+ unsigned int dl_throttled : 1,
+ dl_boosted : 1,
+ dl_yielded : 1,
+ dl_non_contending : 1;
/*
* Bandwidth enforcement timer. Each -deadline task has its
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sched: use unsigned int for one-bit bitfield in sched_dl_entity
2017-11-17 6:50 [PATCH] sched: use unsigned int for one-bit bitfield in sched_dl_entity Xin Long
@ 2017-11-17 8:20 ` Luca Abeni
2017-11-17 8:36 ` Xin Long
0 siblings, 1 reply; 3+ messages in thread
From: Luca Abeni @ 2017-11-17 8:20 UTC (permalink / raw)
To: Xin Long; +Cc: linux-kernel, Ingo Molnar, Peter Zijlstra
Hi,
On Fri, 17 Nov 2017 14:50:11 +0800
Xin Long <lucien.xin@gmail.com> wrote:
> This patch is to fix the 'dubious one-bit signed bitfield' error reported
> by sparse, when using 'make C=2'.
>
> Fixes: 799ba82de01e ("sched/deadline: Use C bitfields for the state flags")
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
I think this is very similar to patches already sent by Dan Carpenter
and Matthew Wilcox. As for the previous patches, I think the change is
ok.
Luca
> ---
> include/linux/sched.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index a5dc7c9..3e35a37 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -473,10 +473,10 @@ struct sched_dl_entity {
> * conditions between the inactive timer handler and the wakeup
> * code.
> */
> - int dl_throttled : 1;
> - int dl_boosted : 1;
> - int dl_yielded : 1;
> - int dl_non_contending : 1;
> + unsigned int dl_throttled : 1,
> + dl_boosted : 1,
> + dl_yielded : 1,
> + dl_non_contending : 1;
>
> /*
> * Bandwidth enforcement timer. Each -deadline task has its
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sched: use unsigned int for one-bit bitfield in sched_dl_entity
2017-11-17 8:20 ` Luca Abeni
@ 2017-11-17 8:36 ` Xin Long
0 siblings, 0 replies; 3+ messages in thread
From: Xin Long @ 2017-11-17 8:36 UTC (permalink / raw)
To: Luca Abeni; +Cc: LKML, Ingo Molnar, Peter Zijlstra
On Fri, Nov 17, 2017 at 4:20 PM, Luca Abeni <luca.abeni@santannapisa.it> wrote:
> Hi,
>
> On Fri, 17 Nov 2017 14:50:11 +0800
> Xin Long <lucien.xin@gmail.com> wrote:
>
>> This patch is to fix the 'dubious one-bit signed bitfield' error reported
>> by sparse, when using 'make C=2'.
>>
>> Fixes: 799ba82de01e ("sched/deadline: Use C bitfields for the state flags")
>> Signed-off-by: Xin Long <lucien.xin@gmail.com>
>
> I think this is very similar to patches already sent by Dan Carpenter
> and Matthew Wilcox. As for the previous patches, I think the change is
> ok.
okay then, just drop this one. Thanks for your reply.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-17 8:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 6:50 [PATCH] sched: use unsigned int for one-bit bitfield in sched_dl_entity Xin Long
2017-11-17 8:20 ` Luca Abeni
2017-11-17 8:36 ` Xin Long
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox