From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Willy Tarreau <willy@meta-x.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: panel: remove duplicate code
Date: Tue, 7 Apr 2015 11:49:30 +0300 [thread overview]
Message-ID: <20150407084930.GD10964@mwanda> (raw)
In-Reply-To: <1428395101-20098-1-git-send-email-sudipm.mukherjee@gmail.com>
On Tue, Apr 07, 2015 at 01:55:01PM +0530, Sudip Mukherjee wrote:
> both the misc_deregister(), parport_release() and
> parport_unregister_device() is there in the module_exit function also.
> detach is called from parport_unregister_driver() and by the time
> detach executes misc_deregister(), parport_release() and
> parport_unregister_device() has already executed marking
> keypad_initialized and lcd.initialized as false. so this part of the
> code will never execute.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
A better subject might have been "remove dead code" but that was
explained pretty well in the patch desription.
I hadn't looked at this driver much before. It sucks that
parport_driver ->attach() functions can't fail... I think we don't
need the "keypad_initialized" and "lcd.initialized" variables because
"if (pprt)" is enough to tell us whether or not the attach function
succeeded.
TODO: Staging: panel: remove some redundent variables.
regards,
dan carpenter
next prev parent reply other threads:[~2015-04-07 8:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 8:25 [PATCH] staging: panel: remove duplicate code Sudip Mukherjee
2015-04-07 8:49 ` Dan Carpenter [this message]
2015-04-07 9:25 ` Sudip Mukherjee
2015-04-07 9:44 ` Greg Kroah-Hartman
2015-04-07 9:56 ` Sudip Mukherjee
2015-04-07 10:12 ` Greg Kroah-Hartman
2015-04-07 14:14 ` Willy Tarreau
2015-04-07 14:21 ` Sudip Mukherjee
2015-04-07 14:33 ` Willy Tarreau
2015-04-07 14:41 ` Sudip Mukherjee
2015-04-07 9:45 ` Dan Carpenter
2015-04-07 10:36 ` Sudip Mukherjee
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=20150407084930.GD10964@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=willy@meta-x.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