All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Abeni <luca.abeni@santannapisa.it>
To: Xin Long <lucien.xin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] sched: use unsigned int for one-bit bitfield in sched_dl_entity
Date: Fri, 17 Nov 2017 09:20:16 +0100	[thread overview]
Message-ID: <20171117092016.382a7270@luca> (raw)
In-Reply-To: <9ca35406601257b736823d9a2109888c86f2c0e3.1510901411.git.lucien.xin@gmail.com>

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

  reply	other threads:[~2017-11-17  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-11-17  8:36   ` Xin Long

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=20171117092016.382a7270@luca \
    --to=luca.abeni@santannapisa.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.