From: walter harms <wharms@bfs.de>
To: Julia Lawall <julia@diku.dk>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/14] drivers/net/sb1000.c: delete double assignment
Date: Tue, 26 Oct 2010 11:58:10 +0000 [thread overview]
Message-ID: <4CC6C252.7080905@bfs.de> (raw)
In-Reply-To: <1288088743-3725-6-git-send-email-julia@diku.dk>
Julia Lawall schrieb:
> From: Julia Lawall <julia@diku.dk>
>
> The other code around these duplicated assignments initializes the 0 1 2
> and 3 elements of an array, so change the initialization of the
> rx_session_id array to do the same.
>
> 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>
>
> ---
> This changes the semantics and has not been tested.
>
> drivers/net/sb1000.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
> index a9ae505..66c2f1a 100644
> --- a/drivers/net/sb1000.c
> +++ b/drivers/net/sb1000.c
> @@ -961,9 +961,9 @@ sb1000_open(struct net_device *dev)
> lp->rx_error_count = 0;
> lp->rx_error_dpc_count = 0;
> lp->rx_session_id[0] = 0x50;
> - lp->rx_session_id[0] = 0x48;
> - lp->rx_session_id[0] = 0x44;
> - lp->rx_session_id[0] = 0x42;
> + lp->rx_session_id[1] = 0x48;
> + lp->rx_session_id[2] = 0x44;
> + lp->rx_session_id[3] = 0x42;
> lp->rx_frame_id[0] = 0;
> lp->rx_frame_id[1] = 0;
> lp->rx_frame_id[2] = 0;
>
/me is surprised that this did not cause more problems.
Is it needed at all ?
re,
wh
WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Julia Lawall <julia@diku.dk>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/14] drivers/net/sb1000.c: delete double assignment
Date: Tue, 26 Oct 2010 13:58:10 +0200 [thread overview]
Message-ID: <4CC6C252.7080905@bfs.de> (raw)
In-Reply-To: <1288088743-3725-6-git-send-email-julia@diku.dk>
Julia Lawall schrieb:
> From: Julia Lawall <julia@diku.dk>
>
> The other code around these duplicated assignments initializes the 0 1 2
> and 3 elements of an array, so change the initialization of the
> rx_session_id array to do the same.
>
> 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>
>
> ---
> This changes the semantics and has not been tested.
>
> drivers/net/sb1000.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
> index a9ae505..66c2f1a 100644
> --- a/drivers/net/sb1000.c
> +++ b/drivers/net/sb1000.c
> @@ -961,9 +961,9 @@ sb1000_open(struct net_device *dev)
> lp->rx_error_count = 0;
> lp->rx_error_dpc_count = 0;
> lp->rx_session_id[0] = 0x50;
> - lp->rx_session_id[0] = 0x48;
> - lp->rx_session_id[0] = 0x44;
> - lp->rx_session_id[0] = 0x42;
> + lp->rx_session_id[1] = 0x48;
> + lp->rx_session_id[2] = 0x44;
> + lp->rx_session_id[3] = 0x42;
> lp->rx_frame_id[0] = 0;
> lp->rx_frame_id[1] = 0;
> lp->rx_frame_id[2] = 0;
>
/me is surprised that this did not cause more problems.
Is it needed at all ?
re,
wh
next prev parent reply other threads:[~2010-10-26 11:58 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 10:25 [PATCH 0/14] delete double assignment Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` [PATCH 1/14] drivers/staging: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` [PATCH 2/14] drivers/usb/gadget/amd5536udc.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 13:43 ` Thomas Dahlmann
2010-10-26 13:43 ` Thomas Dahlmann
2010-10-26 10:25 ` [PATCH 3/14] drivers/vhost/vhost.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 11:06 ` Michael S. Tsirkin
2010-10-26 11:06 ` Michael S. Tsirkin
2010-10-26 11:06 ` Michael S. Tsirkin
2010-10-26 10:25 ` [PATCH 4/14] drivers/staging/brcm80211/brcmfmac/dhd_linux.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` [PATCH 5/14] drivers/net/sb1000.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 11:58 ` walter harms [this message]
2010-10-26 11:58 ` walter harms
2010-10-26 12:25 ` Julia Lawall
2010-10-26 12:25 ` Julia Lawall
2010-10-27 19:23 ` David Miller
2010-10-27 19:23 ` David Miller
2010-10-26 10:25 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-11-09 0:48 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete Ralf Baechle
2010-11-09 0:48 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment Ralf Baechle
2010-11-09 7:10 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double Julia Lawall
2010-11-09 7:10 ` [PATCH 6/14] arch/mips/pmc-sierra/yosemite/setup.c: delete double assignment Julia Lawall
2010-10-26 10:25 ` [PATCH 7/14] drivers/net/typhoon.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 11:52 ` David Dillow
2010-10-26 11:52 ` David Dillow
2010-10-27 19:24 ` David Miller
2010-10-27 19:24 ` David Miller
2010-10-26 10:25 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-27 1:09 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete Henrique de Moraes Holschuh
2010-10-27 1:09 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Henrique de Moraes Holschuh
2010-10-27 1:24 ` [ibm-acpi-devel] [PATCH 8/14] Henrique de Moraes Holschuh
2010-10-27 1:24 ` [ibm-acpi-devel] [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Henrique de Moraes Holschuh
2010-10-27 3:54 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete Dan Carpenter
2010-10-27 3:54 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Dan Carpenter
2010-10-27 21:42 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete Henrique de Moraes Holschuh
2010-10-27 21:42 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Henrique de Moraes Holschuh
2010-10-27 21:42 ` Henrique de Moraes Holschuh
2010-10-27 5:03 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double Julia Lawall
2010-10-27 5:03 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Julia Lawall
2010-10-27 7:18 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double walter harms
2010-10-27 7:18 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment walter harms
2010-10-27 8:11 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete Dan Carpenter
2010-10-27 8:11 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Dan Carpenter
2010-11-24 16:51 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete Matthew Garrett
2010-11-24 16:51 ` [PATCH 8/14] drivers/platform/x86/thinkpad_acpi.c: delete double assignment Matthew Garrett
2010-11-24 16:51 ` Matthew Garrett
2010-10-26 10:25 ` [PATCH 9/14] sound/oss/sb_ess.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-27 7:13 ` Takashi Iwai
2010-10-27 7:13 ` Takashi Iwai
2010-10-27 7:13 ` Takashi Iwai
2010-10-26 10:25 ` [PATCH 10/14] drivers/isdn: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 11:55 ` walter harms
2010-10-26 11:55 ` walter harms
2010-10-26 12:01 ` Julia Lawall
2010-10-26 12:01 ` Julia Lawall
2010-10-26 12:20 ` Julia Lawall
2010-10-26 12:20 ` Julia Lawall
2010-10-27 19:24 ` David Miller
2010-10-27 19:24 ` David Miller
2010-10-26 10:25 ` [PATCH 11/14] drivers/serial/vr41xx_siu.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` [PATCH 12/14] drivers/video/omap/blizzard.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 12:36 ` [PATCH 12/14] drivers/video/omap/blizzard.c: delete double Nicolas Kaiser
2010-10-26 12:36 ` [PATCH 12/14] drivers/video/omap/blizzard.c: delete double assignment Nicolas Kaiser
2010-10-26 10:25 ` [PATCH 13/14] drivers/scsi/be2iscsi/be_main.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
2010-10-26 10:25 ` [PATCH 14/14] drivers/ata/pata_octeon_cf.c: " Julia Lawall
2010-10-26 10:25 ` Julia Lawall
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=4CC6C252.7080905@bfs.de \
--to=wharms@bfs.de \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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.