SH: drop const from io port variiable
Subsystems (4)
PATCH 4/5 ixgbe: Fix incorrect declaration of ixgbevf_mbx_ops
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
The header extern type of ixgbevf_mbx_ops disagreed with the actual declaration. Fix this here.
This is rather scary. I haven't tested it. Did this ever work?
--- drivers/net/ixgbevf/ixgbevf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbevf/ixgbevf.h +1 -1
@@ -279,7 +279,7 @@ enum ixgbevf_boards {extern struct ixgbevf_info ixgbevf_82599_vf_info;extern struct ixgbevf_info ixgbevf_X540_vf_info; -extern struct ixgbe_mac_operations ixgbevf_mbx_ops; +extern struct ixgbe_mbx_operations ixgbevf_mbx_ops;/* needed by ethtool.c */ extern char ixgbevf_driver_name[];
Signature · 1 line
1.7.4.4
PATCH 5/5 Avoid section type conflict in dma/ioat/dma_v3.c
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
const __read_mostly is not legal and causes section type conflicts. That's because the read.mostly section is not read only. Simply drop the const for the read mostly fields.
--- drivers/dma/ioat/dma_v3.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/dma/ioat/dma_v3.c +4 -4
@@ -73,10 +73,10 @@/* provide a lookup table for setting the source address in the base or * extended descriptor of an xor or pq descriptor */ -static const u8 xor_idx_to_desc__read_mostly =0xd0 ; -static const u8 xor_idx_to_field[]__read_mostly = {1 ,4 ,5 ,6 ,7 ,0 ,1 ,2 }; -static const u8 pq_idx_to_desc__read_mostly =0xf8 ; -static const u8 pq_idx_to_field[]__read_mostly = {1 ,4 ,5 ,0 ,1 ,2 ,4 ,5 }; +static u8 xor_idx_to_desc__read_mostly =0xd0 ; +static u8 xor_idx_to_field[]__read_mostly = {1 ,4 ,5 ,6 ,7 ,0 ,1 ,2 }; +static u8 pq_idx_to_desc__read_mostly =0xf8 ; +static u8 pq_idx_to_field[]__read_mostly = {1 ,4 ,5 ,0 ,1 ,2 ,4 ,5 };static dma_addr_t xor_get_src (struct ioat_raw_descriptor *descs[2 ],int idx) {
Signature · 1 line
1.7.4.4
PATCH 1/5 SH: drop const from io port variiable
From: Andi Kleen <[email protected]>
The variable is modified elsewhere, so it should not be const. If it was really const it would need to be __read_mostly_const.
--- arch/sh/kernel/ioport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/sh/kernel/ioport.c +1 -1
@@ -11,7 +11,7 @@#include <linux/module.h> #include <linux/io.h> -const unsigned long sh_io_port_base__read_mostly =-1 ; +unsigned long sh_io_port_base__read_mostly =-1 ;EXPORT_SYMBOL (sh_io_port_base);void __iomem *__ioport_map (unsigned long addr,unsigned int size)
Signature · 1 line
1.7.4.4
PATCH 3/5 IRDA: Fix global type conflicts in net/irda/irsysctl.c
From: Andi Kleen <[email protected]>
The externs here didn't agree with the declarations in qos.c.
Better would be probably to move this into a header, but since it's common practice to have naked externs with sysctls I left it for now.
--- net/irda/irsysctl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
net/irda/irsysctl.c +3 -3
@@ -40,9 +40,9 @@ extern int sysctl_slot_timeout;extern int sysctl_fast_poll_increase;extern char sysctl_devname[];extern int sysctl_max_baud_rate; -extern int sysctl_min_tx_turn_time; -extern int sysctl_max_tx_data_size; -extern int sysctl_max_tx_window; +extern unsigned sysctl_min_tx_turn_time; +extern unsigned sysctl_max_tx_data_size; +extern unsigned sysctl_max_tx_window;extern int sysctl_max_noreply_time;extern int sysctl_warn_noreply_time;extern int sysctl_lap_keepalive_time;
Signature · 1 line
1.7.4.4
PATCH 2/5 Fix mismatched variable in rcutree_trace.c
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
rcutree.c defines rcu_cpu_kthread_cpu as int, not unsigned int, so the extern has to follow that.
--- kernel/rcutree_trace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/rcutree_trace.c +1 -1
@@ -47,7 +47,7 @@#include "rcutree.h" DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status); -DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_cpu); +DECLARE_PER_CPU (int, rcu_cpu_kthread_cpu); DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);DECLARE_PER_CPU (char, rcu_cpu_has_work);
Signature · 1 line
1.7.4.4
Re: [PATCH 2/5] Fix mismatched variable in rcutree_trace.c
Quoted 16 lines · Andi Kleen
From: Andi Kleen <[email protected]>
rcutree.cdefinesrcu_cpu_kthread_cpuas int, not unsigned int, so the extern has to follow that.Signed-off-by Andi Kleen <[email protected]>--- kernel/rcutree_trace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/rcutree_trace.c +0
-0
kernel/rcutree_trace.c line 50
Quoted 5 lines
kernel/rcutree_trace.c +1
-1@@ -47,7 +47,7 @@#include "rcutree.h" DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status); -DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_cpu); +DECLARE_PER_CPU (int, rcu_cpu_kthread_cpu);
Can we rather fix the DEFINE to use unsigned int. Signed cpu numbers are pointless in that context, right ?
Quoted 12 lines
kernel/rcutree_trace.c +0
-0DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);DECLARE_PER_CPU (char, rcu_cpu_has_work);Signature · 7 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 4/5] ixgbe: Fix incorrect declaration of ixgbevf_mbx_ops
In reply to Andi KleenQuoted 37 lines
-----Original Message-----
From: Andi Kleen [mailto:[email protected]]
Sent: Tuesday, June 07, 2011 3:27 PM
To: [email protected]
Cc: Andi Kleen; Kirsher, Jeffrey T; Brandeburg, Jesse; Rose, Gregory V
Subject: [PATCH 4/5] ixgbe: Fix incorrect declaration ofixgbevf_mbx_opsFrom: Andi Kleen <[email protected]>
The header extern type of
ixgbevf_mbx_opsdisagreed with the actual declaration. Fix this here.This is rather scary. I haven't tested it. Did this ever work?
Signed-off-by Andi Kleen <[email protected]>--- drivers/net/ixgbevf/ixgbevf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/ixgbevf/ixgbevf.h +1
-2@@ -279,7 +279,7 @@ enum ixgbevf_boards {extern struct ixgbevf_info ixgbevf_82599_vf_info;extern struct ixgbevf_info ixgbevf_X540_vf_info; -extern struct ixgbe_mac_operations ixgbevf_mbx_ops; +extern struct ixgbe_mbx_operations ixgbevf_mbx_ops;/* needed by ethtool.c */ extern char ixgbevf_driver_name[]; --
Quoted 1 line
1.7.4.4
[Greg Rose]
Huh.
Well, mbx ops is a table of 8 pointers and mac ops is a table of 11 pointers, so the copy would have over written 3 * pointer-size words of some other memory. But the 8 ops copied would have been correct so to the extent that we called them they worked.
Now that I look at it you missed a another spot where the copy is done that uses the ixgbe_mac_operations instead of the ixgbe_mbx_operations.
I'll fix that up.
Nice catch!
- Greg
Re: [PATCH 5/5] Avoid section type conflict in dma/ioat/dma_v3.c
In reply to Andi KleenQuoted 7 lines · Andi Kleen
From: Andi Kleen<[email protected]>
const
__read_mostlyis not legal and causes section type conflicts. That's because the read.mostly section is not read only. Simply drop the const for the read mostly fields.
I don't have any other ioatdma stuff pending so I'm happy for this to go in through another tree.
--
Dan
Re: [PATCH 2/5] Fix mismatched variable in rcutree_trace.c
In reply to Thomas GleixnerQuoted 22 lines · Thomas Gleixner
Quoted 18 lines · Andi Kleen
From: Andi Kleen <[email protected]>
rcutree.cdefinesrcu_cpu_kthread_cpuas int, not unsigned int, so the extern has to follow that.Signed-off-by Andi Kleen <[email protected]>--- kernel/rcutree_trace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/rcutree_trace.c +0
-0@@ -47,7 +47,7 @@#include "rcutree.h"
Quoted 6 lines
kernel/rcutree_trace.c line 50
Quoted 3 lines
kernel/rcutree_trace.c +1
-1DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status); -DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_cpu); +DECLARE_PER_CPU (int, rcu_cpu_kthread_cpu);Can we rather fix the DEFINE to use unsigned int. Signed cpu numbers are pointless in that context, right ?
Hmmm... Some arches have signed CPU numbers while others have unsigned CPU numbers. I do use "-1" to mean "no CPU" in some cases (for example, in rcu_node_kthread_setaffinity()), so I guess for consistency I should be using "int" everywhere.
So, any plans for systems with 2,147,483,648 CPUs? ;-)
Thanx, Paul
Quoted 12 lines
Quoted 12 lines
kernel/rcutree_trace.c +0
-0DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);DECLARE_PER_CPU (char, rcu_cpu_has_work);Signature · 7 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/5] Fix mismatched variable in rcutree_trace.c
Quoted 4 lines
Hmmm... Some arches have signed CPU numbers while others have unsigned CPU numbers. I do use "-1" to mean "no CPU" in some cases (for example, in
rcu_node_kthread_setaffinity()), so I guess for consistency I should be using "int" everywhere.
Do I hear that "int" is ok for you? If yes I will not revise the patch and please merge it. If it needs changes please let me know.
-Andi
Re: [PATCH 2/5] Fix mismatched variable in rcutree_trace.c
Quoted 7 lines · Andi Kleen
Quoted 4 lines
Hmmm... Some arches have signed CPU numbers while others have unsigned CPU numbers. I do use "-1" to mean "no CPU" in some cases (for example, in
rcu_node_kthread_setaffinity()), so I guess for consistency I should be using "int" everywhere.Do I hear that "int" is ok for you? If yes I will not revise the patch and please merge it. If it needs changes please let me know.
Yep, "int" is OK. I queued your patch and am testing it now.
Thank you for catching this!
Thanx, Paul
Re: [PATCH 4/5] ixgbe: Fix incorrect declaration of ixgbevf_mbx_ops
In reply to Rose, Gregory VQuoted 44 lines · Gregory V
Quoted 37 lines
-----Original Message-----
From: Andi Kleen [mailto:[email protected]]
Sent: Tuesday, June 07, 2011 3:27 PM
To: [email protected]
Cc: Andi Kleen; Kirsher, Jeffrey T; Brandeburg, Jesse; Rose, Gregory V
Subject: [PATCH 4/5] ixgbe: Fix incorrect declaration ofixgbevf_mbx_opsFrom: Andi Kleen <[email protected]>
The header extern type of
ixgbevf_mbx_opsdisagreed with the actual declaration. Fix this here.This is rather scary. I haven't tested it. Did this ever work?
Signed-off-by Andi Kleen <[email protected]>---
drivers/net/ixgbevf/ixgbevf.h | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/ixgbevf/ixgbevf.h +1
-2@@ -279,7 +279,7 @@ enum ixgbevf_boards { extern struct ixgbevf_info ixgbevf_82599_vf_info; extern struct ixgbevf_info ixgbevf_X540_vf_info; -extern struct ixgbe_mac_operations ixgbevf_mbx_ops; +extern struct ixgbe_mbx_operations ixgbevf_mbx_ops; /* needed by ethtool.c */ extern char ixgbevf_driver_name[]; --Quoted 1 line
1.7.4.4
[Greg Rose]
Huh.Well, mbx ops is a table of 8 pointers and mac ops is a table of 11 pointers, so the copy would have over written 3 * pointer-size words of some other memory. But the 8 ops copied would have been correct so to the extent that we called them they worked.
Quoted 8 lines
Now that I look at it you missed a another spot where the copy is done that uses the
ixgbe_mac_operationsinstead of theixgbe_mbx_operations.I'll fix that up.
Nice catch!
- Greg
--
I have an updated patch by Greg in my queue, which I will be submitting through David Miller's networking tree. Thanks Andi and Greg!
Signature · 2 lines
Cheers, Jeff
David Miller
maintainerRe: [PATCH 3/5] IRDA: Fix global type conflicts in net/irda/irsysctl.c
In reply to Andi KleenNetworking patches need to be submitted to [email protected] otherwise they won't be properly tracked in patchwork and applied.
Thanks.