[KJ] [PATCH-RESUBMIT] net/netfilter/x_tables.c unnecessary casts

3 views
Skip to first unread message

liran tal

unread,
Sep 11, 2007, 9:49:01 AM9/11/07
to kernel-janitors
The patch removes an unnecessary cast in accordance to the rest of
the code. Kernel version is 2.6.22 with latest patches.


--- x_tables.c.orig 2007-09-11 11:21:44.000000000 +0300
+++ x_tables.c 2007-09-11 11:22:11.000000000 +0300
@@ -691,7 +691,7 @@ static struct list_head *type2list(u_int

static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
{
- struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
+ struct proc_dir_entry *pde = seq->private;
u_int16_t af = (unsigned long)pde->data & 0xffff;
u_int16_t type = (unsigned long)pde->data >> 16;
struct list_head *list;


Signed-off-by: Liran Tal <lira...@gmail.com>
_______________________________________________
REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
To resubscribe, send email to majo...@vger.kernel.org with
&quot;subscribe kernel-janitors&quot; in message body and follow instructions.

Kernel-janitors mailing list
Kernel-...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

Randy Dunlap

unread,
Sep 11, 2007, 11:17:01 AM9/11/07
to liran tal, kernel-janitors
On Tue, 11 Sep 2007 16:49:01 +0300 liran tal wrote:

> The patch removes an unnecessary cast in accordance to the rest of
> the code. Kernel version is 2.6.22 with latest patches.
>
>
> --- x_tables.c.orig 2007-09-11 11:21:44.000000000 +0300
> +++ x_tables.c 2007-09-11 11:22:11.000000000 +0300
> @@ -691,7 +691,7 @@ static struct list_head *type2list(u_int
>
> static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
> {
> - struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
> + struct proc_dir_entry *pde = seq->private;
> u_int16_t af = (unsigned long)pde->data & 0xffff;
> u_int16_t type = (unsigned long)pde->data >> 16;
> struct list_head *list;
>
>
> Signed-off-by: Liran Tal <lira...@gmail.com>

Still several patch-process problems here.

a. send patches against the latest mainline kernel tree (probably
doesn't matter in this case)
b. The diff/patch file names should be such that the patch can be
applied by using 'patch -p1' when at the top of the kernel tree.
I.e., something like
--- linux/net/netfilter/x_tables.c.orig ...
+++ linux/net/netfilter/x_tables.c ...
c. Tabs in the file have been replaced by spaces, most likely by
your mail client or by using copy-and-paste.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

liran tal

unread,
Sep 11, 2007, 12:06:46 PM9/11/07
to Randy Dunlap, kernel-janitors
Thanks Randy, I will make the necessary changes.
I am working against latest kernel tree which is 2.6.22 with
patch-2.6.23-rc5 applied.

liran tal

unread,
Sep 11, 2007, 12:53:07 PM9/11/07
to kernel-janitors
The patch removes an unnecessary cast in accordance to the rest of
the code. Kernel version is 2.6.22 with latest patches.

against latest tree, appliable with patch -p1 and no tabs used (could
only be the gmail)


--- linux/net/netfilter/x_tables.c.orig 2007-09-11 11:21:44.000000000 +0300
+++ linux/net/netfilter/x_tables.c 2007-09-11 11:22:11.000000000 +0300


@@ -691,7 +691,7 @@ static struct list_head *type2list(u_int

static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
{
- struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
+ struct proc_dir_entry *pde = seq->private;
u_int16_t af = (unsigned long)pde->data & 0xffff;
u_int16_t type = (unsigned long)pde->data >> 16;
struct list_head *list;

Signed-off-by: Liran Tal <lira...@gmail.com>

Randy Dunlap

unread,
Sep 11, 2007, 3:44:53 PM9/11/07
to liran tal, kernel-janitors
On Tue, 11 Sep 2007 19:53:07 +0300 liran tal wrote:

> The patch removes an unnecessary cast in accordance to the rest of
> the code. Kernel version is 2.6.22 with latest patches.
>
> against latest tree, appliable with patch -p1 and no tabs used (could
> only be the gmail)

The "+" lines has spaces instead of a tab.
Yes, gmail is known to do that if you use the web interface.
Are you using web interface or an email client + SMTP?

>
> --- linux/net/netfilter/x_tables.c.orig 2007-09-11 11:21:44.000000000 +0300
> +++ linux/net/netfilter/x_tables.c 2007-09-11 11:22:11.000000000 +0300
> @@ -691,7 +691,7 @@ static struct list_head *type2list(u_int
>
> static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
> {
> - struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
> + struct proc_dir_entry *pde = seq->private;
> u_int16_t af = (unsigned long)pde->data & 0xffff;
> u_int16_t type = (unsigned long)pde->data >> 16;
> struct list_head *list;
>
> Signed-off-by: Liran Tal <lira...@gmail.com>
> _______________________________________________
> REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
> To resubscribe, send email to majo...@vger.kernel.org with
> &quot;subscribe kernel-janitors&quot; in message body and follow instructions.
>
> Kernel-janitors mailing list
> Kernel-...@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors


Note above: Please begin using the mailing list
kernel-...@vger.kernel.org
instead of kernel-...@lists.osdl.org

Thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

liran tal

unread,
Sep 12, 2007, 2:19:52 AM9/12/07
to Randy Dunlap, kernel-janitors
Hey Randy,

> >
> > against latest tree, appliable with patch -p1 and no tabs used (could
> > only be the gmail)
>
> The "+" lines has spaces instead of a tab.
> Yes, gmail is known to do that if you use the web interface.
> Are you using web interface or an email client + SMTP?

Yeah, I'm using the gmail web interface.
I even disabled the "rich formatting" and enabled "plain text" mode.

Maybe we should try it with "rich formatting" mode and see if that works.
This is a copy&paste with rich formatting mode enabled:

Randy Dunlap

unread,
Sep 12, 2007, 11:25:00 AM9/12/07
to liran tal, kernel-janitors
On Wed, 12 Sep 2007 09:19:52 +0300 liran tal wrote:

> Hey Randy,
>
> > >
> > > against latest tree, appliable with patch -p1 and no tabs used (could
> > > only be the gmail)
> >
> > The "+" lines has spaces instead of a tab.
> > Yes, gmail is known to do that if you use the web interface.
> > Are you using web interface or an email client + SMTP?
>
> Yeah, I'm using the gmail web interface.
> I even disabled the "rich formatting" and enabled "plain text" mode.
>
> Maybe we should try it with "rich formatting" mode and see if that works.
> This is a copy&paste with rich formatting mode enabled:

All of these leading spaces should be tabs.
I'm not aware of anyone getting the gmail web interface to work
for patches, other than by using attachments, which is certainly
not preferred, but may be your only choice, if you are limited
to gmail + web interface.

Also, the Signed-off-by: line should come after the patch description
but before the actual patch.


> --- linux/net/netfilter/x_tables.c.orig 2007-09-11 11:21:44.000000000 +0300
> +++ linux/net/netfilter/x_tables.c 2007-09-11 11:22:11.000000000 +0300
> @@ -691,7 +691,7 @@ static struct list_head *type2list(u_int
>
> static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
> {
> - struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
> + struct proc_dir_entry *pde = seq->private;
> u_int16_t af = (unsigned long)pde->data & 0xffff;
> u_int16_t type = (unsigned long)pde->data >> 16;
> struct list_head *list;
>
>
> Signed-off-by: Liran Tal <lira...@gmail.com>

---

Reply all
Reply to author
Forward
0 new messages