From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Benjamin Romer <benjamin.romer@unisys.com>,
David Kershner <david.kershner@unisys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, sparmaintainer@unisys.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: unisys: handle major number properly
Date: Tue, 24 Mar 2015 14:13:16 +0530 [thread overview]
Message-ID: <20150324084316.GA7113@sudip-PC> (raw)
In-Reply-To: <20150324083247.GP10964@mwanda>
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.
>
> [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?
regards
sudip
>
> There are several other ways you could break it up but do something like
> that.
>
> regards,
> dan carpenter
>
next prev parent reply other threads:[~2015-03-24 8:43 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 [this message]
2015-03-24 8:57 ` Dan Carpenter
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=20150324084316.GA7113@sudip-PC \
--to=sudipm.mukherjee@gmail.com \
--cc=benjamin.romer@unisys.com \
--cc=dan.carpenter@oracle.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 \
/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.