From: "Steve French" <smfrench@gmail.com>
To: "Harvey Harrison" <harvey.harrison@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cifs: avoid mixing bool and le16
Date: Wed, 23 Jul 2008 19:19:34 -0500 [thread overview]
Message-ID: <524f69650807231719y33e96d02y7b04d1115620aa1d@mail.gmail.com> (raw)
In-Reply-To: <1216857138.30386.33.camel@brick>
Seems like a cast to bool or an "if ...else" would be clearer than using !!
By the way I don't see this warning - is it a newer compiler warning?
On Wed, Jul 23, 2008 at 6:52 PM, Harvey Harrison
<harvey.harrison@gmail.com> wrote:
> fs/cifs/cifssmb.c:3917:13: warning: incorrect type in assignment (different base types)
> fs/cifs/cifssmb.c:3917:13: expected bool [unsigned] [usertype] is_unicode
> fs/cifs/cifssmb.c:3917:13: got restricted __le16
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> fs/cifs/cifssmb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 4511b70..56f1a71 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3914,7 +3914,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
> bool is_unicode;
> struct dfs_referral_level_3 *ref;
>
> - is_unicode = pSMBr->hdr.Flags2 & SMBFLG2_UNICODE;
> + is_unicode = !!(pSMBr->hdr.Flags2 & SMBFLG2_UNICODE);
> *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals);
>
> if (*num_of_nodes < 1) {
> --
> 1.5.6.4.570.g052e
>
>
>
>
--
Thanks,
Steve
next prev parent reply other threads:[~2008-07-24 0:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 23:52 Harvey Harrison
2008-07-24 0:19 ` Steve French [this message]
2008-07-24 0:24 ` Harvey Harrison
2008-07-24 0:26 ` Steve French
2008-07-25 18:25 ` Al Viro
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=524f69650807231719y33e96d02y7b04d1115620aa1d@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®