* Re: [PATCH] slob: push the min alignment to long long
From: Pekka Enberg @ 2011-06-16 15:28 UTC (permalink / raw)
To: Matt Mackall; +Cc: David Miller, sebastian, cl, linux-mm, netfilter
In-Reply-To: <1308237823.15617.451.camel@calx>
On Thu, 2011-06-16 at 10:23 -0500, Matt Mackall wrote:
> > I don't agree. I think we should either provide defaults that work for
> > everyone and let architectures override them (which AFAICT Christoph's
> > patch does) or we flat out #error if architectures don't specify
> > alignment requirements.
>
> Uh, isn't the latter precisely what I say above?
>
> > The current solution seems to be the worst one
> > from practical point of view.
>
> Good, because no one's advocating for it.
Sorry, I totally misunderstood what you wrote!
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH] netfilter: fix looped (broad|multi)cast's MAC handling.
From: Patrick McHardy @ 2011-06-16 15:27 UTC (permalink / raw)
To: Nicolas Cavallari; +Cc: fw, netfilter-devel, netdev, Nicolas Cavallari
In-Reply-To: <1307690440-18760-1-git-send-email-cavallar@lri.fr>
On 10.06.2011 09:20, Nicolas Cavallari wrote:
> By default, when broadcast or multicast packet are sent from a local
> application, they are sent to the interface then looped by the kernel
> to other local applications, going throught netfilter hooks in the process.
>
> These looped packet have their MAC header removed from the skb by the kernel
> looping code.
> This confuse various netfilter's netlink queue, netlink log and the
> legacy ip_queue, because they try to extract a hardware
> address from these packets, but extracts a part of the IP header instead.
>
> This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
> if there is none in the packet.
Applied, thanks Nicolas.
^ permalink raw reply
* Re: [PATCH] Introduce ActivePid: in /proc/self/status (v2, was Vpid:)
From: Louis Rilling @ 2011-06-16 15:27 UTC (permalink / raw)
To: Greg Kurz; +Cc: Oleg Nesterov, linux-kernel, ebiederm, containers, akpm, xemul
In-Reply-To: <1308236499.8230.89.camel@bahia.local>
[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]
On 16/06/11 17:01 +0200, Greg Kurz wrote:
> On Thu, 2011-06-16 at 15:25 +0200, Louis Rilling wrote:
> > > Ok. You're right, the RCU grace period is just what I need to ensure
> > I
> > > won't dereference a stale pointer. So I don't even have to bother
> > with
> > > ->siglock and just check pid_alive() before peeking into
> > pid->numbers.
> >
> > It ends like open-coding an optimized version of task_pid_vnr(). If
> > the
> > optimization is really important (I guess this depends on the depth of
> > recursive
> > pid namespaces), it would be better to re-write task_pid_vnr().
> > Otherwise, just
> > use task_pid_vnr() as it is.
> >
> > Thanks,
> >
> > Louis
> >
> Hmm, sorry Louis but I'm looking for the pid number from the task active
> pid_ns (AKA. the return value of getpid() if called by this task), so
> task_pid_vnr() doesn't fit.
Yup, I should have somewhat recalled that _vnr() means "in the caller's pid
namespace". Sorry for the wrong argument.
>
> About the open-coding argument, that's why I used task_pid_nr_ns() and
> task_active_pid_ns() at first...
Sure. I still think that if you end accessing pid->numbers[pid->level].nr, then
you're close to coding some (optimized) task_active_pid_nr() that could also be
used by getpid(), using some task_active_tgid_nr() instead of task_tgid_vnr().
Anyway, optimization is not a relevant point here AFAICS.
Thanks,
Louis
--
Dr Louis Rilling Kerlabs
Skype: louis.rilling Batiment Germanium
Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes
http://www.kerlabs.com/ 35700 Rennes
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH v2 00/11] KVM in-guest performance monitoring
From: Peter Zijlstra @ 2011-06-16 15:27 UTC (permalink / raw)
To: David Ahern
Cc: Avi Kivity, Marcelo Tosatti, kvm, Ingo Molnar,
Arnaldo Carvalho de Melo
In-Reply-To: <4DFA1F18.4090903@cisco.com>
On Thu, 2011-06-16 at 09:19 -0600, David Ahern wrote:
>
> On 06/16/2011 09:08 AM, Peter Zijlstra wrote:
> > On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote:
> >> Command:
> >> perf stat -e instructions openssl speed aes
> >>
> >> Guest:
> >> 135,522,189,056 instructions # 0.00 insns per cycle
> >>
> >>
> >> Host:
> >> 346,082,922,185 instructions # 0.00 insns per cycle
> >
> > How does: perf stat -e instructions:u openssl speed aes, compare?
>
> In the past couple of months I recall you posted a one billion
> instruction benchmark in analyzing perf correctness. I can't seem to
> find that email. Do you recall the benchmark and if so can you resend ?
Sure, I've got a couple of those things lying around:
# perf stat -e instructions:u ./loop_1b_instructions-4x
Performance counter stats for './loop_1b_instructions-4x':
4,000,085,344 instructions:u # 0.00 insns per cycle
0.311861278 seconds time elapsed
---
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
main ()
{
int i;
fork();
fork();
for (i = 0; i < 100000000; i++) {
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
}
wait(NULL);
wait(NULL);
wait(NULL);
wait(NULL);
}
^ permalink raw reply
* Re: [PATCH 2/8] marvell-cam: Separate out the Marvell camera core
From: Jonathan Corbet @ 2011-06-16 15:27 UTC (permalink / raw)
To: Kassey Lee
Cc: linux-media, g.liakhovetski, Kassey Lee, Mauro Carvalho Chehab,
Daniel Drake, ytang5, leiwen, qingx
In-Reply-To: <BANLkTi=gLkmuheH0aCwx=7-DuxDH3q769w@mail.gmail.com>
On Thu, 16 Jun 2011 11:12:03 +0800
Kassey Lee <kassey1216@gmail.com> wrote:
> 2) for mcam_ctlr_stop_dma implementation, I guess you know
> something about the silicon limitation, but we found it can not pass
> our stress test(1000 times capture test, which will switch format
> between JPEG and YUV again and again).
> our solution is :
> stop the ccic controller and wait for about one frame transfer
> time, and the stop the sensor.
> this passed our stress test. for your info.
Actually, I know very little that's not in the datasheet. Are you telling
me that there are hardware limitations that aren't documented, and that
the datasheet is not a 100% accurate description of what's going on? I'm
*shocked* I tell you!
(For the record, with both Cafe and Armada 610, I've found the hardware to
be more reasonable and in accord with the documentation than with many
others.)
In any case, I don't know about the limitation you're talking about here,
could you elaborate a bit? For stress testing I've run video capture for
weeks at a time, so obviously you're talking about something else. Sounds
like something I need to know?
> 3) for videoubuf2, will you use videoubuf2 only or combined
> with soc-camera ? when can your driver for videoubuf2 ready ?
Videobuf2 only. To be honest, I've never quite understood what soc-camera
buys. If there's a reason to do a switch, it could be contemplated - but
remember that Cafe is not an SoC device.
The vb2 driver is working now in vmalloc mode, which is probably what Cafe
will need forever. I do plan to add dma-contig, and, probably, dma-sg
support in the very near future. If you want, I can post the vmalloc
version later today; I just want to make one more pass over it first.
> 4) the point is: ccic and sensor driver should be independent,
> and support two CCIC controller.
No disagreement there. I believe that two controllers should work now -
though there's probably a gotcha somewhere since it's not actually been
tried.
Thanks,
jon
^ permalink raw reply
* [PATCH Bakeathon 2/2] NFSv4.1: do not use deviceids after MDS clientid invalidation
From: andros @ 2011-06-15 21:52 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
In-Reply-To: <1308174760-22825-1-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
Mark all deviceids established under an expired MDS clientid as invalid.
Stop all new i/o through DS and send through the MDS.
Don't use any new LAYOUTGETs that use the invalid deviceid. Purge all layouts
established under the expired MDS clientid.
Remove the MDS clientid deviceid and data servers reference
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 10 ++++++++++
fs/nfs/nfs4filelayout.h | 6 ++++++
fs/nfs/pnfs.c | 3 +++
fs/nfs/pnfs.h | 8 ++++++++
fs/nfs/pnfs_dev.c | 25 +++++++++++++++++++++++++
5 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 8f16112..4f7caab 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -333,6 +333,9 @@ filelayout_read_pagelist(struct nfs_read_data *data)
__func__, data->inode->i_ino,
data->args.pgbase, (size_t)data->args.count, offset);
+ if (test_bit(NFS_DEVICEID_INVALID, &FILELAYOUT_DEVID_NODE(lseg)->flags))
+ return PNFS_NOT_ATTEMPTED;
+
/* Retrieve the correct rpc_client for the byte range */
j = nfs4_fl_calc_j_index(lseg, offset);
idx = nfs4_fl_calc_ds_index(lseg, j);
@@ -372,6 +375,9 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
struct nfs_fh *fh;
int status;
+ if (test_bit(NFS_DEVICEID_INVALID, &FILELAYOUT_DEVID_NODE(lseg)->flags))
+ return PNFS_NOT_ATTEMPTED;
+
/* Retrieve the correct rpc_client for the byte range */
j = nfs4_fl_calc_j_index(lseg, offset);
idx = nfs4_fl_calc_ds_index(lseg, j);
@@ -456,6 +462,10 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo,
goto out;
} else
dsaddr = container_of(d, struct nfs4_file_layout_dsaddr, id_node);
+ /* Found deviceid is being reaped */
+ if (test_bit(NFS_DEVICEID_INVALID, &dsaddr->id_node.flags))
+ goto out_put;
+
fl->dsaddr = dsaddr;
if (fl->first_stripe_index < 0 ||
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h
index 68cce73..f067329 100644
--- a/fs/nfs/nfs4filelayout.h
+++ b/fs/nfs/nfs4filelayout.h
@@ -96,6 +96,12 @@ FILELAYOUT_LSEG(struct pnfs_layout_segment *lseg)
generic_hdr);
}
+static inline struct nfs4_deviceid_node *
+FILELAYOUT_DEVID_NODE(struct pnfs_layout_segment *lseg)
+{
+ return (&(FILELAYOUT_LSEG(lseg)->dsaddr->id_node));
+}
+
extern struct nfs_fh *
nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index b3994e1..a4b5e72 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -452,6 +452,9 @@ pnfs_destroy_all_layouts(struct nfs_client *clp)
struct pnfs_layout_hdr *lo;
LIST_HEAD(tmp_list);
+ nfs4_mark_client_deviceid(clp);
+ nfs4_deviceid_purge_client(clp);
+
spin_lock(&clp->cl_lock);
rcu_read_lock();
list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) {
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index e46edac..a0be016 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -192,12 +192,20 @@ struct pnfs_layout_segment *pnfs_update_layout(struct inode *ino,
enum pnfs_iomode iomode,
gfp_t gfp_flags);
+void nfs4_mark_client_deviceid(struct nfs_client *clp);
+
+/* nfs4_deviceid_flags */
+enum {
+ NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */
+};
+
/* pnfs_dev.c */
struct nfs4_deviceid_node {
struct hlist_node node;
struct hlist_node tmpnode;
const struct pnfs_layoutdriver_type *ld;
const struct nfs_client *nfs_client;
+ unsigned long flags;
struct nfs4_deviceid deviceid;
atomic_t ref;
};
diff --git a/fs/nfs/pnfs_dev.c b/fs/nfs/pnfs_dev.c
index b868cfb..e8f93f9 100644
--- a/fs/nfs/pnfs_dev.c
+++ b/fs/nfs/pnfs_dev.c
@@ -156,6 +156,7 @@ nfs4_init_deviceid_node(struct nfs4_deviceid_node *d,
INIT_HLIST_NODE(&d->tmpnode);
d->ld = ld;
d->nfs_client = nfs_client;
+ d->flags = 0;
d->deviceid = *id;
atomic_set(&d->ref, 1);
}
@@ -253,3 +254,27 @@ nfs4_deviceid_purge_client(const struct nfs_client *clp)
for (h = 0; h < NFS4_DEVICE_ID_HASH_SIZE; h++)
_deviceid_purge_client(clp, h);
}
+
+/*
+ * Stop use of all deviceids associated with an nfs_client
+ */
+void
+nfs4_mark_client_deviceid(struct nfs_client *clp)
+{
+ struct nfs4_deviceid_node *d;
+ struct hlist_node *n;
+ int i;
+
+ spin_lock(&nfs4_deviceid_lock);
+ rcu_read_lock();
+ for (i = 0; i < NFS4_DEVICE_ID_HASH_SIZE; i ++){
+ hlist_for_each_entry_rcu(d, n, &nfs4_deviceid_cache[i], node)
+ if (d->nfs_client == clp)
+ set_bit(NFS_DEVICEID_INVALID, &d->flags);
+ }
+ rcu_read_unlock();
+ spin_unlock(&nfs4_deviceid_lock);
+
+ synchronize_rcu();
+}
+EXPORT_SYMBOL_GPL(nfs4_mark_client_deviceid);
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH v2 3/3] netsnmp: allow not to install MIB files
From: Luca Ceresoli @ 2011-06-16 15:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1308238033-20127-1-git-send-email-luca@lucaceresoli.net>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changes in v2:
- MIB installation is forcibly enabled with the MIB loading code; otherwise
net-snmp would loudly flood the console for missing MIBs.
package/netsnmp/Config.in | 8 ++++++++
package/netsnmp/netsnmp.mk | 4 ++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/package/netsnmp/Config.in b/package/netsnmp/Config.in
index 6f88b03..a6a768c 100644
--- a/package/netsnmp/Config.in
+++ b/package/netsnmp/Config.in
@@ -10,6 +10,14 @@ config BR2_PACKAGE_NETSNMP_ENABLE_MIB_LOADING
bool "Enable MIB loading code"
default y
depends on BR2_PACKAGE_NETSNMP
+ select BR2_PACKAGE_NETSNMP_INSTALL_MIBS
help
Include code that parses and manipulates the mib files.
+config BR2_PACKAGE_NETSNMP_INSTALL_MIBS
+ bool "Install MIB files on target"
+ default y
+ depends on BR2_PACKAGE_NETSNMP
+ help
+ The net-snmp package contains a selection of MIB files.
+ Say yes if you want those MIB files installed on the target.
diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk
index c0e631b..09111bf 100644
--- a/package/netsnmp/netsnmp.mk
+++ b/package/netsnmp/netsnmp.mk
@@ -47,6 +47,10 @@ ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIB_LOADING),y)
NETSNMP_CONF_OPT += --disable-mib-loading
endif
+ifneq ($(BR2_PACKAGE_NETSNMP_INSTALL_MIBS),y)
+ NETSNMP_CONF_OPT += --disable-mibs
+endif
+
# Remove IPv6 MIBs if there's no IPv6
ifneq ($(BR2_INET_IPV6),y)
define NETSNMP_REMOVE_MIBS_IPV6
--
1.7.4.1
^ permalink raw reply related
* [PATCH Bakeathon 1/2] NFSv4.1: allow referral directories to be displayed by readdir
From: andros @ 2011-06-15 21:52 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson, Andy Adamson
From: Andy Adamson <andros@rhel6.dros.org>
Signed-off-by: Andy Adamson <andros@netapp.com>
cc:stable@kernel.org [2.6.39]
---
fs/nfs/nfs4xdr.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 11ad51e..9066f0c 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4221,6 +4221,9 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
nfs_fixup_secinfo_attributes(fattr, fh);
status = 0;
}
+ /* Allow referrals to be displayed.*/
+ if (status == -NFS4ERR_MOVED)
+ status = 0;
if (status < 0)
goto xdr_error;
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH v2 2/3] netsnmp: allow to disable MIB loading code
From: Luca Ceresoli @ 2011-06-16 15:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1308238033-20127-1-git-send-email-luca@lucaceresoli.net>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changes in v2:
- this patch is new in v2.
package/netsnmp/Config.in | 7 +++++++
package/netsnmp/netsnmp.mk | 4 ++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/package/netsnmp/Config.in b/package/netsnmp/Config.in
index 5a3e9aa..6f88b03 100644
--- a/package/netsnmp/Config.in
+++ b/package/netsnmp/Config.in
@@ -6,3 +6,10 @@ config BR2_PACKAGE_NETSNMP
http://net-snmp.sourceforge.net/
+config BR2_PACKAGE_NETSNMP_ENABLE_MIB_LOADING
+ bool "Enable MIB loading code"
+ default y
+ depends on BR2_PACKAGE_NETSNMP
+ help
+ Include code that parses and manipulates the mib files.
+
diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk
index 5704327..c0e631b 100644
--- a/package/netsnmp/netsnmp.mk
+++ b/package/netsnmp/netsnmp.mk
@@ -43,6 +43,10 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y)
NETSNMP_CONF_OPT += --disable-manuals
endif
+ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIB_LOADING),y)
+ NETSNMP_CONF_OPT += --disable-mib-loading
+endif
+
# Remove IPv6 MIBs if there's no IPv6
ifneq ($(BR2_INET_IPV6),y)
define NETSNMP_REMOVE_MIBS_IPV6
--
1.7.4.1
^ permalink raw reply related
* [Buildroot] [PATCH v2 1/3] netsnmp: fix stop and restart actions in init script
From: Luca Ceresoli @ 2011-06-16 15:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1308238033-20127-1-git-send-email-luca@lucaceresoli.net>
/etc/init.d/S59snmpd stop (and restart) currently fail if either snmpd or
snmptrapd are not running.
This is because start-stop-daemon -K returns nonzero if the process to be
killed is not running, and this causes the whole script to fail because it runs
under 'set -e'.
This may not be noticed if only the last start-stop-daemon fails, but this is
in general wrong. It would also cause a failure in other scripts that execute
S59snmpd and check the return value.
Adding the --oknodo (-o) option to start-stop-daemon fixes this.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changes in v2: none.
package/netsnmp/S59snmpd | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/package/netsnmp/S59snmpd b/package/netsnmp/S59snmpd
index f65317a..5df4b85 100755
--- a/package/netsnmp/S59snmpd
+++ b/package/netsnmp/S59snmpd
@@ -29,7 +29,6 @@ TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
[ -r /etc/default/snmpd ] && . /etc/default/snmpd
ssd_oknodo="-o"
-ssd_oknodo=""
# Cd to / before starting any daemons.
cd /
--
1.7.4.1
^ permalink raw reply related
* [Buildroot] [PATCH v2 0/3] netsnmp improvements
From: Luca Ceresoli @ 2011-06-16 15:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1308152878-14593-1-git-send-email-luca@lucaceresoli.net>
Hi,
please ignore the two patches I sent yesterday for netsnmp. Patch 2 introduced
an annoying series of warnings, as net-snmp requires the MIB files to be
installed if the MIB loading code is enabled.
The present patch series addresses this issue correctly, allowing in addition
to disable the MIB loading code.
Patch 1 is unchanged.
Luca
Luca Ceresoli (3):
netsnmp: fix stop and restart actions in init script
netsnmp: allow to disable MIB loading code
netsnmp: allow not to install MIB files
package/netsnmp/Config.in | 15 +++++++++++++++
package/netsnmp/S59snmpd | 1 -
package/netsnmp/netsnmp.mk | 8 ++++++++
3 files changed, 23 insertions(+), 1 deletions(-)
--
1.7.4.1
^ permalink raw reply
* Re: [PATCH] oprofile, x86: Fix race in nmi handler while starting
From: Robert Richter @ 2011-06-16 15:25 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, LKML, oprofile-list, Suthikulpanit, Suravee
In-Reply-To: <20110609071854.GE20544@elte.hu>
On 09.06.11 03:18:54, Ingo Molnar wrote:
>
> * Robert Richter <robert.richter@amd.com> wrote:
>
> > In some rare cases, nmis are generated immediately after the nmi
> > handler of the cpu was started. This causes the counter not to be
> > enabled. Before enabling the nmi handlers we need to set variable
> > ctr_running first and make sure its value is written to memory.
> >
> > Also, the patch makes all existing barriers a memory barrier
> > instead of a compiler barrier only.
>
> Could we *PLEASE* just do the obvious and turn oprofile into a perf
> user on x86 too, like ARM already does? Two years down the line and
> there's zero progress in that area. We want to obsolete the Oprofile
> PMU bits on x86, the infrastructure duplication causes non-trivial
> problems like this one.
Ingo,
I would rather prefer to spend the effort to add full pmu support to
perf. AMD features missing are still IBS and nb performance counters
for family 15h. The oprofile kernel driver would become obsolete at
all with a new daemon using the perf syscall interface. So why
spending more time with porting this legacy driver to perf in the
kernel? It will be also hard to implement identical behaviour which
may raise concerns about backward compatibility of the kernel driver.
I admit, we have had a lot of bug fixes for oprofile in the past, but
most of them are part of maintaining existing code which we have to do
for distros anyway. There is almost no or only limited feature
development for oprofile now.
Hope this makes sense.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
^ permalink raw reply
* Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal
From: Alexandre Raymond @ 2011-06-16 15:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Paolo Bonzini, Anthony Liguori, qemu-devel, kvm, Sasha Levin
In-Reply-To: <4DF9CD7E.5020509@siemens.com>
Hi Jan,
On Thu, Jun 16, 2011 at 5:31 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Ingo Molnar pointed out that sending the timer signal to the whole
> process, just blocking it everywhere, is suboptimal with an increasing
> number of threads. QEMU is using this pattern so far.
I am not familiar with this code, but don't you already need to block
SIGALRM properly in all threads for OSes != Linux ? If so, isn't this
patch redundant?
Alexandre
^ permalink raw reply
* Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal
From: Alexandre Raymond @ 2011-06-16 15:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-devel, Anthony Liguori, Paolo Bonzini, Sasha Levin, kvm
In-Reply-To: <4DF9CD7E.5020509@siemens.com>
Hi Jan,
On Thu, Jun 16, 2011 at 5:31 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Ingo Molnar pointed out that sending the timer signal to the whole
> process, just blocking it everywhere, is suboptimal with an increasing
> number of threads. QEMU is using this pattern so far.
I am not familiar with this code, but don't you already need to block
SIGALRM properly in all threads for OSes != Linux ? If so, isn't this
patch redundant?
Alexandre
^ permalink raw reply
* Re: Dynamic patching in discarded sections
From: Arnd Bergmann @ 2011-06-16 15:25 UTC (permalink / raw)
To: linux-arm-kernel
Cc: dave.martin, Russell King - ARM Linux, lkml, Nicolas Pitre
In-Reply-To: <201106161721.27330.arnd@arndb.de>
On Thursday 16 June 2011, Arnd Bergmann wrote:
> 10000 randconfig kernel build later without that patch, I'm rather sure
> that there is only a single driver that is suffering from this. While your
> patch absolutely makes sense, a less invasive workaround would be to just
> not mark mmc_spi_remove as __devexit until Dave's patch gets in.
Scratch that. Even when Dave's patch gets into binutils, we'd still need to
make a compile time decision to figure out if the linker is new enough, so
we definitely need Nicolas' patch as well.
Arnd
^ permalink raw reply
* Dynamic patching in discarded sections
From: Arnd Bergmann @ 2011-06-16 15:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201106161721.27330.arnd@arndb.de>
On Thursday 16 June 2011, Arnd Bergmann wrote:
> 10000 randconfig kernel build later without that patch, I'm rather sure
> that there is only a single driver that is suffering from this. While your
> patch absolutely makes sense, a less invasive workaround would be to just
> not mark mmc_spi_remove as __devexit until Dave's patch gets in.
Scratch that. Even when Dave's patch gets into binutils, we'd still need to
make a compile time decision to figure out if the linker is new enough, so
we definitely need Nicolas' patch as well.
Arnd
^ permalink raw reply
* Re: [PATCH net-next 2/2] drivers/net: Remove casts of void *
From: Jon Mason @ 2011-06-16 15:23 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Arnaldo Carvalho de Melo, Jay Cliburn, Chris Snook,
Jie Yang, Sathya Perla, Subbu Seetharaman, Ajit Khaparde,
Rasesh Mody, Debashis Dutt, Sjur Braendeland, Divy Le Ray,
Breno Leitao, Amit Kumar Salecha, Ron Mercer, linux-driver,
Anirban Chakraborty, Solarflare linux maintainers, Steve Hodgson,
Ben Hutchings, Daniele Venzano, David Dillow, linux-kernel
In-Reply-To: <486a21b708a9dce0c1c0059a21a2f9b66dac9e3c.1308024069.git.joe@perches.com>
On Mon, Jun 13, 2011 at 11:02 PM, Joe Perches <joe@perches.com> wrote:
> Unnecessary casts of void * clutter the code.
>
> These are the remainder casts after several specific
> patches to remove netdev_priv and dev_priv.
>
> Done via coccinelle script:
>
> $ cat cast_void_pointer.cocci
> @@
> type T;
> T *pt;
> void *pv;
> @@
>
> - pt = (T *)pv;
> + pt = pv;
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/a2065.c | 2 +-
> drivers/net/appletalk/ltpc.c | 8 +++---
> drivers/net/atl1e/atl1e_main.c | 5 +--
> drivers/net/atlx/atl2.c | 3 +-
> drivers/net/benet/be_cmds.c | 3 +-
> drivers/net/benet/be_ethtool.c | 4 +-
> drivers/net/bna/bfa_cee.c | 2 +-
> drivers/net/bna/cna.h | 2 +-
> drivers/net/caif/caif_shmcore.c | 2 +-
> drivers/net/cnic.c | 4 +-
> drivers/net/cxgb3/cxgb3_offload.c | 2 +-
> drivers/net/davinci_cpdma.c | 2 +-
> drivers/net/declance.c | 38 +++++++++++++++++------------
> drivers/net/depca.c | 4 +-
> drivers/net/dl2k.c | 4 +-
> drivers/net/ehea/ehea_qmr.c | 2 +-
> drivers/net/epic100.c | 4 +-
> drivers/net/fealnx.c | 4 +-
> drivers/net/gianfar.c | 4 +-
> drivers/net/hamachi.c | 4 +-
> drivers/net/macmace.c | 2 +-
> drivers/net/mlx4/en_rx.c | 2 +-
> drivers/net/mlx4/en_tx.c | 5 +--
> drivers/net/myri_sbus.c | 3 +-
> drivers/net/netxen/netxen_nic_ctx.c | 16 ++++++------
> drivers/net/pxa168_eth.c | 2 +-
> drivers/net/qla3xxx.c | 5 +--
> drivers/net/qlcnic/qlcnic_ctx.c | 26 ++++++++++----------
> drivers/net/qlcnic/qlcnic_ethtool.c | 2 +-
> drivers/net/qlcnic/qlcnic_hw.c | 3 +-
> drivers/net/qlcnic/qlcnic_main.c | 2 +-
> drivers/net/qlge/qlge_main.c | 4 +-
> drivers/net/s2io.c | 18 +++++--------
> drivers/net/sfc/siena.c | 2 +-
> drivers/net/sis900.c | 4 +-
> drivers/net/tokenring/madgemc.c | 2 +-
> drivers/net/typhoon.c | 2 +-
> drivers/net/vxge/vxge-config.c | 44 ++++++++++++-----------------------
> drivers/net/vxge/vxge-traffic.c | 6 ++--
> drivers/net/wan/pc300_tty.c | 2 +-
> drivers/net/xilinx_emaclite.c | 4 +-
> drivers/net/yellowfin.c | 6 ++--
> 42 files changed, 123 insertions(+), 142 deletions(-)
>
> diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
> index deaa8bc..0230fc2 100644
> --- a/drivers/net/a2065.c
> +++ b/drivers/net/a2065.c
> @@ -426,7 +426,7 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
> volatile struct lance_regs *ll;
> int csr0;
>
> - dev = (struct net_device *) dev_id;
> + dev = dev_id;
>
> lp = netdev_priv(dev);
> ll = lp->ll;
> diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
> index e69eead..34ffb54 100644
> --- a/drivers/net/appletalk/ltpc.c
> +++ b/drivers/net/appletalk/ltpc.c
> @@ -652,9 +652,9 @@ static int do_write(struct net_device *dev, void *cbuf, int cbuflen,
> int ret;
>
> if(i) {
> - qels[i].cbuf = (unsigned char *) cbuf;
> + qels[i].cbuf = cbuf;
> qels[i].cbuflen = cbuflen;
> - qels[i].dbuf = (unsigned char *) dbuf;
> + qels[i].dbuf = dbuf;
> qels[i].dbuflen = dbuflen;
> qels[i].QWrite = 1;
> qels[i].mailbox = i; /* this should be initted rather */
> @@ -676,9 +676,9 @@ static int do_read(struct net_device *dev, void *cbuf, int cbuflen,
> int ret;
>
> if(i) {
> - qels[i].cbuf = (unsigned char *) cbuf;
> + qels[i].cbuf = cbuf;
> qels[i].cbuflen = cbuflen;
> - qels[i].dbuf = (unsigned char *) dbuf;
> + qels[i].dbuf = dbuf;
> qels[i].dbuflen = dbuflen;
> qels[i].QWrite = 0;
> qels[i].mailbox = i; /* this should be initted rather */
> diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
> index 86a9122..c3c5db1 100644
> --- a/drivers/net/atl1e/atl1e_main.c
> +++ b/drivers/net/atl1e/atl1e_main.c
> @@ -800,8 +800,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
> /* Init TPD Ring */
> tx_ring->dma = roundup(adapter->ring_dma, 8);
> offset = tx_ring->dma - adapter->ring_dma;
> - tx_ring->desc = (struct atl1e_tpd_desc *)
> - (adapter->ring_vir_addr + offset);
> + tx_ring->desc = adapter->ring_vir_addr + offset;
> size = sizeof(struct atl1e_tx_buffer) * (tx_ring->count);
> tx_ring->tx_buffer = kzalloc(size, GFP_KERNEL);
> if (tx_ring->tx_buffer == NULL) {
> @@ -827,7 +826,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
>
> /* Init CMB dma address */
> tx_ring->cmb_dma = adapter->ring_dma + offset;
> - tx_ring->cmb = (u32 *)(adapter->ring_vir_addr + offset);
> + tx_ring->cmb = adapter->ring_vir_addr + offset;
> offset += sizeof(u32);
>
> for (i = 0; i < adapter->num_rx_queues; i++) {
> diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
> index 16249e9..24e1592 100644
> --- a/drivers/net/atlx/atl2.c
> +++ b/drivers/net/atlx/atl2.c
> @@ -311,8 +311,7 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
> adapter->txd_dma = adapter->ring_dma ;
> offset = (adapter->txd_dma & 0x7) ? (8 - (adapter->txd_dma & 0x7)) : 0;
> adapter->txd_dma += offset;
> - adapter->txd_ring = (struct tx_pkt_header *) (adapter->ring_vir_addr +
> - offset);
> + adapter->txd_ring = adapter->ring_vir_addr + offset;
>
> /* Init TXS Ring */
> adapter->txs_dma = adapter->txd_dma + adapter->txd_ring_size;
> diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
> index 0c12c2d..30719f5 100644
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -2334,8 +2334,7 @@ int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
>
> status = be_mbox_notify_wait(adapter);
> if (!status) {
> - attribs = (struct mgmt_controller_attrib *)( attribs_cmd.va +
> - sizeof(struct be_cmd_resp_hdr));
> + attribs = attribs_cmd.va + sizeof(struct be_cmd_resp_hdr);
> adapter->hba_port_num = attribs->hba_attribs.phy_port;
> }
>
> diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
> index facfe3c..5572c78 100644
> --- a/drivers/net/benet/be_ethtool.c
> +++ b/drivers/net/benet/be_ethtool.c
> @@ -386,7 +386,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
> }
> status = be_cmd_get_phy_info(adapter, &phy_cmd);
> if (!status) {
> - resp = (struct be_cmd_resp_get_phy_info *) phy_cmd.va;
> + resp = phy_cmd.va;
> intf_type = le16_to_cpu(resp->interface_type);
>
> switch (intf_type) {
> @@ -690,7 +690,7 @@ be_read_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
> status = be_cmd_get_seeprom_data(adapter, &eeprom_cmd);
>
> if (!status) {
> - resp = (struct be_cmd_resp_seeprom_read *) eeprom_cmd.va;
> + resp = eeprom_cmd.va;
> memcpy(data, resp->seeprom_data + eeprom->offset, eeprom->len);
> }
> dma_free_coherent(&adapter->pdev->dev, eeprom_cmd.size, eeprom_cmd.va,
> diff --git a/drivers/net/bna/bfa_cee.c b/drivers/net/bna/bfa_cee.c
> index f7b789a..dcfbf08 100644
> --- a/drivers/net/bna/bfa_cee.c
> +++ b/drivers/net/bna/bfa_cee.c
> @@ -236,7 +236,7 @@ static void
> bfa_cee_hbfail(void *arg)
> {
> struct bfa_cee *cee;
> - cee = (struct bfa_cee *) arg;
> + cee = arg;
>
> if (cee->get_attr_pending == true) {
> cee->get_attr_status = BFA_STATUS_FAILED;
> diff --git a/drivers/net/bna/cna.h b/drivers/net/bna/cna.h
> index bbd39dc..3c47dc5 100644
> --- a/drivers/net/bna/cna.h
> +++ b/drivers/net/bna/cna.h
> @@ -74,7 +74,7 @@ typedef struct mac { u8 mac[MAC_ADDRLEN]; } mac_t;
> bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe)); \
> bfa_q_qe_init(*((struct list_head **) _qe)); \
> } else { \
> - *((struct list_head **) (_qe)) = (struct list_head *) NULL; \
> + *((struct list_head **)(_qe)) = NULL; \
> } \
> }
>
> diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
> index 731aa11..d4b26fb 100644
> --- a/drivers/net/caif/caif_shmcore.c
> +++ b/drivers/net/caif/caif_shmcore.c
> @@ -134,7 +134,7 @@ int caif_shmdrv_rx_cb(u32 mbx_msg, void *priv)
> u32 avail_emptybuff = 0;
> unsigned long flags = 0;
>
> - pshm_drv = (struct shmdrv_layer *)priv;
> + pshm_drv = priv;
>
> /* Check for received buffers. */
> if (mbx_msg & SHM_FULL_MASK) {
> diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
> index 363c7f3..8548cbe 100644
> --- a/drivers/net/cnic.c
> +++ b/drivers/net/cnic.c
> @@ -4290,7 +4290,7 @@ static void cnic_init_bnx2_tx_ring(struct cnic_dev *dev)
> val = BNX2_L2CTX_CMD_TYPE_TYPE_L2 | (8 << 16);
> cnic_ctx_wr(dev, cid_addr, offset1, val);
>
> - txbd = (struct tx_bd *) udev->l2_ring;
> + txbd = udev->l2_ring;
>
> buf_map = udev->l2_buf_map;
> for (i = 0; i < MAX_TX_DESC_CNT; i++, txbd++) {
> @@ -4349,7 +4349,7 @@ static void cnic_init_bnx2_rx_ring(struct cnic_dev *dev)
> val = BNX2_L2CTX_L2_STATUSB_NUM(sb_id);
> cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_HOST_BDIDX, val);
>
> - rxbd = (struct rx_bd *) (udev->l2_ring + BCM_PAGE_SIZE);
> + rxbd = udev->l2_ring + BCM_PAGE_SIZE;
> for (i = 0; i < MAX_RX_DESC_CNT; i++, rxbd++) {
> dma_addr_t buf_map;
> int n = (i % cp->l2_rx_ring_size) + 1;
> diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c
> index 862804f..9db9068 100644
> --- a/drivers/net/cxgb3/cxgb3_offload.c
> +++ b/drivers/net/cxgb3/cxgb3_offload.c
> @@ -567,7 +567,7 @@ static void t3_process_tid_release_list(struct work_struct *work)
> while (td->tid_release_list) {
> struct t3c_tid_entry *p = td->tid_release_list;
>
> - td->tid_release_list = (struct t3c_tid_entry *)p->ctx;
> + td->tid_release_list = p->ctx;
> spin_unlock_bh(&td->tid_release_lock);
>
> skb = alloc_skb(sizeof(struct cpl_tid_release),
> diff --git a/drivers/net/davinci_cpdma.c b/drivers/net/davinci_cpdma.c
> index ae47f23..dca9d33 100644
> --- a/drivers/net/davinci_cpdma.c
> +++ b/drivers/net/davinci_cpdma.c
> @@ -167,7 +167,7 @@ cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr,
> } else {
> pool->cpumap = dma_alloc_coherent(dev, size, &pool->phys,
> GFP_KERNEL);
> - pool->iomap = (void __force __iomem *)pool->cpumap;
> + pool->iomap = pool->cpumap;
> pool->hw_addr = pool->phys;
> }
>
> diff --git a/drivers/net/declance.c b/drivers/net/declance.c
> index 219eb5a..cabd3a5 100644
> --- a/drivers/net/declance.c
> +++ b/drivers/net/declance.c
> @@ -326,15 +326,18 @@ static void load_csrs(struct lance_private *lp)
> */
> static void cp_to_buf(const int type, void *to, const void *from, int len)
> {
> - unsigned short *tp, *fp, clen;
> - unsigned char *rtp, *rfp;
> + unsigned short *tp;
> + const unsigned short *fp;
> + unsigned short clen;
> + unsigned char *rtp;
> + const unsigned char *rfp;
>
> if (type == PMAD_LANCE) {
> memcpy(to, from, len);
> } else if (type == PMAX_LANCE) {
> clen = len >> 1;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
>
> while (clen--) {
> *tp++ = *fp++;
> @@ -342,8 +345,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
> }
>
> clen = len & 1;
> - rtp = (unsigned char *) tp;
> - rfp = (unsigned char *) fp;
> + rtp = tp;
> + rfp = fp;
> while (clen--) {
> *rtp++ = *rfp++;
> }
> @@ -352,8 +355,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
> * copy 16 Byte chunks
> */
> clen = len >> 4;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> *tp++ = *fp++;
> @@ -382,15 +385,18 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
>
> static void cp_from_buf(const int type, void *to, const void *from, int len)
> {
> - unsigned short *tp, *fp, clen;
> - unsigned char *rtp, *rfp;
> + unsigned short *tp;
> + const unsigned short *fp;
> + unsigned short clen;
> + unsigned char *rtp;
> + const unsigned char *rfp;
>
> if (type == PMAD_LANCE) {
> memcpy(to, from, len);
> } else if (type == PMAX_LANCE) {
> clen = len >> 1;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> fp++;
> @@ -398,8 +404,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
>
> clen = len & 1;
>
> - rtp = (unsigned char *) tp;
> - rfp = (unsigned char *) fp;
> + rtp = tp;
> + rfp = fp;
>
> while (clen--) {
> *rtp++ = *rfp++;
> @@ -410,8 +416,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
> * copy 16 Byte chunks
> */
> clen = len >> 4;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> *tp++ = *fp++;
> diff --git a/drivers/net/depca.c b/drivers/net/depca.c
> index 8b0084d..d54a0e9 100644
> --- a/drivers/net/depca.c
> +++ b/drivers/net/depca.c
> @@ -708,11 +708,11 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
>
> /* Tx & Rx descriptors (aligned to a quadword boundary) */
> offset = (offset + DEPCA_ALIGN) & ~DEPCA_ALIGN;
> - lp->rx_ring = (struct depca_rx_desc __iomem *) (lp->sh_mem + offset);
> + lp->rx_ring = lp->sh_mem + offset;
> lp->rx_ring_offset = offset;
>
> offset += (sizeof(struct depca_rx_desc) * NUM_RX_DESC);
> - lp->tx_ring = (struct depca_tx_desc __iomem *) (lp->sh_mem + offset);
> + lp->tx_ring = lp->sh_mem + offset;
> lp->tx_ring_offset = offset;
>
> offset += (sizeof(struct depca_tx_desc) * NUM_TX_DESC);
> diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
> index c445457..05e64b2 100644
> --- a/drivers/net/dl2k.c
> +++ b/drivers/net/dl2k.c
> @@ -221,13 +221,13 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
> ring_space = pci_alloc_consistent (pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_iounmap;
> - np->tx_ring = (struct netdev_desc *) ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent (pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - np->rx_ring = (struct netdev_desc *) ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> /* Parse eeprom data */
> diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
> index cd44bb8..95b9f4f 100644
> --- a/drivers/net/ehea/ehea_qmr.c
> +++ b/drivers/net/ehea/ehea_qmr.c
> @@ -331,7 +331,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)
> unsigned long flags;
>
> spin_lock_irqsave(&eq->spinlock, flags);
> - eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid(&eq->hw_queue);
> + eqe = hw_eqit_eq_get_inc_valid(&eq->hw_queue);
> spin_unlock_irqrestore(&eq->spinlock, flags);
>
> return eqe;
> diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
> index c353bf3..814c187 100644
> --- a/drivers/net/epic100.c
> +++ b/drivers/net/epic100.c
> @@ -391,13 +391,13 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_iounmap;
> - ep->tx_ring = (struct epic_tx_desc *)ring_space;
> + ep->tx_ring = ring_space;
> ep->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - ep->rx_ring = (struct epic_rx_desc *)ring_space;
> + ep->rx_ring = ring_space;
> ep->rx_ring_dma = ring_dma;
>
> if (dev->mem_start) {
> diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
> index dd54abe..fa8677c 100644
> --- a/drivers/net/fealnx.c
> +++ b/drivers/net/fealnx.c
> @@ -566,7 +566,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
> err = -ENOMEM;
> goto err_out_free_dev;
> }
> - np->rx_ring = (struct fealnx_desc *)ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> @@ -574,7 +574,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
> err = -ENOMEM;
> goto err_out_free_rx;
> }
> - np->tx_ring = (struct fealnx_desc *)ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> /* find the connected MII xcvrs */
> diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
> index ff60b23..3564551 100644
> --- a/drivers/net/gianfar.c
> +++ b/drivers/net/gianfar.c
> @@ -266,7 +266,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
>
> for (i = 0; i < priv->num_tx_queues; i++) {
> tx_queue = priv->tx_queue[i];
> - tx_queue->tx_bd_base = (struct txbd8 *) vaddr;
> + tx_queue->tx_bd_base = vaddr;
> tx_queue->tx_bd_dma_base = addr;
> tx_queue->dev = ndev;
> /* enet DMA only understands physical addresses */
> @@ -277,7 +277,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
> /* Start the rx descriptor ring where the tx ring leaves off */
> for (i = 0; i < priv->num_rx_queues; i++) {
> rx_queue = priv->rx_queue[i];
> - rx_queue->rx_bd_base = (struct rxbd8 *) vaddr;
> + rx_queue->rx_bd_base = vaddr;
> rx_queue->rx_bd_dma_base = addr;
> rx_queue->dev = ndev;
> addr += sizeof (struct rxbd8) * rx_queue->rx_ring_size;
> diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
> index a09041a..c274b3d 100644
> --- a/drivers/net/hamachi.c
> +++ b/drivers/net/hamachi.c
> @@ -648,13 +648,13 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_cleardev;
> - hmp->tx_ring = (struct hamachi_desc *)ring_space;
> + hmp->tx_ring = ring_space;
> hmp->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - hmp->rx_ring = (struct hamachi_desc *)ring_space;
> + hmp->rx_ring = ring_space;
> hmp->rx_ring_dma = ring_dma;
>
> /* Check for options being passed in */
> diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
> index c685a46..4286e67 100644
> --- a/drivers/net/macmace.c
> +++ b/drivers/net/macmace.c
> @@ -221,7 +221,7 @@ static int __devinit mace_probe(struct platform_device *pdev)
> SET_NETDEV_DEV(dev, &pdev->dev);
>
> dev->base_addr = (u32)MACE_BASE;
> - mp->mace = (volatile struct mace *) MACE_BASE;
> + mp->mace = MACE_BASE;
>
> dev->irq = IRQ_MAC_MACE;
> mp->dma_intr = IRQ_MAC_MACE_DMA;
> diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
> index 277215f..5197b50 100644
> --- a/drivers/net/mlx4/en_rx.c
> +++ b/drivers/net/mlx4/en_rx.c
> @@ -859,7 +859,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv)
> priv->rx_ring[0].cqn, &context);
>
> ptr = ((void *) &context) + 0x3c;
> - rss_context = (struct mlx4_en_rss_context *) ptr;
> + rss_context = ptr;
> rss_context->base_qpn = cpu_to_be32(ilog2(priv->rx_ring_num) << 24 |
> (rss_map->base_qpn));
> rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn);
> diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
> index b229acf..6e03de0 100644
> --- a/drivers/net/mlx4/en_tx.c
> +++ b/drivers/net/mlx4/en_tx.c
> @@ -238,8 +238,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
> } else {
> if (!tx_info->inl) {
> if ((void *) data >= end) {
> - data = (struct mlx4_wqe_data_seg *)
> - (ring->buf + ((void *) data - end));
> + data = ring->buf + ((void *)data - end);
> }
>
> if (tx_info->linear) {
> @@ -253,7 +252,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
> for (i = 0; i < frags; i++) {
> /* Check for wraparound before unmapping */
> if ((void *) data >= end)
> - data = (struct mlx4_wqe_data_seg *) ring->buf;
> + data = ring->buf;
> frag = &skb_shinfo(skb)->frags[i];
> pci_unmap_page(mdev->pdev,
> (dma_addr_t) be64_to_cpu(data->addr),
> diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
> index 53aeea4..0f4cb88 100644
> --- a/drivers/net/myri_sbus.c
> +++ b/drivers/net/myri_sbus.c
> @@ -1041,8 +1041,7 @@ static int __devinit myri_sbus_probe(struct platform_device *op)
>
> DET(("Shared memory base is %04x, ", mp->shmem_base));
>
> - mp->shmem = (struct myri_shmem __iomem *)
> - (mp->lanai + (mp->shmem_base * 2));
> + mp->shmem = mp->lanai + (mp->shmem_base * 2);
> DET(("shmem mapped at %p\n", mp->shmem));
>
> mp->rqack = &mp->shmem->channel.recvqa;
> diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
> index f16966a..a925392 100644
> --- a/drivers/net/netxen/netxen_nic_ctx.c
> +++ b/drivers/net/netxen/netxen_nic_ctx.c
> @@ -163,7 +163,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter)
> rq_size, &hostrq_phys_addr);
> if (addr == NULL)
> return -ENOMEM;
> - prq = (nx_hostrq_rx_ctx_t *)addr;
> + prq = addr;
>
> addr = pci_alloc_consistent(adapter->pdev,
> rsp_size, &cardrsp_phys_addr);
> @@ -171,7 +171,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto out_free_rq;
> }
> - prsp = (nx_cardrsp_rx_ctx_t *)addr;
> + prsp = addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr);
>
> @@ -318,10 +318,10 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter)
> }
>
> memset(rq_addr, 0, rq_size);
> - prq = (nx_hostrq_tx_ctx_t *)rq_addr;
> + prq = rq_addr;
>
> memset(rsp_addr, 0, rsp_size);
> - prsp = (nx_cardrsp_tx_ctx_t *)rsp_addr;
> + prsp = rsp_addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
>
> @@ -629,7 +629,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> }
>
> memset(addr, 0, sizeof(struct netxen_ring_ctx));
> - recv_ctx->hwctx = (struct netxen_ring_ctx *)addr;
> + recv_ctx->hwctx = addr;
> recv_ctx->hwctx->ctx_id = cpu_to_le32(port);
> recv_ctx->hwctx->cmd_consumer_offset =
> cpu_to_le64(recv_ctx->phys_addr +
> @@ -648,7 +648,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> goto err_out_free;
> }
>
> - tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
> + tx_ring->desc_head = addr;
>
> for (ring = 0; ring < adapter->max_rds_rings; ring++) {
> rds_ring = &recv_ctx->rds_rings[ring];
> @@ -662,7 +662,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - rds_ring->desc_head = (struct rcv_desc *)addr;
> + rds_ring->desc_head = addr;
>
> if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
> rds_ring->crb_rcv_producer =
> @@ -683,7 +683,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - sds_ring->desc_head = (struct status_desc *)addr;
> + sds_ring->desc_head = addr;
>
> if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
> sds_ring->crb_sts_consumer =
> diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
> index 89f7540..abd1693 100644
> --- a/drivers/net/pxa168_eth.c
> +++ b/drivers/net/pxa168_eth.c
> @@ -502,7 +502,7 @@ static int add_del_hash_entry(struct pxa168_eth_private *pep,
> * Pick the appropriate table, start scanning for free/reusable
> * entries at the index obtained by hashing the specified MAC address
> */
> - start = (struct addr_table_entry *)(pep->htpr);
> + start = pep->htpr;
> entry = start + hash_function(mac_addr);
> for (i = 0; i < HOP_NUMBER; i++) {
> if (!(le32_to_cpu(entry->lo) & HASH_ENTRY_VALID)) {
> diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
> index 771bb61..2f69140 100644
> --- a/drivers/net/qla3xxx.c
> +++ b/drivers/net/qla3xxx.c
> @@ -2873,7 +2873,7 @@ static int ql_alloc_mem_resources(struct ql3_adapter *qdev)
> PAGE_SIZE, &qdev->shadow_reg_phy_addr);
>
> if (qdev->shadow_reg_virt_addr != NULL) {
> - qdev->preq_consumer_index = (u16 *) qdev->shadow_reg_virt_addr;
> + qdev->preq_consumer_index = qdev->shadow_reg_virt_addr;
> qdev->req_consumer_index_phy_addr_high =
> MS_64BITS(qdev->shadow_reg_phy_addr);
> qdev->req_consumer_index_phy_addr_low =
> @@ -3114,8 +3114,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
> qdev->small_buf_release_cnt = 8;
> qdev->lrg_buf_q_producer_index = qdev->num_lbufq_entries - 1;
> qdev->lrg_buf_release_cnt = 8;
> - qdev->lrg_buf_next_free =
> - (struct bufq_addr_element *)qdev->lrg_buf_q_virt_addr;
> + qdev->lrg_buf_next_free = qdev->lrg_buf_q_virt_addr;
> qdev->small_buf_index = 0;
> qdev->lrg_buf_index = 0;
> qdev->lrg_buf_free_count = 0;
> diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
> index bab041a..c77024f 100644
> --- a/drivers/net/qlcnic/qlcnic_ctx.c
> +++ b/drivers/net/qlcnic/qlcnic_ctx.c
> @@ -126,7 +126,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
> err = -EIO;
> goto error;
> }
> - tmp_tmpl = (struct qlcnic_dump_template_hdr *) tmp_addr;
> + tmp_tmpl = tmp_addr;
> csum = qlcnic_temp_checksum((uint32_t *) tmp_addr, temp_size);
> if (csum) {
> dev_err(&adapter->pdev->dev,
> @@ -139,7 +139,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
> err = -EIO;
> goto error;
> }
> - tmp_buf = (u32 *) tmp_addr;
> + tmp_buf = tmp_addr;
> template = (u32 *) ahw->fw_dump.tmpl_hdr;
> for (i = 0; i < temp_size/sizeof(u32); i++)
> *template++ = __le32_to_cpu(*tmp_buf++);
> @@ -214,7 +214,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
> &hostrq_phys_addr, GFP_KERNEL);
> if (addr == NULL)
> return -ENOMEM;
> - prq = (struct qlcnic_hostrq_rx_ctx *)addr;
> + prq = addr;
>
> addr = dma_alloc_coherent(&adapter->pdev->dev, rsp_size,
> &cardrsp_phys_addr, GFP_KERNEL);
> @@ -222,7 +222,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto out_free_rq;
> }
> - prsp = (struct qlcnic_cardrsp_rx_ctx *)addr;
> + prsp = addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr);
>
> @@ -380,10 +380,10 @@ qlcnic_fw_cmd_create_tx_ctx(struct qlcnic_adapter *adapter)
> }
>
> memset(rq_addr, 0, rq_size);
> - prq = (struct qlcnic_hostrq_tx_ctx *)rq_addr;
> + prq = rq_addr;
>
> memset(rsp_addr, 0, rsp_size);
> - prsp = (struct qlcnic_cardrsp_tx_ctx *)rsp_addr;
> + prsp = rsp_addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
>
> @@ -493,7 +493,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> goto err_out_free;
> }
>
> - tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
> + tx_ring->desc_head = addr;
>
> for (ring = 0; ring < adapter->max_rds_rings; ring++) {
> rds_ring = &recv_ctx->rds_rings[ring];
> @@ -506,7 +506,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - rds_ring->desc_head = (struct rcv_desc *)addr;
> + rds_ring->desc_head = addr;
>
> }
>
> @@ -522,7 +522,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - sds_ring->desc_head = (struct status_desc *)addr;
> + sds_ring->desc_head = addr;
> }
>
> return 0;
> @@ -662,7 +662,7 @@ int qlcnic_get_nic_info(struct qlcnic_adapter *adapter,
> return -ENOMEM;
> memset(nic_info_addr, 0, nic_size);
>
> - nic_info = (struct qlcnic_info *) nic_info_addr;
> + nic_info = nic_info_addr;
> err = qlcnic_issue_cmd(adapter,
> adapter->ahw->pci_func,
> adapter->fw_hal_version,
> @@ -720,7 +720,7 @@ int qlcnic_set_nic_info(struct qlcnic_adapter *adapter, struct qlcnic_info *nic)
> return -ENOMEM;
>
> memset(nic_info_addr, 0, nic_size);
> - nic_info = (struct qlcnic_info *)nic_info_addr;
> + nic_info = nic_info_addr;
>
> nic_info->pci_func = cpu_to_le16(nic->pci_func);
> nic_info->op_mode = cpu_to_le16(nic->op_mode);
> @@ -769,7 +769,7 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter,
> return -ENOMEM;
> memset(pci_info_addr, 0, pci_size);
>
> - npar = (struct qlcnic_pci_info *) pci_info_addr;
> + npar = pci_info_addr;
> err = qlcnic_issue_cmd(adapter,
> adapter->ahw->pci_func,
> adapter->fw_hal_version,
> @@ -877,7 +877,7 @@ int qlcnic_get_port_stats(struct qlcnic_adapter *adapter, const u8 func,
> QLCNIC_CDRP_CMD_GET_ESWITCH_STATS);
>
> if (!err) {
> - stats = (struct __qlcnic_esw_statistics *)stats_addr;
> + stats = stats_addr;
> esw_stats->context_id = le16_to_cpu(stats->context_id);
> esw_stats->version = le16_to_cpu(stats->version);
> esw_stats->size = le16_to_cpu(stats->size);
> diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c
> index 9efc690..8ea8001 100644
> --- a/drivers/net/qlcnic/qlcnic_ethtool.c
> +++ b/drivers/net/qlcnic/qlcnic_ethtool.c
> @@ -996,7 +996,7 @@ qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
> /* Copy template header first */
> copy_sz = fw_dump->tmpl_hdr->size;
> hdr_ptr = (u32 *) fw_dump->tmpl_hdr;
> - data = (u32 *) buffer;
> + data = buffer;
> for (i = 0; i < copy_sz/sizeof(u32); i++)
> *data++ = cpu_to_le32(*hdr_ptr++);
>
> diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
> index e965661..ea0f11e 100644
> --- a/drivers/net/qlcnic/qlcnic_hw.c
> +++ b/drivers/net/qlcnic/qlcnic_hw.c
> @@ -1672,8 +1672,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
> tmpl_hdr->sys_info[1] = adapter->fw_version;
>
> for (i = 0; i < no_entries; i++) {
> - entry = (struct qlcnic_dump_entry *) ((void *) tmpl_hdr +
> - entry_offset);
> + entry = (void *)tmpl_hdr + entry_offset;
> if (!(entry->hdr.mask & tmpl_hdr->drv_cap_mask)) {
> entry->hdr.flags |= QLCNIC_DUMP_SKIP;
> entry_offset += entry->hdr.offset;
> diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
> index 3ab7d2c..0a6c1c9 100644
> --- a/drivers/net/qlcnic/qlcnic_main.c
> +++ b/drivers/net/qlcnic/qlcnic_main.c
> @@ -1861,7 +1861,7 @@ qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter)
> return;
>
> adapter->fhash.fmax = QLCNIC_LB_MAX_FILTERS;
> - adapter->fhash.fhead = (struct hlist_head *)head;
> + adapter->fhash.fhead = head;
>
> for (i = 0; i < adapter->fhash.fmax; i++)
> INIT_HLIST_HEAD(&adapter->fhash.fhead[i]);
> diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
> index 930ae45..be89610 100644
> --- a/drivers/net/qlge/qlge_main.c
> +++ b/drivers/net/qlge/qlge_main.c
> @@ -3096,7 +3096,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> if (rx_ring->lbq_len) {
> cqicb->flags |= FLAGS_LL; /* Load lbq values */
> tmp = (u64)rx_ring->lbq_base_dma;
> - base_indirect_ptr = (__le64 *) rx_ring->lbq_base_indirect;
> + base_indirect_ptr = rx_ring->lbq_base_indirect;
> page_entries = 0;
> do {
> *base_indirect_ptr = cpu_to_le64(tmp);
> @@ -3120,7 +3120,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> if (rx_ring->sbq_len) {
> cqicb->flags |= FLAGS_LS; /* Load sbq values */
> tmp = (u64)rx_ring->sbq_base_dma;
> - base_indirect_ptr = (__le64 *) rx_ring->sbq_base_indirect;
> + base_indirect_ptr = rx_ring->sbq_base_indirect;
> page_entries = 0;
> do {
> *base_indirect_ptr = cpu_to_le64(tmp);
> diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
> index df0d2c8..f4d80f9 100644
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -841,7 +841,7 @@ static int init_shared_mem(struct s2io_nic *nic)
> tmp_p_addr = ring->rx_blocks[j].block_dma_addr;
> tmp_p_addr_next = ring->rx_blocks[next].block_dma_addr;
>
> - pre_rxd_blk = (struct RxD_block *)tmp_v_addr;
> + pre_rxd_blk = tmp_v_addr;
> pre_rxd_blk->reserved_2_pNext_RxD_block =
> (unsigned long)tmp_v_addr_next;
> pre_rxd_blk->pNext_RxD_Blk_physical =
> @@ -918,7 +918,7 @@ static int init_shared_mem(struct s2io_nic *nic)
> mac_control->stats_mem_sz = size;
>
> tmp_v_addr = mac_control->stats_mem;
> - mac_control->stats_info = (struct stat_block *)tmp_v_addr;
> + mac_control->stats_info = tmp_v_addr;
> memset(tmp_v_addr, 0, size);
> DBG_PRINT(INIT_DBG, "%s: Ring Mem PHY: 0x%llx\n",
> dev_name(&nic->pdev->dev), (unsigned long long)tmp_p_addr);
> @@ -2439,7 +2439,7 @@ static void free_tx_buffers(struct s2io_nic *nic)
>
> spin_lock_irqsave(&fifo->tx_lock, flags);
> for (j = 0; j < tx_cfg->fifo_len; j++) {
> - txdp = (struct TxD *)fifo->list_info[j].list_virt_addr;
> + txdp = fifo->list_info[j].list_virt_addr;
> skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j);
> if (skb) {
> swstats->mem_freed += skb->truesize;
> @@ -3075,8 +3075,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
>
> get_info = fifo_data->tx_curr_get_info;
> memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info));
> - txdlp = (struct TxD *)
> - fifo_data->list_info[get_info.offset].list_virt_addr;
> + txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
> while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&
> (get_info.offset != put_info.offset) &&
> (txdlp->Host_Control)) {
> @@ -3129,8 +3128,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
> get_info.offset++;
> if (get_info.offset == get_info.fifo_len + 1)
> get_info.offset = 0;
> - txdlp = (struct TxD *)
> - fifo_data->list_info[get_info.offset].list_virt_addr;
> + txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
> fifo_data->tx_curr_get_info.offset = get_info.offset;
> }
>
> @@ -4163,7 +4161,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
>
> put_off = (u16)fifo->tx_curr_put_info.offset;
> get_off = (u16)fifo->tx_curr_get_info.offset;
> - txdp = (struct TxD *)fifo->list_info[put_off].list_virt_addr;
> + txdp = fifo->list_info[put_off].list_virt_addr;
>
> queue_len = fifo->tx_curr_put_info.fifo_len + 1;
> /* Avoid "put" pointer going beyond "get" pointer */
> @@ -7972,9 +7970,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
>
> /* Initializing the BAR1 address as the start of the FIFO pointer. */
> for (j = 0; j < MAX_TX_FIFOS; j++) {
> - mac_control->tx_FIFO_start[j] =
> - (struct TxFIFO_element __iomem *)
> - (sp->bar1 + (j * 0x00020000));
> + mac_control->tx_FIFO_start[j] = sp->bar1 + (j * 0x00020000);
> }
>
> /* Driver entry points */
> diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
> index fb4721f..a66818e 100644
> --- a/drivers/net/sfc/siena.c
> +++ b/drivers/net/sfc/siena.c
> @@ -400,7 +400,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)
> u64 generation_end;
>
> mac_stats = &efx->mac_stats;
> - dma_stats = (u64 *)efx->stats_buffer.addr;
> + dma_stats = efx->stats_buffer.addr;
>
> generation_end = dma_stats[MC_CMD_MAC_GENERATION_END];
> if (generation_end == STATS_GENERATION_INVALID)
> diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
> index 484f795..658a192 100644
> --- a/drivers/net/sis900.c
> +++ b/drivers/net/sis900.c
> @@ -482,7 +482,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> ret = -ENOMEM;
> goto err_out_cleardev;
> }
> - sis_priv->tx_ring = (BufferDesc *)ring_space;
> + sis_priv->tx_ring = ring_space;
> sis_priv->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pci_dev, RX_TOTAL_SIZE, &ring_dma);
> @@ -490,7 +490,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> ret = -ENOMEM;
> goto err_unmap_tx;
> }
> - sis_priv->rx_ring = (BufferDesc *)ring_space;
> + sis_priv->rx_ring = ring_space;
> sis_priv->rx_ring_dma = ring_dma;
>
> /* The SiS900-specific entries in the device structure. */
> diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
> index 2bedc0a..6153cfd 100644
> --- a/drivers/net/tokenring/madgemc.c
> +++ b/drivers/net/tokenring/madgemc.c
> @@ -418,7 +418,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
> return IRQ_NONE;
> }
>
> - dev = (struct net_device *)dev_id;
> + dev = dev_id;
>
> /* Make sure its really us. -- the Madge way */
> pending = inb(dev->base_addr + MC_CONTROL_REG0);
> diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
> index 3de4283..1d5091a 100644
> --- a/drivers/net/typhoon.c
> +++ b/drivers/net/typhoon.c
> @@ -2367,7 +2367,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> dev->irq = pdev->irq;
> tp = netdev_priv(dev);
> - tp->shared = (struct typhoon_shared *) shared;
> + tp->shared = shared;
> tp->shared_dma = shared_dma;
> tp->pdev = pdev;
> tp->tx_pdev = pdev;
> diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
> index 32763b2..857618a 100644
> --- a/drivers/net/vxge/vxge-config.c
> +++ b/drivers/net/vxge/vxge-config.c
> @@ -582,7 +582,7 @@ __vxge_hw_device_toc_get(void __iomem *bar0)
> goto exit;
>
> val64 = readq(&legacy_reg->toc_first_pointer);
> - toc = (struct vxge_hw_toc_reg __iomem *)(bar0+val64);
> + toc = bar0 + val64;
> exit:
> return toc;
> }
> @@ -600,7 +600,7 @@ __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
> u32 i;
> enum vxge_hw_status status = VXGE_HW_OK;
>
> - hldev->legacy_reg = (struct vxge_hw_legacy_reg __iomem *)hldev->bar0;
> + hldev->legacy_reg = hldev->bar0;
>
> hldev->toc_reg = __vxge_hw_device_toc_get(hldev->bar0);
> if (hldev->toc_reg == NULL) {
> @@ -609,39 +609,31 @@ __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
> }
>
> val64 = readq(&hldev->toc_reg->toc_common_pointer);
> - hldev->common_reg =
> - (struct vxge_hw_common_reg __iomem *)(hldev->bar0 + val64);
> + hldev->common_reg = hldev->bar0 + val64;
>
> val64 = readq(&hldev->toc_reg->toc_mrpcim_pointer);
> - hldev->mrpcim_reg =
> - (struct vxge_hw_mrpcim_reg __iomem *)(hldev->bar0 + val64);
> + hldev->mrpcim_reg = hldev->bar0 + val64;
>
> for (i = 0; i < VXGE_HW_TITAN_SRPCIM_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_srpcim_pointer[i]);
> - hldev->srpcim_reg[i] =
> - (struct vxge_hw_srpcim_reg __iomem *)
> - (hldev->bar0 + val64);
> + hldev->srpcim_reg[i] = hldev->bar0 + val64;
> }
>
> for (i = 0; i < VXGE_HW_TITAN_VPMGMT_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_vpmgmt_pointer[i]);
> - hldev->vpmgmt_reg[i] =
> - (struct vxge_hw_vpmgmt_reg __iomem *)(hldev->bar0 + val64);
> + hldev->vpmgmt_reg[i] = hldev->bar0 + val64;
> }
>
> for (i = 0; i < VXGE_HW_TITAN_VPATH_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_vpath_pointer[i]);
> - hldev->vpath_reg[i] =
> - (struct vxge_hw_vpath_reg __iomem *)
> - (hldev->bar0 + val64);
> + hldev->vpath_reg[i] = hldev->bar0 + val64;
> }
>
> val64 = readq(&hldev->toc_reg->toc_kdfc);
>
> switch (VXGE_HW_TOC_GET_KDFC_INITIAL_BIR(val64)) {
> case 0:
> - hldev->kdfc = (u8 __iomem *)(hldev->bar0 +
> - VXGE_HW_TOC_GET_KDFC_INITIAL_OFFSET(val64));
> + hldev->kdfc = hldev->bar0 + VXGE_HW_TOC_GET_KDFC_INITIAL_OFFSET(val64) ;
> break;
> default:
> break;
> @@ -1024,7 +1016,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> }
>
> val64 = readq(&toc->toc_common_pointer);
> - common_reg = (struct vxge_hw_common_reg __iomem *)(bar0 + val64);
> + common_reg = bar0 + val64;
>
> status = __vxge_hw_device_vpath_reset_in_prog_check(
> (u64 __iomem *)&common_reg->vpath_rst_in_prog);
> @@ -1044,8 +1036,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
>
> val64 = readq(&toc->toc_vpmgmt_pointer[i]);
>
> - vpmgmt_reg = (struct vxge_hw_vpmgmt_reg __iomem *)
> - (bar0 + val64);
> + vpmgmt_reg = bar0 + val64;
>
> hw_info->func_id = __vxge_hw_vpath_func_id_get(vpmgmt_reg);
> if (__vxge_hw_device_access_rights_get(hw_info->host_type,
> @@ -1054,8 +1045,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
>
> val64 = readq(&toc->toc_mrpcim_pointer);
>
> - mrpcim_reg = (struct vxge_hw_mrpcim_reg __iomem *)
> - (bar0 + val64);
> + mrpcim_reg = bar0 + val64;
>
> writeq(0, &mrpcim_reg->xgmac_gen_fw_memo_mask);
> wmb();
> @@ -1064,8 +1054,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> val64 = readq(&toc->toc_vpath_pointer[i]);
>
> spin_lock_init(&vpath.lock);
> - vpath.vp_reg = (struct vxge_hw_vpath_reg __iomem *)
> - (bar0 + val64);
> + vpath.vp_reg = bar0 + val64;
> vpath.vp_open = VXGE_HW_VP_NOT_OPEN;
>
> status = __vxge_hw_vpath_pci_func_mode_get(&vpath, hw_info);
> @@ -1088,8 +1077,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> continue;
>
> val64 = readq(&toc->toc_vpath_pointer[i]);
> - vpath.vp_reg = (struct vxge_hw_vpath_reg __iomem *)
> - (bar0 + val64);
> + vpath.vp_reg = bar0 + val64;
> vpath.vp_open = VXGE_HW_VP_NOT_OPEN;
>
> status = __vxge_hw_vpath_addr_get(&vpath,
> @@ -2140,8 +2128,7 @@ __vxge_hw_ring_mempool_item_alloc(struct vxge_hw_mempool *mempoolh,
> memblock_index, item,
> &memblock_item_idx);
>
> - rxdp = (struct vxge_hw_ring_rxd_1 *)
> - ring->channel.reserve_arr[reserve_index];
> + rxdp = ring->channel.reserve_arr[reserve_index];
>
> uld_priv = ((u8 *)rxdblock_priv + ring->rxd_priv_size * i);
>
> @@ -4880,8 +4867,7 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
> goto vpath_open_exit8;
> }
>
> - vpath->hw_stats = (struct vxge_hw_vpath_stats_hw_info *)vpath->
> - stats_block->memblock;
> + vpath->hw_stats = vpath->stats_block->memblock;
> memset(vpath->hw_stats, 0,
> sizeof(struct vxge_hw_vpath_stats_hw_info));
>
> diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c
> index f935170..ad64ce0 100644
> --- a/drivers/net/vxge/vxge-traffic.c
> +++ b/drivers/net/vxge/vxge-traffic.c
> @@ -1309,7 +1309,7 @@ enum vxge_hw_status vxge_hw_ring_rxd_next_completed(
>
> vxge_hw_channel_dtr_try_complete(channel, rxdh);
>
> - rxdp = (struct vxge_hw_ring_rxd_1 *)*rxdh;
> + rxdp = *rxdh;
> if (rxdp == NULL) {
> status = VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS;
> goto exit;
> @@ -1565,7 +1565,7 @@ void vxge_hw_fifo_txdl_post(struct __vxge_hw_fifo *fifo, void *txdlh)
> channel = &fifo->channel;
>
> txdl_priv = __vxge_hw_fifo_txdl_priv(fifo, txdlh);
> - txdp_first = (struct vxge_hw_fifo_txd *)txdlh;
> + txdp_first = txdlh;
>
> txdp_last = (struct vxge_hw_fifo_txd *)txdlh + (txdl_priv->frags - 1);
> txdp_last->control_0 |=
> @@ -1631,7 +1631,7 @@ enum vxge_hw_status vxge_hw_fifo_txdl_next_completed(
>
> vxge_hw_channel_dtr_try_complete(channel, txdlh);
>
> - txdp = (struct vxge_hw_fifo_txd *)*txdlh;
> + txdp = *txdlh;
> if (txdp == NULL) {
> status = VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS;
> goto exit;
Thanks so much!
Acked-by: Jon Mason <jdmason@kudzu.us>
> diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
> index 1c65d1c..850fc84 100644
> --- a/drivers/net/wan/pc300_tty.c
> +++ b/drivers/net/wan/pc300_tty.c
> @@ -755,7 +755,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
>
> dsr_rx = cpc_readb(card->hw.scabase + DSR_RX(ch));
>
> - cpc_tty = (st_cpc_tty_area *)pc300dev->cpc_tty;
> + cpc_tty = pc300dev->cpc_tty;
>
> while (1) {
> rx_len = 0;
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 9cb4cdc..bbb8c65 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -252,11 +252,11 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
> u16 *from_u16_ptr, *to_u16_ptr;
>
> to_u32_ptr = dest_ptr;
> - from_u16_ptr = (u16 *) src_ptr;
> + from_u16_ptr = src_ptr;
> align_buffer = 0;
>
> for (; length > 3; length -= 4) {
> - to_u16_ptr = (u16 *) ((void *) &align_buffer);
> + to_u16_ptr = (u16 *)&align_buffer;
> *to_u16_ptr++ = *from_u16_ptr++;
> *to_u16_ptr++ = *from_u16_ptr++;
>
> diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
> index ec47e22..3e5ac60 100644
> --- a/drivers/net/yellowfin.c
> +++ b/drivers/net/yellowfin.c
> @@ -442,19 +442,19 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_cleardev;
> - np->tx_ring = (struct yellowfin_desc *)ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - np->rx_ring = (struct yellowfin_desc *)ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, STATUS_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_rx;
> - np->tx_status = (struct tx_status_words *)ring_space;
> + np->tx_status = ring_space;
> np->tx_status_dma = ring_dma;
>
> if (dev->mem_start)
> --
> 1.7.6.rc0
>
>
^ permalink raw reply
* Re: [PATCH net-next 2/2] drivers/net: Remove casts of void *
From: Jon Mason @ 2011-06-16 15:23 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Arnaldo Carvalho de Melo, Jay Cliburn, Chris Snook,
Jie Yang, Sathya Perla, Subbu Seetharaman, Ajit Khaparde,
Rasesh Mody, Debashis Dutt, Sjur Braendeland, Divy Le Ray,
Breno Leitao, Amit Kumar Salecha, Ron Mercer, linux-driver,
Anirban Chakraborty, Solarflare linux maintainers, Steve Hodgson,
Ben Hutchings, Daniele Venzano, David Dillow
In-Reply-To: <486a21b708a9dce0c1c0059a21a2f9b66dac9e3c.1308024069.git.joe@perches.com>
On Mon, Jun 13, 2011 at 11:02 PM, Joe Perches <joe@perches.com> wrote:
> Unnecessary casts of void * clutter the code.
>
> These are the remainder casts after several specific
> patches to remove netdev_priv and dev_priv.
>
> Done via coccinelle script:
>
> $ cat cast_void_pointer.cocci
> @@
> type T;
> T *pt;
> void *pv;
> @@
>
> - pt = (T *)pv;
> + pt = pv;
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/a2065.c | 2 +-
> drivers/net/appletalk/ltpc.c | 8 +++---
> drivers/net/atl1e/atl1e_main.c | 5 +--
> drivers/net/atlx/atl2.c | 3 +-
> drivers/net/benet/be_cmds.c | 3 +-
> drivers/net/benet/be_ethtool.c | 4 +-
> drivers/net/bna/bfa_cee.c | 2 +-
> drivers/net/bna/cna.h | 2 +-
> drivers/net/caif/caif_shmcore.c | 2 +-
> drivers/net/cnic.c | 4 +-
> drivers/net/cxgb3/cxgb3_offload.c | 2 +-
> drivers/net/davinci_cpdma.c | 2 +-
> drivers/net/declance.c | 38 +++++++++++++++++------------
> drivers/net/depca.c | 4 +-
> drivers/net/dl2k.c | 4 +-
> drivers/net/ehea/ehea_qmr.c | 2 +-
> drivers/net/epic100.c | 4 +-
> drivers/net/fealnx.c | 4 +-
> drivers/net/gianfar.c | 4 +-
> drivers/net/hamachi.c | 4 +-
> drivers/net/macmace.c | 2 +-
> drivers/net/mlx4/en_rx.c | 2 +-
> drivers/net/mlx4/en_tx.c | 5 +--
> drivers/net/myri_sbus.c | 3 +-
> drivers/net/netxen/netxen_nic_ctx.c | 16 ++++++------
> drivers/net/pxa168_eth.c | 2 +-
> drivers/net/qla3xxx.c | 5 +--
> drivers/net/qlcnic/qlcnic_ctx.c | 26 ++++++++++----------
> drivers/net/qlcnic/qlcnic_ethtool.c | 2 +-
> drivers/net/qlcnic/qlcnic_hw.c | 3 +-
> drivers/net/qlcnic/qlcnic_main.c | 2 +-
> drivers/net/qlge/qlge_main.c | 4 +-
> drivers/net/s2io.c | 18 +++++--------
> drivers/net/sfc/siena.c | 2 +-
> drivers/net/sis900.c | 4 +-
> drivers/net/tokenring/madgemc.c | 2 +-
> drivers/net/typhoon.c | 2 +-
> drivers/net/vxge/vxge-config.c | 44 ++++++++++++-----------------------
> drivers/net/vxge/vxge-traffic.c | 6 ++--
> drivers/net/wan/pc300_tty.c | 2 +-
> drivers/net/xilinx_emaclite.c | 4 +-
> drivers/net/yellowfin.c | 6 ++--
> 42 files changed, 123 insertions(+), 142 deletions(-)
>
> diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
> index deaa8bc..0230fc2 100644
> --- a/drivers/net/a2065.c
> +++ b/drivers/net/a2065.c
> @@ -426,7 +426,7 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
> volatile struct lance_regs *ll;
> int csr0;
>
> - dev = (struct net_device *) dev_id;
> + dev = dev_id;
>
> lp = netdev_priv(dev);
> ll = lp->ll;
> diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
> index e69eead..34ffb54 100644
> --- a/drivers/net/appletalk/ltpc.c
> +++ b/drivers/net/appletalk/ltpc.c
> @@ -652,9 +652,9 @@ static int do_write(struct net_device *dev, void *cbuf, int cbuflen,
> int ret;
>
> if(i) {
> - qels[i].cbuf = (unsigned char *) cbuf;
> + qels[i].cbuf = cbuf;
> qels[i].cbuflen = cbuflen;
> - qels[i].dbuf = (unsigned char *) dbuf;
> + qels[i].dbuf = dbuf;
> qels[i].dbuflen = dbuflen;
> qels[i].QWrite = 1;
> qels[i].mailbox = i; /* this should be initted rather */
> @@ -676,9 +676,9 @@ static int do_read(struct net_device *dev, void *cbuf, int cbuflen,
> int ret;
>
> if(i) {
> - qels[i].cbuf = (unsigned char *) cbuf;
> + qels[i].cbuf = cbuf;
> qels[i].cbuflen = cbuflen;
> - qels[i].dbuf = (unsigned char *) dbuf;
> + qels[i].dbuf = dbuf;
> qels[i].dbuflen = dbuflen;
> qels[i].QWrite = 0;
> qels[i].mailbox = i; /* this should be initted rather */
> diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
> index 86a9122..c3c5db1 100644
> --- a/drivers/net/atl1e/atl1e_main.c
> +++ b/drivers/net/atl1e/atl1e_main.c
> @@ -800,8 +800,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
> /* Init TPD Ring */
> tx_ring->dma = roundup(adapter->ring_dma, 8);
> offset = tx_ring->dma - adapter->ring_dma;
> - tx_ring->desc = (struct atl1e_tpd_desc *)
> - (adapter->ring_vir_addr + offset);
> + tx_ring->desc = adapter->ring_vir_addr + offset;
> size = sizeof(struct atl1e_tx_buffer) * (tx_ring->count);
> tx_ring->tx_buffer = kzalloc(size, GFP_KERNEL);
> if (tx_ring->tx_buffer == NULL) {
> @@ -827,7 +826,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
>
> /* Init CMB dma address */
> tx_ring->cmb_dma = adapter->ring_dma + offset;
> - tx_ring->cmb = (u32 *)(adapter->ring_vir_addr + offset);
> + tx_ring->cmb = adapter->ring_vir_addr + offset;
> offset += sizeof(u32);
>
> for (i = 0; i < adapter->num_rx_queues; i++) {
> diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
> index 16249e9..24e1592 100644
> --- a/drivers/net/atlx/atl2.c
> +++ b/drivers/net/atlx/atl2.c
> @@ -311,8 +311,7 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
> adapter->txd_dma = adapter->ring_dma ;
> offset = (adapter->txd_dma & 0x7) ? (8 - (adapter->txd_dma & 0x7)) : 0;
> adapter->txd_dma += offset;
> - adapter->txd_ring = (struct tx_pkt_header *) (adapter->ring_vir_addr +
> - offset);
> + adapter->txd_ring = adapter->ring_vir_addr + offset;
>
> /* Init TXS Ring */
> adapter->txs_dma = adapter->txd_dma + adapter->txd_ring_size;
> diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
> index 0c12c2d..30719f5 100644
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -2334,8 +2334,7 @@ int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
>
> status = be_mbox_notify_wait(adapter);
> if (!status) {
> - attribs = (struct mgmt_controller_attrib *)( attribs_cmd.va +
> - sizeof(struct be_cmd_resp_hdr));
> + attribs = attribs_cmd.va + sizeof(struct be_cmd_resp_hdr);
> adapter->hba_port_num = attribs->hba_attribs.phy_port;
> }
>
> diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
> index facfe3c..5572c78 100644
> --- a/drivers/net/benet/be_ethtool.c
> +++ b/drivers/net/benet/be_ethtool.c
> @@ -386,7 +386,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
> }
> status = be_cmd_get_phy_info(adapter, &phy_cmd);
> if (!status) {
> - resp = (struct be_cmd_resp_get_phy_info *) phy_cmd.va;
> + resp = phy_cmd.va;
> intf_type = le16_to_cpu(resp->interface_type);
>
> switch (intf_type) {
> @@ -690,7 +690,7 @@ be_read_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
> status = be_cmd_get_seeprom_data(adapter, &eeprom_cmd);
>
> if (!status) {
> - resp = (struct be_cmd_resp_seeprom_read *) eeprom_cmd.va;
> + resp = eeprom_cmd.va;
> memcpy(data, resp->seeprom_data + eeprom->offset, eeprom->len);
> }
> dma_free_coherent(&adapter->pdev->dev, eeprom_cmd.size, eeprom_cmd.va,
> diff --git a/drivers/net/bna/bfa_cee.c b/drivers/net/bna/bfa_cee.c
> index f7b789a..dcfbf08 100644
> --- a/drivers/net/bna/bfa_cee.c
> +++ b/drivers/net/bna/bfa_cee.c
> @@ -236,7 +236,7 @@ static void
> bfa_cee_hbfail(void *arg)
> {
> struct bfa_cee *cee;
> - cee = (struct bfa_cee *) arg;
> + cee = arg;
>
> if (cee->get_attr_pending == true) {
> cee->get_attr_status = BFA_STATUS_FAILED;
> diff --git a/drivers/net/bna/cna.h b/drivers/net/bna/cna.h
> index bbd39dc..3c47dc5 100644
> --- a/drivers/net/bna/cna.h
> +++ b/drivers/net/bna/cna.h
> @@ -74,7 +74,7 @@ typedef struct mac { u8 mac[MAC_ADDRLEN]; } mac_t;
> bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe)); \
> bfa_q_qe_init(*((struct list_head **) _qe)); \
> } else { \
> - *((struct list_head **) (_qe)) = (struct list_head *) NULL; \
> + *((struct list_head **)(_qe)) = NULL; \
> } \
> }
>
> diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
> index 731aa11..d4b26fb 100644
> --- a/drivers/net/caif/caif_shmcore.c
> +++ b/drivers/net/caif/caif_shmcore.c
> @@ -134,7 +134,7 @@ int caif_shmdrv_rx_cb(u32 mbx_msg, void *priv)
> u32 avail_emptybuff = 0;
> unsigned long flags = 0;
>
> - pshm_drv = (struct shmdrv_layer *)priv;
> + pshm_drv = priv;
>
> /* Check for received buffers. */
> if (mbx_msg & SHM_FULL_MASK) {
> diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
> index 363c7f3..8548cbe 100644
> --- a/drivers/net/cnic.c
> +++ b/drivers/net/cnic.c
> @@ -4290,7 +4290,7 @@ static void cnic_init_bnx2_tx_ring(struct cnic_dev *dev)
> val = BNX2_L2CTX_CMD_TYPE_TYPE_L2 | (8 << 16);
> cnic_ctx_wr(dev, cid_addr, offset1, val);
>
> - txbd = (struct tx_bd *) udev->l2_ring;
> + txbd = udev->l2_ring;
>
> buf_map = udev->l2_buf_map;
> for (i = 0; i < MAX_TX_DESC_CNT; i++, txbd++) {
> @@ -4349,7 +4349,7 @@ static void cnic_init_bnx2_rx_ring(struct cnic_dev *dev)
> val = BNX2_L2CTX_L2_STATUSB_NUM(sb_id);
> cnic_ctx_wr(dev, cid_addr, BNX2_L2CTX_HOST_BDIDX, val);
>
> - rxbd = (struct rx_bd *) (udev->l2_ring + BCM_PAGE_SIZE);
> + rxbd = udev->l2_ring + BCM_PAGE_SIZE;
> for (i = 0; i < MAX_RX_DESC_CNT; i++, rxbd++) {
> dma_addr_t buf_map;
> int n = (i % cp->l2_rx_ring_size) + 1;
> diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c
> index 862804f..9db9068 100644
> --- a/drivers/net/cxgb3/cxgb3_offload.c
> +++ b/drivers/net/cxgb3/cxgb3_offload.c
> @@ -567,7 +567,7 @@ static void t3_process_tid_release_list(struct work_struct *work)
> while (td->tid_release_list) {
> struct t3c_tid_entry *p = td->tid_release_list;
>
> - td->tid_release_list = (struct t3c_tid_entry *)p->ctx;
> + td->tid_release_list = p->ctx;
> spin_unlock_bh(&td->tid_release_lock);
>
> skb = alloc_skb(sizeof(struct cpl_tid_release),
> diff --git a/drivers/net/davinci_cpdma.c b/drivers/net/davinci_cpdma.c
> index ae47f23..dca9d33 100644
> --- a/drivers/net/davinci_cpdma.c
> +++ b/drivers/net/davinci_cpdma.c
> @@ -167,7 +167,7 @@ cpdma_desc_pool_create(struct device *dev, u32 phys, u32 hw_addr,
> } else {
> pool->cpumap = dma_alloc_coherent(dev, size, &pool->phys,
> GFP_KERNEL);
> - pool->iomap = (void __force __iomem *)pool->cpumap;
> + pool->iomap = pool->cpumap;
> pool->hw_addr = pool->phys;
> }
>
> diff --git a/drivers/net/declance.c b/drivers/net/declance.c
> index 219eb5a..cabd3a5 100644
> --- a/drivers/net/declance.c
> +++ b/drivers/net/declance.c
> @@ -326,15 +326,18 @@ static void load_csrs(struct lance_private *lp)
> */
> static void cp_to_buf(const int type, void *to, const void *from, int len)
> {
> - unsigned short *tp, *fp, clen;
> - unsigned char *rtp, *rfp;
> + unsigned short *tp;
> + const unsigned short *fp;
> + unsigned short clen;
> + unsigned char *rtp;
> + const unsigned char *rfp;
>
> if (type == PMAD_LANCE) {
> memcpy(to, from, len);
> } else if (type == PMAX_LANCE) {
> clen = len >> 1;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
>
> while (clen--) {
> *tp++ = *fp++;
> @@ -342,8 +345,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
> }
>
> clen = len & 1;
> - rtp = (unsigned char *) tp;
> - rfp = (unsigned char *) fp;
> + rtp = tp;
> + rfp = fp;
> while (clen--) {
> *rtp++ = *rfp++;
> }
> @@ -352,8 +355,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
> * copy 16 Byte chunks
> */
> clen = len >> 4;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> *tp++ = *fp++;
> @@ -382,15 +385,18 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
>
> static void cp_from_buf(const int type, void *to, const void *from, int len)
> {
> - unsigned short *tp, *fp, clen;
> - unsigned char *rtp, *rfp;
> + unsigned short *tp;
> + const unsigned short *fp;
> + unsigned short clen;
> + unsigned char *rtp;
> + const unsigned char *rfp;
>
> if (type == PMAD_LANCE) {
> memcpy(to, from, len);
> } else if (type == PMAX_LANCE) {
> clen = len >> 1;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> fp++;
> @@ -398,8 +404,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
>
> clen = len & 1;
>
> - rtp = (unsigned char *) tp;
> - rfp = (unsigned char *) fp;
> + rtp = tp;
> + rfp = fp;
>
> while (clen--) {
> *rtp++ = *rfp++;
> @@ -410,8 +416,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
> * copy 16 Byte chunks
> */
> clen = len >> 4;
> - tp = (unsigned short *) to;
> - fp = (unsigned short *) from;
> + tp = to;
> + fp = from;
> while (clen--) {
> *tp++ = *fp++;
> *tp++ = *fp++;
> diff --git a/drivers/net/depca.c b/drivers/net/depca.c
> index 8b0084d..d54a0e9 100644
> --- a/drivers/net/depca.c
> +++ b/drivers/net/depca.c
> @@ -708,11 +708,11 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
>
> /* Tx & Rx descriptors (aligned to a quadword boundary) */
> offset = (offset + DEPCA_ALIGN) & ~DEPCA_ALIGN;
> - lp->rx_ring = (struct depca_rx_desc __iomem *) (lp->sh_mem + offset);
> + lp->rx_ring = lp->sh_mem + offset;
> lp->rx_ring_offset = offset;
>
> offset += (sizeof(struct depca_rx_desc) * NUM_RX_DESC);
> - lp->tx_ring = (struct depca_tx_desc __iomem *) (lp->sh_mem + offset);
> + lp->tx_ring = lp->sh_mem + offset;
> lp->tx_ring_offset = offset;
>
> offset += (sizeof(struct depca_tx_desc) * NUM_TX_DESC);
> diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
> index c445457..05e64b2 100644
> --- a/drivers/net/dl2k.c
> +++ b/drivers/net/dl2k.c
> @@ -221,13 +221,13 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
> ring_space = pci_alloc_consistent (pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_iounmap;
> - np->tx_ring = (struct netdev_desc *) ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent (pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - np->rx_ring = (struct netdev_desc *) ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> /* Parse eeprom data */
> diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
> index cd44bb8..95b9f4f 100644
> --- a/drivers/net/ehea/ehea_qmr.c
> +++ b/drivers/net/ehea/ehea_qmr.c
> @@ -331,7 +331,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)
> unsigned long flags;
>
> spin_lock_irqsave(&eq->spinlock, flags);
> - eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid(&eq->hw_queue);
> + eqe = hw_eqit_eq_get_inc_valid(&eq->hw_queue);
> spin_unlock_irqrestore(&eq->spinlock, flags);
>
> return eqe;
> diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
> index c353bf3..814c187 100644
> --- a/drivers/net/epic100.c
> +++ b/drivers/net/epic100.c
> @@ -391,13 +391,13 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_iounmap;
> - ep->tx_ring = (struct epic_tx_desc *)ring_space;
> + ep->tx_ring = ring_space;
> ep->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - ep->rx_ring = (struct epic_rx_desc *)ring_space;
> + ep->rx_ring = ring_space;
> ep->rx_ring_dma = ring_dma;
>
> if (dev->mem_start) {
> diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
> index dd54abe..fa8677c 100644
> --- a/drivers/net/fealnx.c
> +++ b/drivers/net/fealnx.c
> @@ -566,7 +566,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
> err = -ENOMEM;
> goto err_out_free_dev;
> }
> - np->rx_ring = (struct fealnx_desc *)ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> @@ -574,7 +574,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
> err = -ENOMEM;
> goto err_out_free_rx;
> }
> - np->tx_ring = (struct fealnx_desc *)ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> /* find the connected MII xcvrs */
> diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
> index ff60b23..3564551 100644
> --- a/drivers/net/gianfar.c
> +++ b/drivers/net/gianfar.c
> @@ -266,7 +266,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
>
> for (i = 0; i < priv->num_tx_queues; i++) {
> tx_queue = priv->tx_queue[i];
> - tx_queue->tx_bd_base = (struct txbd8 *) vaddr;
> + tx_queue->tx_bd_base = vaddr;
> tx_queue->tx_bd_dma_base = addr;
> tx_queue->dev = ndev;
> /* enet DMA only understands physical addresses */
> @@ -277,7 +277,7 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
> /* Start the rx descriptor ring where the tx ring leaves off */
> for (i = 0; i < priv->num_rx_queues; i++) {
> rx_queue = priv->rx_queue[i];
> - rx_queue->rx_bd_base = (struct rxbd8 *) vaddr;
> + rx_queue->rx_bd_base = vaddr;
> rx_queue->rx_bd_dma_base = addr;
> rx_queue->dev = ndev;
> addr += sizeof (struct rxbd8) * rx_queue->rx_ring_size;
> diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
> index a09041a..c274b3d 100644
> --- a/drivers/net/hamachi.c
> +++ b/drivers/net/hamachi.c
> @@ -648,13 +648,13 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_cleardev;
> - hmp->tx_ring = (struct hamachi_desc *)ring_space;
> + hmp->tx_ring = ring_space;
> hmp->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - hmp->rx_ring = (struct hamachi_desc *)ring_space;
> + hmp->rx_ring = ring_space;
> hmp->rx_ring_dma = ring_dma;
>
> /* Check for options being passed in */
> diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
> index c685a46..4286e67 100644
> --- a/drivers/net/macmace.c
> +++ b/drivers/net/macmace.c
> @@ -221,7 +221,7 @@ static int __devinit mace_probe(struct platform_device *pdev)
> SET_NETDEV_DEV(dev, &pdev->dev);
>
> dev->base_addr = (u32)MACE_BASE;
> - mp->mace = (volatile struct mace *) MACE_BASE;
> + mp->mace = MACE_BASE;
>
> dev->irq = IRQ_MAC_MACE;
> mp->dma_intr = IRQ_MAC_MACE_DMA;
> diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
> index 277215f..5197b50 100644
> --- a/drivers/net/mlx4/en_rx.c
> +++ b/drivers/net/mlx4/en_rx.c
> @@ -859,7 +859,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv)
> priv->rx_ring[0].cqn, &context);
>
> ptr = ((void *) &context) + 0x3c;
> - rss_context = (struct mlx4_en_rss_context *) ptr;
> + rss_context = ptr;
> rss_context->base_qpn = cpu_to_be32(ilog2(priv->rx_ring_num) << 24 |
> (rss_map->base_qpn));
> rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn);
> diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
> index b229acf..6e03de0 100644
> --- a/drivers/net/mlx4/en_tx.c
> +++ b/drivers/net/mlx4/en_tx.c
> @@ -238,8 +238,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
> } else {
> if (!tx_info->inl) {
> if ((void *) data >= end) {
> - data = (struct mlx4_wqe_data_seg *)
> - (ring->buf + ((void *) data - end));
> + data = ring->buf + ((void *)data - end);
> }
>
> if (tx_info->linear) {
> @@ -253,7 +252,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
> for (i = 0; i < frags; i++) {
> /* Check for wraparound before unmapping */
> if ((void *) data >= end)
> - data = (struct mlx4_wqe_data_seg *) ring->buf;
> + data = ring->buf;
> frag = &skb_shinfo(skb)->frags[i];
> pci_unmap_page(mdev->pdev,
> (dma_addr_t) be64_to_cpu(data->addr),
> diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
> index 53aeea4..0f4cb88 100644
> --- a/drivers/net/myri_sbus.c
> +++ b/drivers/net/myri_sbus.c
> @@ -1041,8 +1041,7 @@ static int __devinit myri_sbus_probe(struct platform_device *op)
>
> DET(("Shared memory base is %04x, ", mp->shmem_base));
>
> - mp->shmem = (struct myri_shmem __iomem *)
> - (mp->lanai + (mp->shmem_base * 2));
> + mp->shmem = mp->lanai + (mp->shmem_base * 2);
> DET(("shmem mapped at %p\n", mp->shmem));
>
> mp->rqack = &mp->shmem->channel.recvqa;
> diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
> index f16966a..a925392 100644
> --- a/drivers/net/netxen/netxen_nic_ctx.c
> +++ b/drivers/net/netxen/netxen_nic_ctx.c
> @@ -163,7 +163,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter)
> rq_size, &hostrq_phys_addr);
> if (addr == NULL)
> return -ENOMEM;
> - prq = (nx_hostrq_rx_ctx_t *)addr;
> + prq = addr;
>
> addr = pci_alloc_consistent(adapter->pdev,
> rsp_size, &cardrsp_phys_addr);
> @@ -171,7 +171,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto out_free_rq;
> }
> - prsp = (nx_cardrsp_rx_ctx_t *)addr;
> + prsp = addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr);
>
> @@ -318,10 +318,10 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter)
> }
>
> memset(rq_addr, 0, rq_size);
> - prq = (nx_hostrq_tx_ctx_t *)rq_addr;
> + prq = rq_addr;
>
> memset(rsp_addr, 0, rsp_size);
> - prsp = (nx_cardrsp_tx_ctx_t *)rsp_addr;
> + prsp = rsp_addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
>
> @@ -629,7 +629,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> }
>
> memset(addr, 0, sizeof(struct netxen_ring_ctx));
> - recv_ctx->hwctx = (struct netxen_ring_ctx *)addr;
> + recv_ctx->hwctx = addr;
> recv_ctx->hwctx->ctx_id = cpu_to_le32(port);
> recv_ctx->hwctx->cmd_consumer_offset =
> cpu_to_le64(recv_ctx->phys_addr +
> @@ -648,7 +648,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> goto err_out_free;
> }
>
> - tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
> + tx_ring->desc_head = addr;
>
> for (ring = 0; ring < adapter->max_rds_rings; ring++) {
> rds_ring = &recv_ctx->rds_rings[ring];
> @@ -662,7 +662,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - rds_ring->desc_head = (struct rcv_desc *)addr;
> + rds_ring->desc_head = addr;
>
> if (NX_IS_REVISION_P2(adapter->ahw.revision_id))
> rds_ring->crb_rcv_producer =
> @@ -683,7 +683,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - sds_ring->desc_head = (struct status_desc *)addr;
> + sds_ring->desc_head = addr;
>
> if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
> sds_ring->crb_sts_consumer =
> diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
> index 89f7540..abd1693 100644
> --- a/drivers/net/pxa168_eth.c
> +++ b/drivers/net/pxa168_eth.c
> @@ -502,7 +502,7 @@ static int add_del_hash_entry(struct pxa168_eth_private *pep,
> * Pick the appropriate table, start scanning for free/reusable
> * entries at the index obtained by hashing the specified MAC address
> */
> - start = (struct addr_table_entry *)(pep->htpr);
> + start = pep->htpr;
> entry = start + hash_function(mac_addr);
> for (i = 0; i < HOP_NUMBER; i++) {
> if (!(le32_to_cpu(entry->lo) & HASH_ENTRY_VALID)) {
> diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
> index 771bb61..2f69140 100644
> --- a/drivers/net/qla3xxx.c
> +++ b/drivers/net/qla3xxx.c
> @@ -2873,7 +2873,7 @@ static int ql_alloc_mem_resources(struct ql3_adapter *qdev)
> PAGE_SIZE, &qdev->shadow_reg_phy_addr);
>
> if (qdev->shadow_reg_virt_addr != NULL) {
> - qdev->preq_consumer_index = (u16 *) qdev->shadow_reg_virt_addr;
> + qdev->preq_consumer_index = qdev->shadow_reg_virt_addr;
> qdev->req_consumer_index_phy_addr_high =
> MS_64BITS(qdev->shadow_reg_phy_addr);
> qdev->req_consumer_index_phy_addr_low =
> @@ -3114,8 +3114,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
> qdev->small_buf_release_cnt = 8;
> qdev->lrg_buf_q_producer_index = qdev->num_lbufq_entries - 1;
> qdev->lrg_buf_release_cnt = 8;
> - qdev->lrg_buf_next_free =
> - (struct bufq_addr_element *)qdev->lrg_buf_q_virt_addr;
> + qdev->lrg_buf_next_free = qdev->lrg_buf_q_virt_addr;
> qdev->small_buf_index = 0;
> qdev->lrg_buf_index = 0;
> qdev->lrg_buf_free_count = 0;
> diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
> index bab041a..c77024f 100644
> --- a/drivers/net/qlcnic/qlcnic_ctx.c
> +++ b/drivers/net/qlcnic/qlcnic_ctx.c
> @@ -126,7 +126,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
> err = -EIO;
> goto error;
> }
> - tmp_tmpl = (struct qlcnic_dump_template_hdr *) tmp_addr;
> + tmp_tmpl = tmp_addr;
> csum = qlcnic_temp_checksum((uint32_t *) tmp_addr, temp_size);
> if (csum) {
> dev_err(&adapter->pdev->dev,
> @@ -139,7 +139,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
> err = -EIO;
> goto error;
> }
> - tmp_buf = (u32 *) tmp_addr;
> + tmp_buf = tmp_addr;
> template = (u32 *) ahw->fw_dump.tmpl_hdr;
> for (i = 0; i < temp_size/sizeof(u32); i++)
> *template++ = __le32_to_cpu(*tmp_buf++);
> @@ -214,7 +214,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
> &hostrq_phys_addr, GFP_KERNEL);
> if (addr == NULL)
> return -ENOMEM;
> - prq = (struct qlcnic_hostrq_rx_ctx *)addr;
> + prq = addr;
>
> addr = dma_alloc_coherent(&adapter->pdev->dev, rsp_size,
> &cardrsp_phys_addr, GFP_KERNEL);
> @@ -222,7 +222,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto out_free_rq;
> }
> - prsp = (struct qlcnic_cardrsp_rx_ctx *)addr;
> + prsp = addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr);
>
> @@ -380,10 +380,10 @@ qlcnic_fw_cmd_create_tx_ctx(struct qlcnic_adapter *adapter)
> }
>
> memset(rq_addr, 0, rq_size);
> - prq = (struct qlcnic_hostrq_tx_ctx *)rq_addr;
> + prq = rq_addr;
>
> memset(rsp_addr, 0, rsp_size);
> - prsp = (struct qlcnic_cardrsp_tx_ctx *)rsp_addr;
> + prsp = rsp_addr;
>
> prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
>
> @@ -493,7 +493,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> goto err_out_free;
> }
>
> - tx_ring->desc_head = (struct cmd_desc_type0 *)addr;
> + tx_ring->desc_head = addr;
>
> for (ring = 0; ring < adapter->max_rds_rings; ring++) {
> rds_ring = &recv_ctx->rds_rings[ring];
> @@ -506,7 +506,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - rds_ring->desc_head = (struct rcv_desc *)addr;
> + rds_ring->desc_head = addr;
>
> }
>
> @@ -522,7 +522,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
> err = -ENOMEM;
> goto err_out_free;
> }
> - sds_ring->desc_head = (struct status_desc *)addr;
> + sds_ring->desc_head = addr;
> }
>
> return 0;
> @@ -662,7 +662,7 @@ int qlcnic_get_nic_info(struct qlcnic_adapter *adapter,
> return -ENOMEM;
> memset(nic_info_addr, 0, nic_size);
>
> - nic_info = (struct qlcnic_info *) nic_info_addr;
> + nic_info = nic_info_addr;
> err = qlcnic_issue_cmd(adapter,
> adapter->ahw->pci_func,
> adapter->fw_hal_version,
> @@ -720,7 +720,7 @@ int qlcnic_set_nic_info(struct qlcnic_adapter *adapter, struct qlcnic_info *nic)
> return -ENOMEM;
>
> memset(nic_info_addr, 0, nic_size);
> - nic_info = (struct qlcnic_info *)nic_info_addr;
> + nic_info = nic_info_addr;
>
> nic_info->pci_func = cpu_to_le16(nic->pci_func);
> nic_info->op_mode = cpu_to_le16(nic->op_mode);
> @@ -769,7 +769,7 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter,
> return -ENOMEM;
> memset(pci_info_addr, 0, pci_size);
>
> - npar = (struct qlcnic_pci_info *) pci_info_addr;
> + npar = pci_info_addr;
> err = qlcnic_issue_cmd(adapter,
> adapter->ahw->pci_func,
> adapter->fw_hal_version,
> @@ -877,7 +877,7 @@ int qlcnic_get_port_stats(struct qlcnic_adapter *adapter, const u8 func,
> QLCNIC_CDRP_CMD_GET_ESWITCH_STATS);
>
> if (!err) {
> - stats = (struct __qlcnic_esw_statistics *)stats_addr;
> + stats = stats_addr;
> esw_stats->context_id = le16_to_cpu(stats->context_id);
> esw_stats->version = le16_to_cpu(stats->version);
> esw_stats->size = le16_to_cpu(stats->size);
> diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c
> index 9efc690..8ea8001 100644
> --- a/drivers/net/qlcnic/qlcnic_ethtool.c
> +++ b/drivers/net/qlcnic/qlcnic_ethtool.c
> @@ -996,7 +996,7 @@ qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
> /* Copy template header first */
> copy_sz = fw_dump->tmpl_hdr->size;
> hdr_ptr = (u32 *) fw_dump->tmpl_hdr;
> - data = (u32 *) buffer;
> + data = buffer;
> for (i = 0; i < copy_sz/sizeof(u32); i++)
> *data++ = cpu_to_le32(*hdr_ptr++);
>
> diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
> index e965661..ea0f11e 100644
> --- a/drivers/net/qlcnic/qlcnic_hw.c
> +++ b/drivers/net/qlcnic/qlcnic_hw.c
> @@ -1672,8 +1672,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
> tmpl_hdr->sys_info[1] = adapter->fw_version;
>
> for (i = 0; i < no_entries; i++) {
> - entry = (struct qlcnic_dump_entry *) ((void *) tmpl_hdr +
> - entry_offset);
> + entry = (void *)tmpl_hdr + entry_offset;
> if (!(entry->hdr.mask & tmpl_hdr->drv_cap_mask)) {
> entry->hdr.flags |= QLCNIC_DUMP_SKIP;
> entry_offset += entry->hdr.offset;
> diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
> index 3ab7d2c..0a6c1c9 100644
> --- a/drivers/net/qlcnic/qlcnic_main.c
> +++ b/drivers/net/qlcnic/qlcnic_main.c
> @@ -1861,7 +1861,7 @@ qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter)
> return;
>
> adapter->fhash.fmax = QLCNIC_LB_MAX_FILTERS;
> - adapter->fhash.fhead = (struct hlist_head *)head;
> + adapter->fhash.fhead = head;
>
> for (i = 0; i < adapter->fhash.fmax; i++)
> INIT_HLIST_HEAD(&adapter->fhash.fhead[i]);
> diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
> index 930ae45..be89610 100644
> --- a/drivers/net/qlge/qlge_main.c
> +++ b/drivers/net/qlge/qlge_main.c
> @@ -3096,7 +3096,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> if (rx_ring->lbq_len) {
> cqicb->flags |= FLAGS_LL; /* Load lbq values */
> tmp = (u64)rx_ring->lbq_base_dma;
> - base_indirect_ptr = (__le64 *) rx_ring->lbq_base_indirect;
> + base_indirect_ptr = rx_ring->lbq_base_indirect;
> page_entries = 0;
> do {
> *base_indirect_ptr = cpu_to_le64(tmp);
> @@ -3120,7 +3120,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> if (rx_ring->sbq_len) {
> cqicb->flags |= FLAGS_LS; /* Load sbq values */
> tmp = (u64)rx_ring->sbq_base_dma;
> - base_indirect_ptr = (__le64 *) rx_ring->sbq_base_indirect;
> + base_indirect_ptr = rx_ring->sbq_base_indirect;
> page_entries = 0;
> do {
> *base_indirect_ptr = cpu_to_le64(tmp);
> diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
> index df0d2c8..f4d80f9 100644
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -841,7 +841,7 @@ static int init_shared_mem(struct s2io_nic *nic)
> tmp_p_addr = ring->rx_blocks[j].block_dma_addr;
> tmp_p_addr_next = ring->rx_blocks[next].block_dma_addr;
>
> - pre_rxd_blk = (struct RxD_block *)tmp_v_addr;
> + pre_rxd_blk = tmp_v_addr;
> pre_rxd_blk->reserved_2_pNext_RxD_block =
> (unsigned long)tmp_v_addr_next;
> pre_rxd_blk->pNext_RxD_Blk_physical =
> @@ -918,7 +918,7 @@ static int init_shared_mem(struct s2io_nic *nic)
> mac_control->stats_mem_sz = size;
>
> tmp_v_addr = mac_control->stats_mem;
> - mac_control->stats_info = (struct stat_block *)tmp_v_addr;
> + mac_control->stats_info = tmp_v_addr;
> memset(tmp_v_addr, 0, size);
> DBG_PRINT(INIT_DBG, "%s: Ring Mem PHY: 0x%llx\n",
> dev_name(&nic->pdev->dev), (unsigned long long)tmp_p_addr);
> @@ -2439,7 +2439,7 @@ static void free_tx_buffers(struct s2io_nic *nic)
>
> spin_lock_irqsave(&fifo->tx_lock, flags);
> for (j = 0; j < tx_cfg->fifo_len; j++) {
> - txdp = (struct TxD *)fifo->list_info[j].list_virt_addr;
> + txdp = fifo->list_info[j].list_virt_addr;
> skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j);
> if (skb) {
> swstats->mem_freed += skb->truesize;
> @@ -3075,8 +3075,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
>
> get_info = fifo_data->tx_curr_get_info;
> memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info));
> - txdlp = (struct TxD *)
> - fifo_data->list_info[get_info.offset].list_virt_addr;
> + txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
> while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&
> (get_info.offset != put_info.offset) &&
> (txdlp->Host_Control)) {
> @@ -3129,8 +3128,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
> get_info.offset++;
> if (get_info.offset == get_info.fifo_len + 1)
> get_info.offset = 0;
> - txdlp = (struct TxD *)
> - fifo_data->list_info[get_info.offset].list_virt_addr;
> + txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
> fifo_data->tx_curr_get_info.offset = get_info.offset;
> }
>
> @@ -4163,7 +4161,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
>
> put_off = (u16)fifo->tx_curr_put_info.offset;
> get_off = (u16)fifo->tx_curr_get_info.offset;
> - txdp = (struct TxD *)fifo->list_info[put_off].list_virt_addr;
> + txdp = fifo->list_info[put_off].list_virt_addr;
>
> queue_len = fifo->tx_curr_put_info.fifo_len + 1;
> /* Avoid "put" pointer going beyond "get" pointer */
> @@ -7972,9 +7970,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
>
> /* Initializing the BAR1 address as the start of the FIFO pointer. */
> for (j = 0; j < MAX_TX_FIFOS; j++) {
> - mac_control->tx_FIFO_start[j] =
> - (struct TxFIFO_element __iomem *)
> - (sp->bar1 + (j * 0x00020000));
> + mac_control->tx_FIFO_start[j] = sp->bar1 + (j * 0x00020000);
> }
>
> /* Driver entry points */
> diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
> index fb4721f..a66818e 100644
> --- a/drivers/net/sfc/siena.c
> +++ b/drivers/net/sfc/siena.c
> @@ -400,7 +400,7 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)
> u64 generation_end;
>
> mac_stats = &efx->mac_stats;
> - dma_stats = (u64 *)efx->stats_buffer.addr;
> + dma_stats = efx->stats_buffer.addr;
>
> generation_end = dma_stats[MC_CMD_MAC_GENERATION_END];
> if (generation_end == STATS_GENERATION_INVALID)
> diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
> index 484f795..658a192 100644
> --- a/drivers/net/sis900.c
> +++ b/drivers/net/sis900.c
> @@ -482,7 +482,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> ret = -ENOMEM;
> goto err_out_cleardev;
> }
> - sis_priv->tx_ring = (BufferDesc *)ring_space;
> + sis_priv->tx_ring = ring_space;
> sis_priv->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pci_dev, RX_TOTAL_SIZE, &ring_dma);
> @@ -490,7 +490,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> ret = -ENOMEM;
> goto err_unmap_tx;
> }
> - sis_priv->rx_ring = (BufferDesc *)ring_space;
> + sis_priv->rx_ring = ring_space;
> sis_priv->rx_ring_dma = ring_dma;
>
> /* The SiS900-specific entries in the device structure. */
> diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
> index 2bedc0a..6153cfd 100644
> --- a/drivers/net/tokenring/madgemc.c
> +++ b/drivers/net/tokenring/madgemc.c
> @@ -418,7 +418,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
> return IRQ_NONE;
> }
>
> - dev = (struct net_device *)dev_id;
> + dev = dev_id;
>
> /* Make sure its really us. -- the Madge way */
> pending = inb(dev->base_addr + MC_CONTROL_REG0);
> diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
> index 3de4283..1d5091a 100644
> --- a/drivers/net/typhoon.c
> +++ b/drivers/net/typhoon.c
> @@ -2367,7 +2367,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> dev->irq = pdev->irq;
> tp = netdev_priv(dev);
> - tp->shared = (struct typhoon_shared *) shared;
> + tp->shared = shared;
> tp->shared_dma = shared_dma;
> tp->pdev = pdev;
> tp->tx_pdev = pdev;
> diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
> index 32763b2..857618a 100644
> --- a/drivers/net/vxge/vxge-config.c
> +++ b/drivers/net/vxge/vxge-config.c
> @@ -582,7 +582,7 @@ __vxge_hw_device_toc_get(void __iomem *bar0)
> goto exit;
>
> val64 = readq(&legacy_reg->toc_first_pointer);
> - toc = (struct vxge_hw_toc_reg __iomem *)(bar0+val64);
> + toc = bar0 + val64;
> exit:
> return toc;
> }
> @@ -600,7 +600,7 @@ __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
> u32 i;
> enum vxge_hw_status status = VXGE_HW_OK;
>
> - hldev->legacy_reg = (struct vxge_hw_legacy_reg __iomem *)hldev->bar0;
> + hldev->legacy_reg = hldev->bar0;
>
> hldev->toc_reg = __vxge_hw_device_toc_get(hldev->bar0);
> if (hldev->toc_reg == NULL) {
> @@ -609,39 +609,31 @@ __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
> }
>
> val64 = readq(&hldev->toc_reg->toc_common_pointer);
> - hldev->common_reg =
> - (struct vxge_hw_common_reg __iomem *)(hldev->bar0 + val64);
> + hldev->common_reg = hldev->bar0 + val64;
>
> val64 = readq(&hldev->toc_reg->toc_mrpcim_pointer);
> - hldev->mrpcim_reg =
> - (struct vxge_hw_mrpcim_reg __iomem *)(hldev->bar0 + val64);
> + hldev->mrpcim_reg = hldev->bar0 + val64;
>
> for (i = 0; i < VXGE_HW_TITAN_SRPCIM_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_srpcim_pointer[i]);
> - hldev->srpcim_reg[i] =
> - (struct vxge_hw_srpcim_reg __iomem *)
> - (hldev->bar0 + val64);
> + hldev->srpcim_reg[i] = hldev->bar0 + val64;
> }
>
> for (i = 0; i < VXGE_HW_TITAN_VPMGMT_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_vpmgmt_pointer[i]);
> - hldev->vpmgmt_reg[i] =
> - (struct vxge_hw_vpmgmt_reg __iomem *)(hldev->bar0 + val64);
> + hldev->vpmgmt_reg[i] = hldev->bar0 + val64;
> }
>
> for (i = 0; i < VXGE_HW_TITAN_VPATH_REG_SPACES; i++) {
> val64 = readq(&hldev->toc_reg->toc_vpath_pointer[i]);
> - hldev->vpath_reg[i] =
> - (struct vxge_hw_vpath_reg __iomem *)
> - (hldev->bar0 + val64);
> + hldev->vpath_reg[i] = hldev->bar0 + val64;
> }
>
> val64 = readq(&hldev->toc_reg->toc_kdfc);
>
> switch (VXGE_HW_TOC_GET_KDFC_INITIAL_BIR(val64)) {
> case 0:
> - hldev->kdfc = (u8 __iomem *)(hldev->bar0 +
> - VXGE_HW_TOC_GET_KDFC_INITIAL_OFFSET(val64));
> + hldev->kdfc = hldev->bar0 + VXGE_HW_TOC_GET_KDFC_INITIAL_OFFSET(val64) ;
> break;
> default:
> break;
> @@ -1024,7 +1016,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> }
>
> val64 = readq(&toc->toc_common_pointer);
> - common_reg = (struct vxge_hw_common_reg __iomem *)(bar0 + val64);
> + common_reg = bar0 + val64;
>
> status = __vxge_hw_device_vpath_reset_in_prog_check(
> (u64 __iomem *)&common_reg->vpath_rst_in_prog);
> @@ -1044,8 +1036,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
>
> val64 = readq(&toc->toc_vpmgmt_pointer[i]);
>
> - vpmgmt_reg = (struct vxge_hw_vpmgmt_reg __iomem *)
> - (bar0 + val64);
> + vpmgmt_reg = bar0 + val64;
>
> hw_info->func_id = __vxge_hw_vpath_func_id_get(vpmgmt_reg);
> if (__vxge_hw_device_access_rights_get(hw_info->host_type,
> @@ -1054,8 +1045,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
>
> val64 = readq(&toc->toc_mrpcim_pointer);
>
> - mrpcim_reg = (struct vxge_hw_mrpcim_reg __iomem *)
> - (bar0 + val64);
> + mrpcim_reg = bar0 + val64;
>
> writeq(0, &mrpcim_reg->xgmac_gen_fw_memo_mask);
> wmb();
> @@ -1064,8 +1054,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> val64 = readq(&toc->toc_vpath_pointer[i]);
>
> spin_lock_init(&vpath.lock);
> - vpath.vp_reg = (struct vxge_hw_vpath_reg __iomem *)
> - (bar0 + val64);
> + vpath.vp_reg = bar0 + val64;
> vpath.vp_open = VXGE_HW_VP_NOT_OPEN;
>
> status = __vxge_hw_vpath_pci_func_mode_get(&vpath, hw_info);
> @@ -1088,8 +1077,7 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
> continue;
>
> val64 = readq(&toc->toc_vpath_pointer[i]);
> - vpath.vp_reg = (struct vxge_hw_vpath_reg __iomem *)
> - (bar0 + val64);
> + vpath.vp_reg = bar0 + val64;
> vpath.vp_open = VXGE_HW_VP_NOT_OPEN;
>
> status = __vxge_hw_vpath_addr_get(&vpath,
> @@ -2140,8 +2128,7 @@ __vxge_hw_ring_mempool_item_alloc(struct vxge_hw_mempool *mempoolh,
> memblock_index, item,
> &memblock_item_idx);
>
> - rxdp = (struct vxge_hw_ring_rxd_1 *)
> - ring->channel.reserve_arr[reserve_index];
> + rxdp = ring->channel.reserve_arr[reserve_index];
>
> uld_priv = ((u8 *)rxdblock_priv + ring->rxd_priv_size * i);
>
> @@ -4880,8 +4867,7 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
> goto vpath_open_exit8;
> }
>
> - vpath->hw_stats = (struct vxge_hw_vpath_stats_hw_info *)vpath->
> - stats_block->memblock;
> + vpath->hw_stats = vpath->stats_block->memblock;
> memset(vpath->hw_stats, 0,
> sizeof(struct vxge_hw_vpath_stats_hw_info));
>
> diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c
> index f935170..ad64ce0 100644
> --- a/drivers/net/vxge/vxge-traffic.c
> +++ b/drivers/net/vxge/vxge-traffic.c
> @@ -1309,7 +1309,7 @@ enum vxge_hw_status vxge_hw_ring_rxd_next_completed(
>
> vxge_hw_channel_dtr_try_complete(channel, rxdh);
>
> - rxdp = (struct vxge_hw_ring_rxd_1 *)*rxdh;
> + rxdp = *rxdh;
> if (rxdp == NULL) {
> status = VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS;
> goto exit;
> @@ -1565,7 +1565,7 @@ void vxge_hw_fifo_txdl_post(struct __vxge_hw_fifo *fifo, void *txdlh)
> channel = &fifo->channel;
>
> txdl_priv = __vxge_hw_fifo_txdl_priv(fifo, txdlh);
> - txdp_first = (struct vxge_hw_fifo_txd *)txdlh;
> + txdp_first = txdlh;
>
> txdp_last = (struct vxge_hw_fifo_txd *)txdlh + (txdl_priv->frags - 1);
> txdp_last->control_0 |=
> @@ -1631,7 +1631,7 @@ enum vxge_hw_status vxge_hw_fifo_txdl_next_completed(
>
> vxge_hw_channel_dtr_try_complete(channel, txdlh);
>
> - txdp = (struct vxge_hw_fifo_txd *)*txdlh;
> + txdp = *txdlh;
> if (txdp == NULL) {
> status = VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS;
> goto exit;
Thanks so much!
Acked-by: Jon Mason <jdmason@kudzu.us>
> diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
> index 1c65d1c..850fc84 100644
> --- a/drivers/net/wan/pc300_tty.c
> +++ b/drivers/net/wan/pc300_tty.c
> @@ -755,7 +755,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
>
> dsr_rx = cpc_readb(card->hw.scabase + DSR_RX(ch));
>
> - cpc_tty = (st_cpc_tty_area *)pc300dev->cpc_tty;
> + cpc_tty = pc300dev->cpc_tty;
>
> while (1) {
> rx_len = 0;
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 9cb4cdc..bbb8c65 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -252,11 +252,11 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
> u16 *from_u16_ptr, *to_u16_ptr;
>
> to_u32_ptr = dest_ptr;
> - from_u16_ptr = (u16 *) src_ptr;
> + from_u16_ptr = src_ptr;
> align_buffer = 0;
>
> for (; length > 3; length -= 4) {
> - to_u16_ptr = (u16 *) ((void *) &align_buffer);
> + to_u16_ptr = (u16 *)&align_buffer;
> *to_u16_ptr++ = *from_u16_ptr++;
> *to_u16_ptr++ = *from_u16_ptr++;
>
> diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
> index ec47e22..3e5ac60 100644
> --- a/drivers/net/yellowfin.c
> +++ b/drivers/net/yellowfin.c
> @@ -442,19 +442,19 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
> ring_space = pci_alloc_consistent(pdev, TX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_cleardev;
> - np->tx_ring = (struct yellowfin_desc *)ring_space;
> + np->tx_ring = ring_space;
> np->tx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, RX_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_tx;
> - np->rx_ring = (struct yellowfin_desc *)ring_space;
> + np->rx_ring = ring_space;
> np->rx_ring_dma = ring_dma;
>
> ring_space = pci_alloc_consistent(pdev, STATUS_TOTAL_SIZE, &ring_dma);
> if (!ring_space)
> goto err_out_unmap_rx;
> - np->tx_status = (struct tx_status_words *)ring_space;
> + np->tx_status = ring_space;
> np->tx_status_dma = ring_dma;
>
> if (dev->mem_start)
> --
> 1.7.6.rc0
>
>
^ permalink raw reply
* Re: [PATCH] slob: push the min alignment to long long
From: Matt Mackall @ 2011-06-16 15:23 UTC (permalink / raw)
To: Pekka Enberg; +Cc: David Miller, sebastian, cl, linux-mm, netfilter
In-Reply-To: <BANLkTikOM6=fWnUA1bNZOM-jwg=o=CL8Ug@mail.gmail.com>
On Thu, 2011-06-16 at 09:59 +0300, Pekka Enberg wrote:
> On Thu, Jun 16, 2011 at 1:53 AM, Matt Mackall <mpm@selenic.com> wrote:
> >> Blink... because the compiler doesn't provide a portable way to
> >> do this, right? :-)
> >
> > Because I, on x86, cannot deduce the alignment requirements of, say,
> > CRIS without doing significant research. So answering a question like
> > "are there any architectures where assumption X fails" is obnoxiously
> > hard, rather than being a grep.
> >
> > I also don't think it's a given there's a portable way to deduce the
> > alignment requirements due to the existence of arch-specific quirks. If
> > an arch wants to kmalloc its weird crypto or SIMD context and those want
> > 128-bit alignment, we're not going to want to embed that knowledge in
> > the generic code, but instead tweak an arch define.
> >
> > Also note that not having generic defaults forces each new architectures
> > to (nominally) examine each assumption rather than discover they
> > inherited an incorrect default somewhere down the road.
>
> I don't agree. I think we should either provide defaults that work for
> everyone and let architectures override them (which AFAICT Christoph's
> patch does) or we flat out #error if architectures don't specify
> alignment requirements.
Uh, isn't the latter precisely what I say above?
> The current solution seems to be the worst one
> from practical point of view.
Good, because no one's advocating for it.
> This doesn't seem to be a *regression* per se so I'll queue
> Christoph's patch for 3.1 and mark it for 3.0-stable.
> Pekka
--
Mathematics is the supreme nostalgia of our time.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH] omap3: pm: Downgrade WARN for no wakeup source
From: Kevin Hilman @ 2011-06-16 15:22 UTC (permalink / raw)
To: Sanjeev Premi; +Cc: linux-omap, linux-arm-kernel
In-Reply-To: <1308229940-27025-1-git-send-email-premi@ti.com>
Hi Sanjeev,
Sanjeev Premi <premi@ti.com> writes:
> When multiple wakeup sources are defined in a system,
> there is a small window, when more than one source
> can trigger wakeup interrupt.
>
> In the current implementation, the do-while() loop
> can handle all wakeup sources that are recorded when
> probing the status register in prcm_interrupt_handler().
>
> When the ISR executes due to next queued wakeup, it
> there is nothing to be handled and value of "c" is 0.
Thanks for tracking this one down.
However, It's still not clear to me what is happening here.
Why is the IRQ firing if there is nothing to be handled? That suggests
to me that the IRQ status is not properly being cleared.
Kevin
^ permalink raw reply
* [PATCH] omap3: pm: Downgrade WARN for no wakeup source
From: Kevin Hilman @ 2011-06-16 15:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1308229940-27025-1-git-send-email-premi@ti.com>
Hi Sanjeev,
Sanjeev Premi <premi@ti.com> writes:
> When multiple wakeup sources are defined in a system,
> there is a small window, when more than one source
> can trigger wakeup interrupt.
>
> In the current implementation, the do-while() loop
> can handle all wakeup sources that are recorded when
> probing the status register in prcm_interrupt_handler().
>
> When the ISR executes due to next queued wakeup, it
> there is nothing to be handled and value of "c" is 0.
Thanks for tracking this one down.
However, It's still not clear to me what is happening here.
Why is the IRQ firing if there is nothing to be handled? That suggests
to me that the IRQ status is not properly being cleared.
Kevin
^ permalink raw reply
* Re: [PATCH] Introduce ActivePid: in /proc/self/status (v2, was Vpid:)
From: Eric W. Biederman @ 2011-06-16 15:22 UTC (permalink / raw)
To: Cedric Le Goater
Cc: Oleg Nesterov, Greg Kurz, linux-kernel, containers, akpm, xemul
In-Reply-To: <4DFA126D.9060102@fr.ibm.com>
Cedric Le Goater <clg@fr.ibm.com> writes:
> On 06/16/2011 03:06 PM, Oleg Nesterov wrote:
>> On 06/16, Cedric Le Goater wrote:
>>>
>>> We have a case where a task in a parent pid namespace needs to kill
>>> another task in a sub pid namespace only knowing its internal pid.
>>> the latter has been communicated to the parent task through a file or
>>> a unix socket.
>>
>> OK, thanks, this partly answers my question... But if they communicate
>> anyway, it is not clear why the signal is needed.
>
> Well, user space always finds ways to challenge the kernel.
>
> Our case is related to HPC. The batch manager runs jobs inside lxc
> containers (using namespaces) and signals are sent to the application
> for different reasons. First, to cleanly exit but also for other more
> specific actions related to the cluster interconnects.
In that case I really recommend unix domain sockets. You likely
won't need a kernel upgrade to make use of those and their pid
translation ability.
>>> a new kill syscall could be the solution:
>>>
>>> int pidns_kill(pid_t init_pid, pid_t some_pid);
>>>
>>> where 'init_pid' identifies the namespace and 'some_pid' identifies
>>> a task in this namespace. this is very specific but why not.
>>
>> Yes, I also thought about this. Should be trivial.
>>
>> Or int sys_tell_me_its_pid(pid_t init_pid, pid_t some_pid).
>
> why not. it's even better because more general.
If we get as far as a new system call (and I don't think any of this
needs a new system call) we really should use a namespace file
descriptor to identify the pid namespace not a pid.
>> Just in case.... This is hack, yes, but in fact you do not need the
>> kernel changes to send a signal inside the namespace. You could
>> ptrace sub_init, and execute the necessary code "inside" the namespace.
>
> hmm, I look at that.
Looking at the ptrace interactions are definitely worthwhile.
I remember there were a few very weird things with pids when ptracing
a process in another pid namespace. It may be that ActivePid is enough
to allow the tracer to figure out the confusing information it is
getting.
I would be surprised if using ptrace to send signals is how you
want to do things. It works, and it is a great argument from
a security perspective on allowing things that we already allow.
Using ptrace to run system calls was cumbersome and not easily
portable across architectures last time I looked.
Eric
^ permalink raw reply
* Re: Dynamic patching in discarded sections
From: Arnd Bergmann @ 2011-06-16 15:21 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Nicolas Pitre, Russell King - ARM Linux, lkml, dave.martin
In-Reply-To: <alpine.LFD.2.00.1106080946000.2142@xanadu.home>
On Wednesday 08 June 2011, Nicolas Pitre wrote:
> Dave Martin proposed an extension to gas here (also sent to
> binutils@sourceware.org):
>
> http://article.gmane.org/gmane.linux.linaro.toolchain/701
>
> But as far as I know, nothing further happened. And this is not an ARM
> specific issue either as the X86 alternates have the same problem.
Ah, yes. That would be really nice to have. Dave, do you still have hopes
that this patch gets merged?
> > I don't know if the same problem exists in other places in the code, but it's
> > entirely possible. I also couldn't think of a good solution for this, short of
> > moving the definition of dma_unmap_single() to out of line code.
>
> Probably the best interim solution would be:
>
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index dfbb377..f231c92 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -21,7 +21,8 @@
> #define ARM_CPU_KEEP(x)
> #endif
>
> -#if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)
> +#if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
> + defined(CONFIG_ARM_PATCH_PHYS_VIRT)
> #define ARM_EXIT_KEEP(x) x
> #else
> #define ARM_EXIT_KEEP(x)
>
> But clearly the toolchain should be more accommodating instead.
>
10000 randconfig kernel build later without that patch, I'm rather sure
that there is only a single driver that is suffering from this. While your
patch absolutely makes sense, a less invasive workaround would be to just
not mark mmc_spi_remove as __devexit until Dave's patch gets in.
Arnd
^ permalink raw reply
* Dynamic patching in discarded sections
From: Arnd Bergmann @ 2011-06-16 15:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.00.1106080946000.2142@xanadu.home>
On Wednesday 08 June 2011, Nicolas Pitre wrote:
> Dave Martin proposed an extension to gas here (also sent to
> binutils at sourceware.org):
>
> http://article.gmane.org/gmane.linux.linaro.toolchain/701
>
> But as far as I know, nothing further happened. And this is not an ARM
> specific issue either as the X86 alternates have the same problem.
Ah, yes. That would be really nice to have. Dave, do you still have hopes
that this patch gets merged?
> > I don't know if the same problem exists in other places in the code, but it's
> > entirely possible. I also couldn't think of a good solution for this, short of
> > moving the definition of dma_unmap_single() to out of line code.
>
> Probably the best interim solution would be:
>
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index dfbb377..f231c92 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -21,7 +21,8 @@
> #define ARM_CPU_KEEP(x)
> #endif
>
> -#if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)
> +#if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
> + defined(CONFIG_ARM_PATCH_PHYS_VIRT)
> #define ARM_EXIT_KEEP(x) x
> #else
> #define ARM_EXIT_KEEP(x)
>
> But clearly the toolchain should be more accommodating instead.
>
10000 randconfig kernel build later without that patch, I'm rather sure
that there is only a single driver that is suffering from this. While your
patch absolutely makes sense, a less invasive workaround would be to just
not mark mmc_spi_remove as __devexit until Dave's patch gets in.
Arnd
^ permalink raw reply
* Re: [PATCH 1/4] netfilter: xtables: move ipt_ecn to xt_ecn
From: Patrick McHardy @ 2011-06-16 15:21 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
In-Reply-To: <1307651037-20520-2-git-send-email-jengelh@medozas.de>
On 09.06.2011 22:23, Jan Engelhardt wrote:
> --- a/net/ipv4/netfilter/Kconfig
> +++ b/net/ipv4/netfilter/Kconfig
> @@ -76,11 +76,11 @@ config IP_NF_MATCH_AH
> config IP_NF_MATCH_ECN
> tristate '"ecn" match support'
> depends on NETFILTER_ADVANCED
> - help
> - This option adds a `ECN' match, which allows you to match against
> - the IPv4 and TCP header ECN fields.
> -
> - To compile it as a module, choose M here. If unsure, say N.
> + select NETFILTER_XT_MATCH_ECN
> + ---help---
> + This is a backwards-compat option for the user's convenience
> + (e.g. when running oldconfig). It selects
> + CONFIG_NETFILTER_XT_MATCH_ECN.
>
Did this work? I've tried myself, but it would still show the new
option.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.