lkml.org 
[lkml]   [2011]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] blk-cgroup:be able to remove the record of unplugged device
On Tue, Jul 26, 2011 at 10:17:16AM -0700, Paul Menage wrote:
> On Tue, Jul 26, 2011 at 7:44 AM, Vivek Goyal <vgoyal@redhat.com> wrote:
> >>       char *s[4], *p, *major_s = NULL, *minor_s = NULL;
> >>       int ret;
> >> -     unsigned long major, minor, temp;
> >> +     unsigned long major, minor, weight;
> >
> > Do not replace temp with name weight. The place you are parsing it,
> > it could be weight, bps or iops. So lets keep the generic name in
> > place.
>
> The variable currently called "temp" is only ever stored in
> newpn->val.weight. iops and bps already have their own local
> variables.

They have but the context where temp is being used to figure out if it
is a deletion rule is generic. So if a rule is being deleted (be it
weight, bps or iops), we are going to parse it early in the function.
So in that context not calling it "weight" makes sense to me.

We use bps, iops names only after knowing the value type.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-26 20:35    [W:2.398 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site