All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
Subject: Re: cifs: use standard token parser for mount options
Date: Wed, 28 Mar 2012 14:31:46 +0300	[thread overview]
Message-ID: <20120328113146.GE3200@mwanda> (raw)
In-Reply-To: <1332933181.2144.11.camel@localhost>

On Wed, Mar 28, 2012 at 12:13:01PM +0100, Sachin Prabhu wrote:
> Hello Dan, 
> 
> You are right.
> 
> On Wed, 2012-03-28 at 13:45 +0300, Dan Carpenter wrote:
> > Hello Sachin Prabhu,
> > 
> > This is a semi-automatic email about new static checker warnings.
> > 
> > The patch 8830d7e07a5e: "cifs: use standard token parser for mount 
> > options" from Mar 23, 2012, leads to the following Smatch complaint:
> > 
> > fs/cifs/connect.c:1607 cifs_parse_mount_options()
> > 	 error: we previously assumed 'value' could be null (see line 1568)
> > 
> > fs/cifs/connect.c
> >   1567				value = strchr(data, '=');
> >   1568				if (value != NULL)
> >                                     ^^^^^^^^^^^^^
> > Check.
> 
> static const match_table_t cifs_mount_option_tokens = {
> ..
>         { Opt_pass, "pass=%s" },
>         { Opt_pass, "password=%s" },
> ..
> ^^^ The parser will only match Opt_pass if the token passed contains a
> '=' character so value cannot be NULL. That check for NULL is
> unnecessary and shouldn't be there. This is otherwise harmless.
> 

Great.  Could you send a patch to remove the unneeded check?  Please
give me the Reported-by: tag, I am trying to catch up to Randy.

regards,
dan carpenter

  reply	other threads:[~2012-03-28 11:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28 10:45 cifs: use standard token parser for mount options Dan Carpenter
     [not found] ` <20120328104541.GC29022-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2012-03-28 11:13   ` Sachin Prabhu
2012-03-28 11:31     ` Dan Carpenter [this message]
2012-03-28 17:07       ` [PATCH] Remove unnecessary check for NULL in password parser Sachin Prabhu
2012-03-28 17:23         ` Jeff Layton

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=20120328113146.GE3200@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
    --cc=sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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.