* [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
[not found] <1288088743-3725-1-git-send-email-julia@diku.dk>
@ 2010-10-26 10:25 ` Julia Lawall
2010-10-27 1:09 ` Henrique de Moraes Holschuh
[not found] ` <1288088743-3725-9-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org>
0 siblings, 2 replies; 7+ messages in thread
From: Julia Lawall @ 2010-10-26 10:25 UTC (permalink / raw)
To: Henrique de Moraes Holschuh
Cc: kernel-janitors, Matthew Garrett, ibm-acpi-devel,
platform-driver-x86, linux-kernel
From: Julia Lawall <julia@diku.dk>
Delete successive assignments to the same location.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression i;
@@
*i = ...;
i = ...;
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/platform/x86/thinkpad_acpi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 2d61186..e8c2199 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -8497,7 +8497,6 @@ static void ibm_exit(struct ibm_struct *ibm)
ibm->acpi->type,
dispatch_acpi_notify);
ibm->flags.acpi_notify_installed = 0;
- ibm->flags.acpi_notify_installed = 0;
}
if (ibm->flags.proc_created) {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
2010-10-26 10:25 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Julia Lawall
@ 2010-10-27 1:09 ` Henrique de Moraes Holschuh
2010-10-27 1:24 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
` (2 more replies)
[not found] ` <1288088743-3725-9-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org>
1 sibling, 3 replies; 7+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-10-27 1:09 UTC (permalink / raw)
To: Julia Lawall
Cc: Henrique de Moraes Holschuh, kernel-janitors, Matthew Garrett,
ibm-acpi-devel, platform-driver-x86, linux-kernel
On Tue, 26 Oct 2010, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Delete successive assignments to the same location.
There are often results of mismerges or other assorted screw ups, often
done by the maintainer itself (e.g. me in thinkpad-acpi's case) during
development.
The patch is correct, and I thank you for the head's up. But let me
track down what caused it first, hmm? I also highly recommend that this
should be done in all cases you find, instead of just blindly fixing the
assignment. I suggest using git --blame to track down what added the
duplicated assignments, and check if it looks sane...
It is often a VERY BAD IDEA to remove such markers of potential
brokennes without checking out if they're actually helpfully trying to
warn you of worse badness :p
But hey, maybe you've already done that. If you did, I apologise for
preaching to the choir.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ibm-acpi-devel] [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
2010-10-27 1:09 ` Henrique de Moraes Holschuh
@ 2010-10-27 1:24 ` Henrique de Moraes Holschuh
2010-10-27 3:54 ` Dan Carpenter
2010-10-27 5:03 ` Julia Lawall
2 siblings, 0 replies; 7+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-10-27 1:24 UTC (permalink / raw)
To: Julia Lawall
Cc: kernel-janitors, linux-kernel, platform-driver-x86,
ibm-acpi-devel, Matthew Garrett
On Tue, 26 Oct 2010, Henrique de Moraes Holschuh wrote:
> On Tue, 26 Oct 2010, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > Delete successive assignments to the same location.
>
> There are often results of mismerges or other assorted screw ups, often
> done by the maintainer itself (e.g. me in thinkpad-acpi's case) during
> development.
Which was the case, and the error was just a duplicate line indeed and not
anything more damaging in one of my commits done a few years ago.
So,
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
2010-10-27 1:09 ` Henrique de Moraes Holschuh
2010-10-27 1:24 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
@ 2010-10-27 3:54 ` Dan Carpenter
2010-10-27 21:42 ` Henrique de Moraes Holschuh
2010-10-27 5:03 ` Julia Lawall
2 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2010-10-27 3:54 UTC (permalink / raw)
To: Henrique de Moraes Holschuh
Cc: Julia Lawall, Henrique de Moraes Holschuh, kernel-janitors,
Matthew Garrett, ibm-acpi-devel, platform-driver-x86,
linux-kernel
On Tue, Oct 26, 2010 at 11:09:08PM -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 26 Oct 2010, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > Delete successive assignments to the same location.
>
> There are often results of mismerges or other assorted screw ups, often
> done by the maintainer itself (e.g. me in thinkpad-acpi's case) during
> development.
>
> The patch is correct, and I thank you for the head's up. But let me
> track down what caused it first, hmm? I also highly recommend that this
> should be done in all cases you find, instead of just blindly fixing the
> assignment.
I've reviewed the entire patchset per your suggestion and Julia
obviously didn't do it blindly. It all looks good. The patcheset fixes
a number of bugs.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
2010-10-27 1:09 ` Henrique de Moraes Holschuh
2010-10-27 1:24 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2010-10-27 3:54 ` Dan Carpenter
@ 2010-10-27 5:03 ` Julia Lawall
2 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2010-10-27 5:03 UTC (permalink / raw)
To: Henrique de Moraes Holschuh
Cc: Henrique de Moraes Holschuh, kernel-janitors, Matthew Garrett,
ibm-acpi-devel, platform-driver-x86, linux-kernel
On Tue, 26 Oct 2010, Henrique de Moraes Holschuh wrote:
> On Tue, 26 Oct 2010, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > Delete successive assignments to the same location.
>
> There are often results of mismerges or other assorted screw ups, often
> done by the maintainer itself (e.g. me in thinkpad-acpi's case) during
> development.
>
> The patch is correct, and I thank you for the head's up. But let me
> track down what caused it first, hmm? I also highly recommend that this
> should be done in all cases you find, instead of just blindly fixing the
> assignment. I suggest using git --blame to track down what added the
> duplicated assignments, and check if it looks sane...
>
> It is often a VERY BAD IDEA to remove such markers of potential
> brokennes without checking out if they're actually helpfully trying to
> warn you of worse badness :p
>
> But hey, maybe you've already done that. If you did, I apologise for
> preaching to the choir.
I didn't look for the original source of the problem, except in the case
of [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c where I found it
already in the pre-git era. Thanks fo rthe suggestion. On the other
hand, I was very selective about which code I changed. In particular I
left a number of cases like:
x = NULL; // or 0 etc
x = foo(...); // ie a NULL returning function
I figured that this isn't hurting anything, and perhaps it is informative
about what kind of value foo might return.
julia
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
2010-10-27 3:54 ` Dan Carpenter
@ 2010-10-27 21:42 ` Henrique de Moraes Holschuh
0 siblings, 0 replies; 7+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-10-27 21:42 UTC (permalink / raw)
To: Dan Carpenter, Julia Lawall, Henrique de Moraes Holschuh,
kernel-janitors, Matthew Garrett
On Wed, 27 Oct 2010, Dan Carpenter wrote:
> On Tue, Oct 26, 2010 at 11:09:08PM -0200, Henrique de Moraes Holschuh wrote:
> > On Tue, 26 Oct 2010, Julia Lawall wrote:
> > > From: Julia Lawall <julia@diku.dk>
> > >
> > > Delete successive assignments to the same location.
> >
> > There are often results of mismerges or other assorted screw ups, often
> > done by the maintainer itself (e.g. me in thinkpad-acpi's case) during
> > development.
> >
> > The patch is correct, and I thank you for the head's up. But let me
> > track down what caused it first, hmm? I also highly recommend that this
> > should be done in all cases you find, instead of just blindly fixing the
> > assignment.
>
> I've reviewed the entire patchset per your suggestion and Julia
> obviously didn't do it blindly. It all looks good. The patcheset fixes
> a number of bugs.
Thank you, Dan and Julia.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment
[not found] ` <1288088743-3725-9-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org>
@ 2010-11-24 16:51 ` Matthew Garrett
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Garrett @ 2010-11-24 16:51 UTC (permalink / raw)
To: Julia Lawall
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA,
Henrique de Moraes Holschuh, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Applied, thanks.
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-11-24 16:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1288088743-3725-1-git-send-email-julia@diku.dk>
2010-10-26 10:25 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Julia Lawall
2010-10-27 1:09 ` Henrique de Moraes Holschuh
2010-10-27 1:24 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2010-10-27 3:54 ` Dan Carpenter
2010-10-27 21:42 ` Henrique de Moraes Holschuh
2010-10-27 5:03 ` Julia Lawall
[not found] ` <1288088743-3725-9-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org>
2010-11-24 16:51 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox