All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: build warning after merge of the cgroup tree
Date: Tue, 27 Aug 2013 14:33:44 -0400	[thread overview]
Message-ID: <20130827183344.GB12212@mtj.dyndns.org> (raw)
In-Reply-To: <20130827201716.528af63c96b66bb2446fc4b7@canb.auug.org.au>

On Tue, Aug 27, 2013 at 08:17:16PM +1000, Stephen Rothwell wrote:
> Hi Tejun,
> 
> After merging the cgroup tree, today's linux-next build (i386 defconfig)
> produced this warning:
> 
> kernel/cgroup.c: In function 'css_from_id':
> kernel/cgroup.c:5723:3: warning: passing argument 2 of 'cgroup_css' makes pointer from integer without a cast [enabled by default]
> kernel/cgroup.c:237:36: note: expected 'struct cgroup_subsys *' but argument is of type 'int'
> 
> Introduced by commit ca8bdcaff0d7 ("cgroup: make cgroup_css() take
> cgroup_subsys * instead and allow NULL subsys").

Yeap, the conversion missed a newly added function, which BTW
currently doesn't have any users.  Applied the following fix.

Thanks a lot!

>From d1625964da51bda61306ad3ec45307a799c21f08 Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@kernel.org>
Date: Tue, 27 Aug 2013 14:27:23 -0400
Subject: [PATCH] cgroup: fix cgroup_css() invocation in css_from_id()

ca8bdcaff0 ("cgroup: make cgroup_css() take cgroup_subsys * instead
and allow NULL subsys") missed one conversion in css_from_id(), which
was newly added.  As css_from_id() doesn't have any user yet, this
doesn't break anything other than generating a build warning.

Convert it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
---
 kernel/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e76698d..b5f4989 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5729,7 +5729,7 @@ struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss)
 
 	cgrp = idr_find(&ss->root->cgroup_idr, id);
 	if (cgrp)
-		return cgroup_css(cgrp, ss->subsys_id);
+		return cgroup_css(cgrp, ss);
 	return NULL;
 }
 
-- 
1.8.3.1

  reply	other threads:[~2013-08-27 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 10:17 linux-next: build warning after merge of the cgroup tree Stephen Rothwell
2013-08-27 18:33 ` Tejun Heo [this message]
2017-05-01  4:53 Stephen Rothwell
2017-12-13  3:56 Stephen Rothwell
2017-12-15  9:58 ` Arnd Bergmann
2017-12-15 13:10   ` Tejun Heo
2023-07-11  1:15 Stephen Rothwell
2023-07-11  1:22 ` Tejun Heo
2023-07-11  2:06   ` Miaohe Lin

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=20130827183344.GB12212@mtj.dyndns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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.