All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	sparmaintainer@unisys.com, linux-kernel@vger.kernel.org,
	Benjamin Romer <benjamin.romer@unisys.com>,
	David Kershner <david.kershner@unisys.com>
Subject: Re: [PATCH] staging: unisys: handle major number properly
Date: Tue, 24 Mar 2015 11:57:50 +0300	[thread overview]
Message-ID: <20150324085750.GQ10964@mwanda> (raw)
In-Reply-To: <20150324084316.GA7113@sudip-PC>

On Tue, Mar 24, 2015 at 02:13:16PM +0530, Sudip Mukherjee wrote:
> On Tue, Mar 24, 2015 at 11:32:47AM +0300, Dan Carpenter wrote:
> <snip>
> > >  	}
> > > -	rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
> > > +	rc = cdev_add(&file_cdev, MKDEV(major, 0), 1);
> > 
> > This should just be:
> > 
> > 	rc = cdev_add(&file_cdev, majordev, 1);
> > 
> > So here is my suggestion:
> > 
> > [patch 1] delete dead code I mentioned in my previous email.
> > 	This deletes "registered" and the (MAJOR(majordev) >= 0) check.
> 
> that was initially my first patch.

Yes, but the patch description wasn't clear.  You were talking saying
the condition was always true because of the types and I am saying the
condition is always true because of the order the functions are called.

> 
> > 
> > [patch 2] pass majordev to visorchipset_file_cleanup()
> > 	This lets you delete the "majordev" global.
> > 
> > [patch 3] small cleanup in visorchipset_file_init()
> > 
> > -	rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
> > +	rc = cdev_add(&file_cdev, majordev, 1);
> 
> and i can also include the removal of that global variable in this
> 3rd patch.
> thanks.. after Greg's review i was thinking i understood the code wrong.
> but then will this be a v2 or a whole new series?

I'm pretty sure we're up to v3 at least now.  This means redoing the
whole series, yes.

regards,
dan carpenter


      reply	other threads:[~2015-03-24  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 15:01 [PATCH] staging: unisys: handle major number properly Sudip Mukherjee
2015-03-23 21:04 ` Greg Kroah-Hartman
2015-03-24  5:36   ` Sudip Mukherjee
2015-03-24  8:32 ` Dan Carpenter
2015-03-24  8:43   ` Sudip Mukherjee
2015-03-24  8:57     ` Dan Carpenter [this message]

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=20150324085750.GQ10964@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=benjamin.romer@unisys.com \
    --cc=david.kershner@unisys.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparmaintainer@unisys.com \
    --cc=sudipm.mukherjee@gmail.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 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.