From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Steven French <sfrench@us.ibm.com>
Cc: akpm@osdl.org, Jan Engelhardt <jengelh@linux01.gwdg.de>,
linux-cifs-client@lists.samba.org, linux-kernel@vger.kernel.org,
sfrench@samba.org
Subject: Re: [PATCH 2.6.18-rc4-mm3 1/2] fs/cifs: Converting into generic boolean
Date: Mon, 04 Sep 2006 14:33:07 +0200 [thread overview]
Message-ID: <44FC1D03.1080403@student.ltu.se> (raw)
In-Reply-To: <OF54100A15.CFE2FA3E-ON872571DC.0073878E-862571DC.0073AAFB@us.ibm.com>
Sorry for the late reply.
Steven French wrote:
> If bool is really more efficient (not just better for typechecking at
> compile time), I don't mind checking in a set of such changes post 2.6.18
>
Efficient how? Memory, cpu-cycles, man-hours? The latter I think is
quite hard to prove one way or the other.
The first two depends on the compiler and its settings. I prefer a small
memory-consumption so there is less swapping, others try to pull out
every possible cpu-cycle. Giving the compiler information about what
type we are really using, should let it make the result more efficient
in either our preference, then any micro-optimization.
Also statements like:
a = !!b;
can be optimized to just plain:
a = b;
>
> Steve French
> Senior Software Engineer
> Linux Technology Center - IBM Austin
> phone: 512-838-2294
> email: sfrench at-sign us dot ibm dot com
>
> Richard Knutsson <ricknu-0@student.ltu.se> wrote on 09/01/2006
> 08:42:58 AM:
>
> > Jan Engelhardt wrote:
> >
> > >>--- a/fs/cifs/asn1.c 2006-09-01 01:24:45.000000000 +0200
> > >>+++ b/fs/cifs/asn1.c 2006-09-01 02:43:09.000000000 +0200
> > >>@@ -457,7 +457,7 @@ decode_negTokenInit(unsigned char *secur
> > >>unsigned char *sequence_end;
> > >>unsigned long *oid = NULL;
> > >>unsigned int cls, con, tag, oidlen, rc;
> > >>- int use_ntlmssp = FALSE;
> > >>+ int use_ntlmssp = false;
> > >>
> > >>
> > >
> > >Should not this become 'bool use_ntlmssp'? Possibly in a later patch?
> > >
> > >
> > I would like to, but there has been complaints on changing 'int''s into
> > 'bool''s, so until there is a more formal decision on this...
> > Of course I would be happy to make a 'int'->'bool'-patch if a
> maintainer
> > wants it.
> >
> > >
> > >Jan Engelhardt
> > >
> > >
> > Richard Knutsson
> >
>
--
VGER BF report: U 0.46053
next parent reply other threads:[~2006-09-04 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OF54100A15.CFE2FA3E-ON872571DC.0073878E-862571DC.0073AAFB@us.ibm.com>
2006-09-04 12:33 ` Richard Knutsson [this message]
[not found] <OFE86A755F.DEA60E1E-ON872571DC.00732934-862571DC.00739039@us.ibm.com>
2006-09-02 7:18 ` [PATCH 2.6.18-rc4-mm3 1/2] fs/cifs: Converting into generic boolean Jan Engelhardt
2006-09-01 13:19 Richard Knutsson
2006-09-01 13:19 ` Jan Engelhardt
2006-09-01 13:42 ` Richard Knutsson
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=44FC1D03.1080403@student.ltu.se \
--to=ricknu-0@student.ltu.se \
--cc=akpm@osdl.org \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrench@samba.org \
--cc=sfrench@us.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox