Netdev List
 help / color / mirror / Atom feed
* [PATCH 11/11] vxge: update driver version
From: Jon Mason @ 2010-11-04 22:52 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Sivakumar Subramani, Sreenivasa Honnur, Ram Vepa
In-Reply-To: <1288911122-28669-1-git-send-email-jon.mason@exar.com>

Update vxge driver version

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
---
 drivers/net/vxge/vxge-version.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vxge/vxge-version.h b/drivers/net/vxge/vxge-version.h
index b4eced1..f05bb2f 100644
--- a/drivers/net/vxge/vxge-version.h
+++ b/drivers/net/vxge/vxge-version.h
@@ -16,8 +16,8 @@
 
 #define VXGE_VERSION_MAJOR	"2"
 #define VXGE_VERSION_MINOR	"0"
-#define VXGE_VERSION_FIX	"9"
-#define VXGE_VERSION_BUILD	"20840"
+#define VXGE_VERSION_FIX	"10"
+#define VXGE_VERSION_BUILD	"21808"
 #define VXGE_VERSION_FOR	"k"
 
 #define VXGE_FW_VER(maj, min, bld) (((maj) << 16) + ((min) << 8) + (bld))
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCH] mac80211: Remove redundant checks for NULL before calls to crypto_free_cipher()
From: Julian Calaby @ 2010-11-04 23:25 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, John W. Linville, Johannes Berg, David S. Miller,
	linux-wireless, netdev
In-Reply-To: <alpine.LNX.2.00.1011042251520.16015@swampdragon.chaosbits.net>

On Fri, Nov 5, 2010 at 08:59, Jesper Juhl <jj@chaosbits.net> wrote:
> Hello,
>
> crypto_free_cipher() is a wrapper around crypto_free_tfm() which is a
> wrapper around crypto_destroy_tfm() and the latter can handle being passed
> a NULL pointer, so checking for NULL in the
> ieee80211_aes_key_free()/ieee80211_aes_cmac_key_free() wrappers around
> crypto_free_cipher() is pointless and just increase object code size
> needlesly and makes us execute extra test/branch instructions that we
> don't need.
> Btw; don't we have to many wrappers around wrappers ad nauseam here?

They do serve a documentation purpose: Maybe some of them could be
turned into static inline functions or something so the compiler
optimises them away.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply

* Re: [PATCH 0/15] RFC: create drivers/net/legacy for ISA, EISA, MCA drivers
From: Jeff Kirsher @ 2010-11-05  2:28 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: Joe Perches, davem@davemloft.net, netdev@vger.kernel.org
In-Reply-To: <4CD323AF.20609@windriver.com>

On Thu, Nov 4, 2010 at 14:20, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> On 10-10-29 08:01 PM, Jeff Kirsher wrote:
>> On Fri, 2010-10-29 at 15:08 -0700, Joe Perches wrote:
>>> On Fri, 2010-10-29 at 17:26 -0400, Paul Gortmaker wrote:
>>>> On 10-10-28 09:48 PM, Joe Perches wrote:
>>>>> On Thu, 2010-10-28 at 21:19 -0400, Paul Gortmaker wrote:
>>>>>> The drivers/net dir has a lot of files - originally there were
>>>>>> no subdirs, but at least now subdirs are being used effectively.
>>>>>> But the original drivers from 10+ years ago are still right
>>>>>> there at the top.  This series creates a drivers/net/legacy dir.
>>>>> I like this idea.
>>>>> I suggest a bit of a further grouping by using a
>>>>> drivers/net/ethernet directory and putting those
>>>>> legacy drivers in a new subdirectory
>>>>> drivers/net/ethernet/legacy.
>>>> That is a substantially larger change, since you'd now be
>>>> relocating nearly every remaining driver, i.e. all the
>>>> relatively modern 100M and GigE drivers.
>>>
>>
>> I am not particularly a fan of making a "legacy" directory and moving
>> old drivers into it.  Just because this is very subjective, if you say
>> "drivers which are X years old and not used much" is vague and depending
>> on who you ask would get varying results.  But if you were to were to
>> define legacy as all ISA, EISA and MCA drivers (not based on their use)
>> would be better.
>
> I think that being subjective can be an advantage.  There may
> be some debate on whether X is legacy or not, but I see no harm
> in that.  On the other hand, I see binding ourselves to concrete
> inflexible rules as a disadvantage.
>

I am not disagreeing that we need to be flexible, and to organize the
directory structure in a logical way does not equate to "concrete and
inflexible".

I brought the topic of organizing the /drivers/net directory up at
NetConf/Plumbers and here is what came about the discussion...

Joe and I are working to organize the drivers into
/drivers/net/<technology> directories and to cleanup the Kconfig to
reflect the organization.  Ethernet drivers will be in
/drivers/net/ethernet, and so on.  I brought up your suggestion to
making a "legacy" directory and those present did not like the idea.
In short, there is no advantage to this type of organization and
having the drivers reside in their current location or in the model of
/drivers/net/<technology> does not cause any problems

> For example, look at the sister directory, drivers/serial -- the
> venerable 8250 UART continues to support ISA-like mapped 0x3f8/0x2f8
> PIO devices such as those on the ISA MultiIO/IDE cards first appearing
> in 80286 computers.  But we probably don't want to shuffle that off to
> a legacy dir, given that nearly every embedded CPU manufacturer has a
> SoC 8250 UART implementation of their own, and it remains in high use.
>
>>
>> But if a legacy directory was to be made, I like Joe's suggestion of
>> drivers/net/ethernet/legacy.
>
> If we extend that to being a rule, i.e. drivers/net/*/legacy
> then we'd implicitly be advocating creation of things like:
>
>        drivers/net/tokenring/legacy
>        drivers/net/arcnet/legacy
>
> Yes, I do imagine you aren't suggesting we do that.  :)
>
>>
>>> Files to not need immediate renames.
>>>
>>> Renames could happen when the appropriate maintainer
>>> wants to or gets coerced to conform to some new
>>> file layout standard.
>>>
>>> I had submitted a related RFC patch:
>>>
>>> https://patchwork.kernel.org/patch/244641/
>>>
>>> and then had some off list discussions
>>> with Jeff Kirsher from Intel.
>>>
>>> Perhaps Jeff will chime in.
>>>
>>>> Plus what do you
>>>> do with the sb1000 - create drivers/cablemodem/legacy
>>>> just for one file?
>>>
>>> I never looked at that particular driver before.
>>> Maybe.  I don't have a strong opinion.  Leaving
>>> it where it is might be OK.
>>>
>>>> Or the ethernet drivers already in
>>>> existing subdirs, like arm and pcmcia -- do we move those?
>>>
>>> Maybe.  If there's no demand, there's no absolute need to
>>> move it at all.  I think a reasonable goal is to have some
>>> sensible and consistent file layout scheme though.
>>>
>>> There are arch specific directories under various drivers/...
>>> so I don't see a need to move directories like drivers/net/arm
>>> or drivers/s390.
>>
>> I agree with Joe.
>
> I don't think there is any disagreement here on this point.
> Moving stuff that is already in an appropriate subdir was
> never part of what I was proposing with drivers/legacy.
>
> But if we create subdirs with concrete definitions, then
> people will most likely be expecting all drivers that match
> to be in that specific subdir.

Correct, although I would use "logical organization" versus "concrete
definitions" and we are working on patches to do the clean up so that
Ethernet drivers are under /drivers/net/ethernet/*, as well as the
other technologies.  For the drivers like vlan, 8021q, bridging, etc
we will place those in /drivers/net/sw/.  That is the plan at least...

>
>>
>>>
>>>> With this, I tried to aim for a significant gain (close to 1/3
>>>> less files) within what I felt was a reasonable sized change
>>>> set that had a chance of getting an overall OK from folks.
>>>> Giant "flag-day" type mammoth changesets are a PITA for all.
>>>
>>> I believe there's no need for a flag-day.
>>> File renames could happen gradually or not at all.
>>>
>>>
>>
>> Again I agree with Joe.
>
> Sure, renames can be async, and driven by the individual
> maintainers of the files, but typically when conversion
> like events are left open ended (timewise) they tend
> to drag on for longer times than necessary.  At least in
> my experience.  If I had sent the RFC with one patch that
> amounted to a "mkdir", and no actual file moves, I wouldn't
> have expected much other than a bagful of scorn in return. :)
> Putting it to use and showing a real cleanup is where the
> value became really apparent, I think.
>

We are hoping not to drag this out and plan on getting this into
2.6.38 (net-next) within the couple of weeks.

> In any case, I still think this is worthwhile, and in the
> absence of an alternate proposal that gets a higher level
> of universal agreement, I'm hoping we can still do this.
> I've got a follow on commit ready that factors a lot of
> the legacy related probe code out of Space.c too.
>
> Regardless of which way it goes, thanks for the feedback.
> Paul.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Cheers,
Jeff

^ permalink raw reply

* Re: [PATCH 1/1] UDEV - Add 'udevlom' command line param to start_udev
From: Matt Domsch @ 2010-11-05  2:58 UTC (permalink / raw)
  To: Greg KH
  Cc: K, Narendra, linux-hotplug@vger.kernel.org,
	netdev@vger.kernel.org, Hargrave, Jordan, Rose, Charles
In-Reply-To: <20101103180500.GA7441@kroah.com>

On Wed, Nov 03, 2010 at 11:05:00AM -0700, Greg KH wrote:
> On Wed, Nov 03, 2010 at 10:25:25PM +0530, Narendra_K@Dell.com wrote:
> > Hello,
> > 
> > This patch allows users to specify if they want the onboard network
> > interfaces to be renamed to lomN by implementing a command line param
> > 'udevlom'.
> 
> Ick ick ick.
> 
> Why not do this in some other configuration file?  Don't rely on udev
> being started with a different option, that is only ripe for abuse by
> everyone else who wants their pet-project to get into the udev
> environment.
> 
> Please, surely there's a different way to do this.

At Linux Plumbers Conference today, this problem space was discussed
once again, and I believe concensus on approach was reached.  Here
goes:

* If a 70-persistent-net.rules file sets a name, honor that.  This
  preserves existing installs.

* If BIOS provides indexes for onboard devices, honor that.
** Rename onboard NICs "lom[1-N]" as BIOS reports (# matches chassis labels)
** No rename for all others "ethX" (no change for NICs in PCI slots/USB/others)

* If neither are true, do not rename at all.

* Implementation will be:
** Udev rules to be included in upstream udev will read the index
   value from sysfs (provided by SMBIOS 2.6 info on kernels >= 2.6.36,
   PCI DSM info at some future point) if present, and rename LOMs
   based on that index value.  Distros will use these rules by default
   (Ubuntu and Fedora maintainers on board with the concept; I have
   not spoken with other distros yet.)
** Legacy distros with older udev rules will invoke biosdevname on
   kernels < 2.6.36 to get the same information, if present, and will
   rename LOMs based on index value.

** Installers will use the above udev rules by default.  If there is
   outcry during the distros beta testing periods, a way to disable
   these renames may be implemented.

* NetworkManager to display BIOS-provided labels as informational text


As such, biosdevname will be packaged and included in Debian and
Ubuntu (thanks to Colin Watson) to facilitate use in the udev rules.
Colin also suggested that any string used in Fedora kickstart files to
enable/disable this feature will also be used to enable/disable this
feature in the Debian & Ubuntu installers.  Given today's discussion
that the feature be enabled by default, this flag, if needed at all,
will be to disable the feature.

Does this seem sane to everyone?  Next step is to integrate
biosdevname into udev rules in a sane manner.

Thanks,
Matt

-- 
Matt Domsch
Technology Strategist, Dell Office of the CTO

^ permalink raw reply

* [V2 PATCH] virtio-net: init link state correctly
From: Jason Wang @ 2010-11-05  3:00 UTC (permalink / raw)
  To: Jason Wang; +Cc: rusty, davem, markmc, linux-kernel, kvm, mst, netdev
In-Reply-To: <20101105025008.3277.87697.stgit@dhcp-91-158.nay.redhat.com>

Jason Wang writes:

CC netdev missed in the original patch.
 > For device that supports VIRTIO_NET_F_STATUS, there's no need to
 > assume the link is up and we need to call nerif_carrier_off() before
 > querying device status, otherwise we may get wrong operstate after
 > diver was loaded because the link watch event was not fired as
 > expected.
 > 
 > For device that does not support VIRITO_NET_F_STATUS, we could not get
 > its status through virtnet_update_status() and what we can only do is
 > always assuming the link is up.
 > 
 > Signed-off-by: Jason Wang <jasowang@redhat.com>
 > ---
 >  drivers/net/virtio_net.c |   12 +++++++++---
 >  1 files changed, 9 insertions(+), 3 deletions(-)
 > 
 > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
 > index bb6b67f..b6d4028 100644
 > --- a/drivers/net/virtio_net.c
 > +++ b/drivers/net/virtio_net.c
 > @@ -986,9 +986,15 @@ static int virtnet_probe(struct virtio_device *vdev)
 >  		goto unregister;
 >  	}
 >  
 > -	vi->status = VIRTIO_NET_S_LINK_UP;
 > -	virtnet_update_status(vi);
 > -	netif_carrier_on(dev);
 > +	/* Assume link up if device can't report link status,
 > +	   otherwise get link status from config. */
 > +	if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
 > +		netif_carrier_off(dev);
 > +		virtnet_update_status(vi);
 > +	} else {
 > +		vi->status = VIRTIO_NET_S_LINK_UP;
 > +		netif_carrier_on(dev);
 > +	}
 >  
 >  	pr_debug("virtnet: registered device %s\n", dev->name);
 >  	return 0;
 > 
 > --
 > To unsubscribe from this list: send the line "unsubscribe kvm" in
 > the body of a message to majordomo@vger.kernel.org
 > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH 00/49] Use vzalloc not vmalloc/kmemset
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-ia64, linux-kernel, linux-mips, kvm, kvm-ppc, linuxppc-dev,
	cbe-oss-dev, linux-s390, amd64-microcode, linux-crypto,
	linux-atm-general, netdev, drbd-user, dri-devel, linux-input,
	linux-rdma, dm-devel, linux-raid, linux-media, linux-mtd,
	e1000-devel, linux-scsi, osst-users, devel, xen-devel,
	virtualization, linux-ext4, reiserfs-devel, xfs, codalist,
	linux-mm
In-Reply-To: <alpine.DEB.2.00.1011031108260.11625@router.home>

Converted vmalloc/memset and vmalloc_node/memset to
vzalloc or vzalloc_node using a cocci script and some editing

Reduces text a little bit.

Compiled x86 only.

There are still vmalloc_32 with memset calls still around.

Broken out to multiple patches to cc appropriate maintainers.

Joe Perches (49):
  arch/ia64: Use vzalloc
  arch/mips: Use vzalloc
  arch/powerpc: Use vzalloc
  arch/s390: Use vzalloc
  arch/x86: Use vzalloc
  crypto: Use vzalloc
  drivers/atm: Use vzalloc
  drivers/block: Use vzalloc
  drivers/char: Use vzalloc
  drivers/gpu: Use vzalloc
  drivers/hid: Use vzalloc
  drivers/infiniband: Use vzalloc
  drivers/isdn: Use vzalloc
  drivers/md: Use vzalloc
  drivers/media: Use vzalloc
  drivers/mtd: Use vzalloc
  drivers/net/cxgb3: Use vzalloc
  drivers/net/cxgb4: Use vzalloc
  drivers/net/e1000: Use vzalloc
  drivers/net/e1000e: Use vzalloc
  drivers/net/ehea: Use vzalloc
  drivers/net/igb: Use vzalloc
  drivers/net/igbvf: Use vzalloc
  drivers/net/ixgb: Use vzalloc
  drivers/net/ixgbe: Use vzalloc
  drivers/net/ixgbevf: Use vzalloc
  drivers/net/netxen: Use vzalloc
  drivers/net/pch_gbe: Use vzalloc
  drivers/net/qlcnic: Use vzalloc
  drivers/net/sfc: Use vzalloc
  drivers/net/vxge: Use vzalloc
  drivers/net/bnx2.c: Use vzalloc
  drivers/s390: Use vzalloc
  drivers/scsi: Use vzalloc
  drivers/staging: Use vzalloc
  drivers/video: Use vzalloc
  fs/ext4: Use vzalloc
  fs/jffs2: Use vzalloc
  fs/reiserfs: Use vzalloc
  fs/udf: Use vzalloc
  fs/xfs: Use vzalloc
  include/linux/coda_linux.h: Use vzalloc
  kernel: Use vzalloc
  mm: Use vzalloc
  net/core/pktgen.c: Use vzalloc
  net/netfilter: Use vzalloc
  net/rds: Use vzalloc
  sound/oss/dev_table.c: Use vzalloc
  virt/kvm/kvm_main.c: Use vzalloc

 arch/ia64/kernel/perfmon.c                      |    3 +-
 arch/mips/sibyte/common/sb_tbprof.c             |    3 +-
 arch/powerpc/kvm/book3s.c                       |    6 +--
 arch/powerpc/platforms/cell/spufs/lscsa_alloc.c |    3 +-
 arch/s390/hypfs/hypfs_diag.c                    |    3 +-
 arch/x86/kernel/microcode_amd.c                 |    3 +-
 arch/x86/kvm/x86.c                              |    3 +-
 arch/x86/mm/pageattr-test.c                     |    3 +-
 crypto/deflate.c                                |    3 +-
 crypto/zlib.c                                   |    3 +-
 drivers/atm/idt77252.c                          |   11 ++++---
 drivers/atm/lanai.c                             |    3 +-
 drivers/block/drbd/drbd_bitmap.c                |    5 +--
 drivers/char/agp/backend.c                      |    3 +-
 drivers/char/mspec.c                            |    5 +--
 drivers/gpu/drm/via/via_dmablit.c               |    4 +-
 drivers/hid/hid-core.c                          |    3 +-
 drivers/infiniband/hw/amso1100/c2_rnic.c        |    5 +--
 drivers/infiniband/hw/ehca/ipz_pt_fn.c          |    5 +--
 drivers/infiniband/hw/ipath/ipath_driver.c      |    3 +-
 drivers/infiniband/hw/ipath/ipath_file_ops.c    |   11 ++-----
 drivers/infiniband/hw/ipath/ipath_init_chip.c   |    5 +--
 drivers/infiniband/hw/qib/qib_init.c            |    7 +---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c         |   10 ++----
 drivers/infiniband/ulp/ipoib/ipoib_main.c       |    3 +-
 drivers/isdn/i4l/isdn_common.c                  |    4 +-
 drivers/isdn/mISDN/dsp_core.c                   |    3 +-
 drivers/isdn/mISDN/l1oip_codec.c                |    6 +--
 drivers/md/dm-log.c                             |    3 +-
 drivers/md/dm-snap-persistent.c                 |    3 +-
 drivers/md/dm-table.c                           |    4 +--
 drivers/media/dvb/ngene/ngene-core.c            |    3 +-
 drivers/media/video/mx3_camera.c                |    3 +-
 drivers/media/video/pwc/pwc-if.c                |    3 +-
 drivers/media/video/videobuf-dma-sg.c           |    3 +-
 drivers/mtd/nand/nandsim.c                      |    3 +-
 drivers/mtd/ubi/vtbl.c                          |    6 +--
 drivers/net/bnx2.c                              |   10 +-----
 drivers/net/cxgb3/cxgb3_offload.c               |    7 ++--
 drivers/net/cxgb4/cxgb4_main.c                  |    7 ++--
 drivers/net/e1000/e1000_main.c                  |    6 +--
 drivers/net/e1000e/netdev.c                     |    6 +--
 drivers/net/ehea/ehea_main.c                    |    4 +--
 drivers/net/igb/igb_main.c                      |    6 +--
 drivers/net/igbvf/netdev.c                      |    6 +--
 drivers/net/ixgb/ixgb_main.c                    |    6 +--
 drivers/net/ixgbe/ixgbe_main.c                  |   10 ++----
 drivers/net/ixgbevf/ixgbevf_main.c              |    6 +--
 drivers/net/netxen/netxen_nic_init.c            |    7 +---
 drivers/net/pch_gbe/pch_gbe_main.c              |    6 +--
 drivers/net/qlcnic/qlcnic_init.c                |    7 +---
 drivers/net/sfc/filter.c                        |    3 +-
 drivers/net/vxge/vxge-config.c                  |   37 +++++-----------------
 drivers/s390/cio/blacklist.c                    |    3 +-
 drivers/scsi/bfa/bfad.c                         |    3 +-
 drivers/scsi/bfa/bfad_debugfs.c                 |    8 +----
 drivers/scsi/cxgbi/libcxgbi.h                   |    9 ++----
 drivers/scsi/osst.c                             |    3 +-
 drivers/scsi/qla2xxx/qla_attr.c                 |    3 +-
 drivers/scsi/qla2xxx/qla_bsg.c                  |    3 +-
 drivers/scsi/scsi_debug.c                       |    7 +---
 drivers/staging/comedi/drivers.c                |    4 +--
 drivers/staging/rtl8192e/r8192E_core.c          |    4 +--
 drivers/staging/udlfb/udlfb.c                   |    5 +--
 drivers/staging/xgifb/XGI_main_26.c             |    3 +-
 drivers/staging/zram/zram_drv.c                 |    3 +-
 drivers/video/arcfb.c                           |    5 +--
 drivers/video/broadsheetfb.c                    |    4 +--
 drivers/video/hecubafb.c                        |    5 +--
 drivers/video/metronomefb.c                     |    4 +--
 drivers/video/xen-fbfront.c                     |    3 +-
 fs/ext4/super.c                                 |    4 +--
 fs/jffs2/build.c                                |    5 +--
 fs/reiserfs/journal.c                           |    9 ++----
 fs/reiserfs/resize.c                            |    4 +--
 fs/udf/super.c                                  |    5 +--
 fs/xfs/linux-2.6/kmem.h                         |    7 +----
 include/linux/coda_linux.h                      |   26 ++++++++++------
 kernel/profile.c                                |    6 +--
 kernel/relay.c                                  |    4 +--
 mm/memcontrol.c                                 |    5 +--
 mm/page_cgroup.c                                |    3 +-
 mm/percpu.c                                     |    8 +----
 mm/swapfile.c                                   |    3 +-
 net/core/pktgen.c                               |    3 +-
 net/netfilter/x_tables.c                        |    5 +--
 net/rds/ib_cm.c                                 |    6 +--
 sound/oss/dev_table.c                           |    6 +--
 virt/kvm/kvm_main.c                             |   13 ++------
 89 files changed, 167 insertions(+), 328 deletions(-)

-- 
1.7.3.1.g432b3.dirty

--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* [PATCH 07/49] drivers/atm: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Chas Williams, linux-atm-general, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/atm/idt77252.c |   11 ++++++-----
 drivers/atm/lanai.c    |    3 +--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index bce5732..8c09e32 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3459,27 +3459,28 @@ init_card(struct atm_dev *dev)
 
 	size = sizeof(struct vc_map *) * card->tct_size;
 	IPRINTK("%s: allocate %d byte for VC map.\n", card->name, size);
-	if (NULL == (card->vcs = vmalloc(size))) {
+	card->vcs = vzalloc(size);
+	if (!card->vcs) {
 		printk("%s: memory allocation failure.\n", card->name);
 		deinit_card(card);
 		return -1;
 	}
-	memset(card->vcs, 0, size);
 
 	size = sizeof(struct vc_map *) * card->scd_size;
 	IPRINTK("%s: allocate %d byte for SCD to VC mapping.\n",
 	        card->name, size);
-	if (NULL == (card->scd2vc = vmalloc(size))) {
+	card->scd2vc = vzalloc(size);
+	if (!card->scd2vc) {
 		printk("%s: memory allocation failure.\n", card->name);
 		deinit_card(card);
 		return -1;
 	}
-	memset(card->scd2vc, 0, size);
 
 	size = sizeof(struct tst_info) * (card->tst_size - 2);
 	IPRINTK("%s: allocate %d byte for TST to VC mapping.\n",
 		card->name, size);
-	if (NULL == (card->soft_tst = vmalloc(size))) {
+	card->soft_tst = vmalloc(size);
+	if (!card->soft_tst) {
 		printk("%s: memory allocation failure.\n", card->name);
 		deinit_card(card);
 		return -1;
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index cbe15a8..5cec592 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -1457,10 +1457,9 @@ static int __devinit vcc_table_allocate(struct lanai_dev *lanai)
 	return (lanai->vccs == NULL) ? -ENOMEM : 0;
 #else
 	int bytes = (lanai->num_vci) * sizeof(struct lanai_vcc *);
-	lanai->vccs = (struct lanai_vcc **) vmalloc(bytes);
+	lanai->vccs = vzalloc(bytes);
 	if (unlikely(lanai->vccs == NULL))
 		return -ENOMEM;
-	memset(lanai->vccs, 0, bytes);
 	return 0;
 #endif
 }
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 13/49] drivers/isdn: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Karsten Keil, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/isdn/i4l/isdn_common.c   |    4 ++--
 drivers/isdn/mISDN/dsp_core.c    |    3 +--
 drivers/isdn/mISDN/l1oip_codec.c |    6 ++----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 15632bd..2601d5c 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -2315,11 +2315,11 @@ static int __init isdn_init(void)
 	int i;
 	char tmprev[50];
 
-	if (!(dev = vmalloc(sizeof(isdn_dev)))) {
+	dev = vzalloc(sizeof(isdn_dev));
+	if (!dev) {
 		printk(KERN_WARNING "isdn: Could not allocate device-struct.\n");
 		return -EIO;
 	}
-	memset((char *) dev, 0, sizeof(isdn_dev));
 	init_timer(&dev->timer);
 	dev->timer.function = isdn_timer_funct;
 	spin_lock_init(&dev->lock);
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 6f5b548..a255de5 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -1052,12 +1052,11 @@ dspcreate(struct channel_req *crq)
 	if (crq->protocol != ISDN_P_B_L2DSP
 	 && crq->protocol != ISDN_P_B_L2DSPHDLC)
 		return -EPROTONOSUPPORT;
-	ndsp = vmalloc(sizeof(struct dsp));
+	ndsp = vzalloc(sizeof(struct dsp));
 	if (!ndsp) {
 		printk(KERN_ERR "%s: vmalloc struct dsp failed\n", __func__);
 		return -ENOMEM;
 	}
-	memset(ndsp, 0, sizeof(struct dsp));
 	if (dsp_debug & DEBUG_DSP_CTRL)
 		printk(KERN_DEBUG "%s: creating new dsp instance\n", __func__);
 
diff --git a/drivers/isdn/mISDN/l1oip_codec.c b/drivers/isdn/mISDN/l1oip_codec.c
index bbfd1b8..5a89972 100644
--- a/drivers/isdn/mISDN/l1oip_codec.c
+++ b/drivers/isdn/mISDN/l1oip_codec.c
@@ -330,14 +330,12 @@ l1oip_4bit_alloc(int ulaw)
 		return 0;
 
 	/* alloc conversion tables */
-	table_com = vmalloc(65536);
-	table_dec = vmalloc(512);
+	table_com = vzalloc(65536);
+	table_dec = vzalloc(512);
 	if (!table_com || !table_dec) {
 		l1oip_4bit_free();
 		return -ENOMEM;
 	}
-	memset(table_com, 0, 65536);
-	memset(table_dec, 0, 512);
 	/* generate compression table */
 	i1 = 0;
 	while (i1 < 256) {
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 17/49] drivers/net/cxgb3: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Divy Le Ray, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/cxgb3/cxgb3_offload.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c
index bcf0753..5e632e2 100644
--- a/drivers/net/cxgb3/cxgb3_offload.c
+++ b/drivers/net/cxgb3/cxgb3_offload.c
@@ -1164,12 +1164,11 @@ static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new)
  */
 void *cxgb_alloc_mem(unsigned long size)
 {
-	void *p = kmalloc(size, GFP_KERNEL);
+	void *p = kzalloc(size, GFP_KERNEL);
 
 	if (!p)
-		p = vmalloc(size);
-	if (p)
-		memset(p, 0, size);
+		p = vzalloc(size);
+
 	return p;
 }
 
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 18/49] drivers/net/cxgb4: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Dimitris Michailidis, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/cxgb4/cxgb4_main.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index f17703f..b7758ce 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -868,12 +868,11 @@ out:	release_firmware(fw);
  */
 void *t4_alloc_mem(size_t size)
 {
-	void *p = kmalloc(size, GFP_KERNEL);
+	void *p = kzalloc(size, GFP_KERNEL);
 
 	if (!p)
-		p = vmalloc(size);
-	if (p)
-		memset(p, 0, size);
+		p = vzalloc(size);
+
 	return p;
 }
 
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 19/49] drivers/net/e1000: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/e1000/e1000_main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 4686c39..dcb7f82 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1425,13 +1425,12 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter,
 	int size;
 
 	size = sizeof(struct e1000_buffer) * txdr->count;
-	txdr->buffer_info = vmalloc(size);
+	txdr->buffer_info = vzalloc(size);
 	if (!txdr->buffer_info) {
 		e_err(probe, "Unable to allocate memory for the Tx descriptor "
 		      "ring\n");
 		return -ENOMEM;
 	}
-	memset(txdr->buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 
@@ -1621,13 +1620,12 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter,
 	int size, desc_len;
 
 	size = sizeof(struct e1000_buffer) * rxdr->count;
-	rxdr->buffer_info = vmalloc(size);
+	rxdr->buffer_info = vzalloc(size);
 	if (!rxdr->buffer_info) {
 		e_err(probe, "Unable to allocate memory for the Rx descriptor "
 		      "ring\n");
 		return -ENOMEM;
 	}
-	memset(rxdr->buffer_info, 0, size);
 
 	desc_len = sizeof(struct e1000_rx_desc);
 
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 20/49] drivers/net/e1000e: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/e1000e/netdev.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index c4ca162..9922edb 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2059,10 +2059,9 @@ int e1000e_setup_tx_resources(struct e1000_adapter *adapter)
 	int err = -ENOMEM, size;
 
 	size = sizeof(struct e1000_buffer) * tx_ring->count;
-	tx_ring->buffer_info = vmalloc(size);
+	tx_ring->buffer_info = vzalloc(size);
 	if (!tx_ring->buffer_info)
 		goto err;
-	memset(tx_ring->buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 	tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc);
@@ -2095,10 +2094,9 @@ int e1000e_setup_rx_resources(struct e1000_adapter *adapter)
 	int i, size, desc_len, err = -ENOMEM;
 
 	size = sizeof(struct e1000_buffer) * rx_ring->count;
-	rx_ring->buffer_info = vmalloc(size);
+	rx_ring->buffer_info = vzalloc(size);
 	if (!rx_ring->buffer_info)
 		goto err;
-	memset(rx_ring->buffer_info, 0, size);
 
 	for (i = 0; i < rx_ring->count; i++) {
 		buffer_info = &rx_ring->buffer_info[i];
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 21/49] drivers/net/ehea: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Breno Leitao, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ehea/ehea_main.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 182b2a7..a84c389 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1496,12 +1496,10 @@ static int ehea_init_q_skba(struct ehea_q_skb_arr *q_skba, int max_q_entries)
 {
 	int arr_size = sizeof(void *) * max_q_entries;
 
-	q_skba->arr = vmalloc(arr_size);
+	q_skba->arr = vzalloc(arr_size);
 	if (!q_skba->arr)
 		return -ENOMEM;
 
-	memset(q_skba->arr, 0, arr_size);
-
 	q_skba->len = max_q_entries;
 	q_skba->index = 0;
 	q_skba->os_skbs = 0;
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 22/49] drivers/net/igb: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/igb/igb_main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 892d196..67ea262 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2436,10 +2436,9 @@ int igb_setup_tx_resources(struct igb_ring *tx_ring)
 	int size;
 
 	size = sizeof(struct igb_buffer) * tx_ring->count;
-	tx_ring->buffer_info = vmalloc(size);
+	tx_ring->buffer_info = vzalloc(size);
 	if (!tx_ring->buffer_info)
 		goto err;
-	memset(tx_ring->buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 	tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
@@ -2587,10 +2586,9 @@ int igb_setup_rx_resources(struct igb_ring *rx_ring)
 	int size, desc_len;
 
 	size = sizeof(struct igb_buffer) * rx_ring->count;
-	rx_ring->buffer_info = vmalloc(size);
+	rx_ring->buffer_info = vzalloc(size);
 	if (!rx_ring->buffer_info)
 		goto err;
-	memset(rx_ring->buffer_info, 0, size);
 
 	desc_len = sizeof(union e1000_adv_rx_desc);
 
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 23/49] drivers/net/igbvf: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/igbvf/netdev.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 28af019..08e7459 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -429,10 +429,9 @@ int igbvf_setup_tx_resources(struct igbvf_adapter *adapter,
 	int size;
 
 	size = sizeof(struct igbvf_buffer) * tx_ring->count;
-	tx_ring->buffer_info = vmalloc(size);
+	tx_ring->buffer_info = vzalloc(size);
 	if (!tx_ring->buffer_info)
 		goto err;
-	memset(tx_ring->buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 	tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
@@ -469,10 +468,9 @@ int igbvf_setup_rx_resources(struct igbvf_adapter *adapter,
 	int size, desc_len;
 
 	size = sizeof(struct igbvf_buffer) * rx_ring->count;
-	rx_ring->buffer_info = vmalloc(size);
+	rx_ring->buffer_info = vzalloc(size);
 	if (!rx_ring->buffer_info)
 		goto err;
-	memset(rx_ring->buffer_info, 0, size);
 
 	desc_len = sizeof(union e1000_adv_rx_desc);
 
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 24/49] drivers/net/ixgb: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ixgb/ixgb_main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index caa8192..211a169 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -669,13 +669,12 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter)
 	int size;
 
 	size = sizeof(struct ixgb_buffer) * txdr->count;
-	txdr->buffer_info = vmalloc(size);
+	txdr->buffer_info = vzalloc(size);
 	if (!txdr->buffer_info) {
 		netif_err(adapter, probe, adapter->netdev,
 			  "Unable to allocate transmit descriptor ring memory\n");
 		return -ENOMEM;
 	}
-	memset(txdr->buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 
@@ -759,13 +758,12 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter)
 	int size;
 
 	size = sizeof(struct ixgb_buffer) * rxdr->count;
-	rxdr->buffer_info = vmalloc(size);
+	rxdr->buffer_info = vzalloc(size);
 	if (!rxdr->buffer_info) {
 		netif_err(adapter, probe, adapter->netdev,
 			  "Unable to allocate receive descriptor ring\n");
 		return -ENOMEM;
 	}
-	memset(rxdr->buffer_info, 0, size);
 
 	/* Round up to nearest 4K */
 
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 25/49] drivers/net/ixgbe: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ixgbe/ixgbe_main.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 2bd3eb4..c10d179 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4970,12 +4970,11 @@ int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter,
 	int size;
 
 	size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count;
-	tx_ring->tx_buffer_info = vmalloc_node(size, tx_ring->numa_node);
+	tx_ring->tx_buffer_info = vzalloc_node(size, tx_ring->numa_node);
 	if (!tx_ring->tx_buffer_info)
-		tx_ring->tx_buffer_info = vmalloc(size);
+		tx_ring->tx_buffer_info = vzalloc(size);
 	if (!tx_ring->tx_buffer_info)
 		goto err;
-	memset(tx_ring->tx_buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 	tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
@@ -5037,15 +5036,14 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
 	int size;
 
 	size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
-	rx_ring->rx_buffer_info = vmalloc_node(size, adapter->node);
+	rx_ring->rx_buffer_info = vzalloc_node(size, adapter->node);
 	if (!rx_ring->rx_buffer_info)
-		rx_ring->rx_buffer_info = vmalloc(size);
+		rx_ring->rx_buffer_info = vzalloc(size);
 	if (!rx_ring->rx_buffer_info) {
 		e_err(probe, "vmalloc allocation failed for the Rx "
 		      "descriptor ring\n");
 		goto alloc_failed;
 	}
-	memset(rx_ring->rx_buffer_info, 0, size);
 
 	/* Round up to nearest 4K */
 	rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 26/49] drivers/net/ixgbevf: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
	Greg Rose, John Ronciak, Jeff Kirsher, netdev
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ixgbevf/ixgbevf_main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index dc03c96..6aeaf54 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -2488,10 +2488,9 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_adapter *adapter,
 	int size;
 
 	size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;
-	tx_ring->tx_buffer_info = vmalloc(size);
+	tx_ring->tx_buffer_info = vzalloc(size);
 	if (!tx_ring->tx_buffer_info)
 		goto err;
-	memset(tx_ring->tx_buffer_info, 0, size);
 
 	/* round up to nearest 4K */
 	tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
@@ -2555,14 +2554,13 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter,
 	int size;
 
 	size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count;
-	rx_ring->rx_buffer_info = vmalloc(size);
+	rx_ring->rx_buffer_info = vzalloc(size);
 	if (!rx_ring->rx_buffer_info) {
 		hw_dbg(&adapter->hw,
 		       "Unable to vmalloc buffer memory for "
 		       "the receive descriptor ring\n");
 		goto alloc_failed;
 	}
-	memset(rx_ring->rx_buffer_info, 0, size);
 
 	/* Round up to nearest 4K */
 	rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
-- 
1.7.3.1.g432b3.dirty


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related

* [PATCH 27/49] drivers/net/netxen: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Amit Kumar Salecha, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/netxen/netxen_nic_init.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 95fe552..731077d 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -214,13 +214,12 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
 	tx_ring->num_desc = adapter->num_txd;
 	tx_ring->txq = netdev_get_tx_queue(netdev, 0);
 
-	cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring));
+	cmd_buf_arr = vzalloc(TX_BUFF_RINGSIZE(tx_ring));
 	if (cmd_buf_arr == NULL) {
 		dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n",
 		       netdev->name);
 		goto err_out;
 	}
-	memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
 	tx_ring->cmd_buf_arr = cmd_buf_arr;
 
 	recv_ctx = &adapter->recv_ctx;
@@ -279,8 +278,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
 			break;
 
 		}
-		rds_ring->rx_buf_arr = (struct netxen_rx_buffer *)
-			vmalloc(RCV_BUFF_RINGSIZE(rds_ring));
+		rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
 		if (rds_ring->rx_buf_arr == NULL) {
 			printk(KERN_ERR "%s: Failed to allocate "
 				"rx buffer ring %d\n",
@@ -288,7 +286,6 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
 			/* free whatever was already allocated */
 			goto err_out;
 		}
-		memset(rds_ring->rx_buf_arr, 0, RCV_BUFF_RINGSIZE(rds_ring));
 		INIT_LIST_HEAD(&rds_ring->free_list);
 		/*
 		 * Now go through all of them, set reference handles
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 28/49] drivers/net/pch_gbe: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/pch_gbe/pch_gbe_main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 472056b..afb7506 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -1523,12 +1523,11 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter,
 	int desNo;
 
 	size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count;
-	tx_ring->buffer_info = vmalloc(size);
+	tx_ring->buffer_info = vzalloc(size);
 	if (!tx_ring->buffer_info) {
 		pr_err("Unable to allocate memory for the buffer infomation\n");
 		return -ENOMEM;
 	}
-	memset(tx_ring->buffer_info, 0, size);
 
 	tx_ring->size = tx_ring->count * (int)sizeof(struct pch_gbe_tx_desc);
 
@@ -1573,12 +1572,11 @@ int pch_gbe_setup_rx_resources(struct pch_gbe_adapter *adapter,
 	int desNo;
 
 	size = (int)sizeof(struct pch_gbe_buffer) * rx_ring->count;
-	rx_ring->buffer_info = vmalloc(size);
+	rx_ring->buffer_info = vzalloc(size);
 	if (!rx_ring->buffer_info) {
 		pr_err("Unable to allocate memory for the receive descriptor ring\n");
 		return -ENOMEM;
 	}
-	memset(rx_ring->buffer_info, 0, size);
 	rx_ring->size = rx_ring->count * (int)sizeof(struct pch_gbe_rx_desc);
 	rx_ring->desc =	dma_alloc_coherent(&pdev->dev, rx_ring->size,
 					   &rx_ring->dma, GFP_KERNEL);
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 31/49] drivers/net/vxge: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
	Jon Mason, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/vxge/vxge-config.c |   37 +++++++++----------------------------
 1 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index 906a3ca3..0c0a4e4 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -776,14 +776,12 @@ vxge_hw_device_initialize(
 	if (status != VXGE_HW_OK)
 		goto exit;
 
-	hldev = (struct __vxge_hw_device *)
-			vmalloc(sizeof(struct __vxge_hw_device));
+	hldev = vzalloc(sizeof(struct __vxge_hw_device));
 	if (hldev == NULL) {
 		status = VXGE_HW_ERR_OUT_OF_MEMORY;
 		goto exit;
 	}
 
-	memset(hldev, 0, sizeof(struct __vxge_hw_device));
 	hldev->magic = VXGE_HW_DEVICE_MAGIC;
 
 	vxge_hw_device_debug_set(hldev, VXGE_ERR, VXGE_COMPONENT_ALL);
@@ -1627,15 +1625,12 @@ __vxge_hw_mempool_grow(struct vxge_hw_mempool *mempool, u32 num_allocate,
 		 * allocate new memblock and its private part at once.
 		 * This helps to minimize memory usage a lot. */
 		mempool->memblocks_priv_arr[i] =
-				vmalloc(mempool->items_priv_size * n_items);
+				vzalloc(mempool->items_priv_size * n_items);
 		if (mempool->memblocks_priv_arr[i] == NULL) {
 			status = VXGE_HW_ERR_OUT_OF_MEMORY;
 			goto exit;
 		}
 
-		memset(mempool->memblocks_priv_arr[i], 0,
-			     mempool->items_priv_size * n_items);
-
 		/* allocate DMA-capable memblock */
 		mempool->memblocks_arr[i] =
 			__vxge_hw_blockpool_malloc(mempool->devh,
@@ -1707,13 +1702,11 @@ __vxge_hw_mempool_create(
 		goto exit;
 	}
 
-	mempool = (struct vxge_hw_mempool *)
-			vmalloc(sizeof(struct vxge_hw_mempool));
+	mempool = vzalloc(sizeof(struct vxge_hw_mempool));
 	if (mempool == NULL) {
 		status = VXGE_HW_ERR_OUT_OF_MEMORY;
 		goto exit;
 	}
-	memset(mempool, 0, sizeof(struct vxge_hw_mempool));
 
 	mempool->devh			= devh;
 	mempool->memblock_size		= memblock_size;
@@ -1733,31 +1726,27 @@ __vxge_hw_mempool_create(
 
 	/* allocate array of memblocks */
 	mempool->memblocks_arr =
-		(void **) vmalloc(sizeof(void *) * mempool->memblocks_max);
+		vzalloc(sizeof(void *) * mempool->memblocks_max);
 	if (mempool->memblocks_arr == NULL) {
 		__vxge_hw_mempool_destroy(mempool);
 		status = VXGE_HW_ERR_OUT_OF_MEMORY;
 		mempool = NULL;
 		goto exit;
 	}
-	memset(mempool->memblocks_arr, 0,
-		sizeof(void *) * mempool->memblocks_max);
 
 	/* allocate array of private parts of items per memblocks */
 	mempool->memblocks_priv_arr =
-		(void **) vmalloc(sizeof(void *) * mempool->memblocks_max);
+		vzalloc(sizeof(void *) * mempool->memblocks_max);
 	if (mempool->memblocks_priv_arr == NULL) {
 		__vxge_hw_mempool_destroy(mempool);
 		status = VXGE_HW_ERR_OUT_OF_MEMORY;
 		mempool = NULL;
 		goto exit;
 	}
-	memset(mempool->memblocks_priv_arr, 0,
-		    sizeof(void *) * mempool->memblocks_max);
 
 	/* allocate array of memblocks DMA objects */
-	mempool->memblocks_dma_arr = (struct vxge_hw_mempool_dma *)
-		vmalloc(sizeof(struct vxge_hw_mempool_dma) *
+	mempool->memblocks_dma_arr =
+		vzalloc(sizeof(struct vxge_hw_mempool_dma) *
 			mempool->memblocks_max);
 
 	if (mempool->memblocks_dma_arr == NULL) {
@@ -1766,20 +1755,15 @@ __vxge_hw_mempool_create(
 		mempool = NULL;
 		goto exit;
 	}
-	memset(mempool->memblocks_dma_arr, 0,
-			sizeof(struct vxge_hw_mempool_dma) *
-			mempool->memblocks_max);
 
 	/* allocate hash array of items */
-	mempool->items_arr =
-		(void **) vmalloc(sizeof(void *) * mempool->items_max);
+	mempool->items_arr = vzalloc(sizeof(void *) * mempool->items_max);
 	if (mempool->items_arr == NULL) {
 		__vxge_hw_mempool_destroy(mempool);
 		status = VXGE_HW_ERR_OUT_OF_MEMORY;
 		mempool = NULL;
 		goto exit;
 	}
-	memset(mempool->items_arr, 0, sizeof(void *) * mempool->items_max);
 
 	/* calculate initial number of memblocks */
 	memblocks_to_allocate = (mempool->items_initial +
@@ -4242,15 +4226,12 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
 	if (status != VXGE_HW_OK)
 		goto vpath_open_exit1;
 
-	vp = (struct __vxge_hw_vpath_handle *)
-		vmalloc(sizeof(struct __vxge_hw_vpath_handle));
+	vp = vzalloc(sizeof(struct __vxge_hw_vpath_handle));
 	if (vp == NULL) {
 		status = VXGE_HW_ERR_OUT_OF_MEMORY;
 		goto vpath_open_exit2;
 	}
 
-	memset(vp, 0, sizeof(struct __vxge_hw_vpath_handle));
-
 	vp->vpath = vpath;
 
 	if (vpath->vp_config->fifo.enable == VXGE_HW_FIFO_ENABLE) {
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 32/49] drivers/net/bnx2.c: Use vzalloc
From: Joe Perches @ 2010-11-05  3:07 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Michael Chan, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/bnx2.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 062600b..aba4d0f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -766,13 +766,10 @@ bnx2_alloc_rx_mem(struct bnx2 *bp)
 		int j;
 
 		rxr->rx_buf_ring =
-			vmalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring);
+			vzalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring);
 		if (rxr->rx_buf_ring == NULL)
 			return -ENOMEM;
 
-		memset(rxr->rx_buf_ring, 0,
-		       SW_RXBD_RING_SIZE * bp->rx_max_ring);
-
 		for (j = 0; j < bp->rx_max_ring; j++) {
 			rxr->rx_desc_ring[j] =
 				dma_alloc_coherent(&bp->pdev->dev,
@@ -785,13 +782,10 @@ bnx2_alloc_rx_mem(struct bnx2 *bp)
 		}
 
 		if (bp->rx_pg_ring_size) {
-			rxr->rx_pg_ring = vmalloc(SW_RXPG_RING_SIZE *
+			rxr->rx_pg_ring = vzalloc(SW_RXPG_RING_SIZE *
 						  bp->rx_max_pg_ring);
 			if (rxr->rx_pg_ring == NULL)
 				return -ENOMEM;
-
-			memset(rxr->rx_pg_ring, 0, SW_RXPG_RING_SIZE *
-			       bp->rx_max_pg_ring);
 		}
 
 		for (j = 0; j < bp->rx_max_pg_ring; j++) {
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 45/49] net/core/pktgen.c: Use vzalloc
From: Joe Perches @ 2010-11-05  3:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: David S. Miller, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/core/pktgen.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index fbce4b0..ccca6cd 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3706,13 +3706,12 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
 		return -ENOMEM;
 
 	strcpy(pkt_dev->odevname, ifname);
-	pkt_dev->flows = vmalloc_node(MAX_CFLOWS * sizeof(struct flow_state),
+	pkt_dev->flows = vzalloc_node(MAX_CFLOWS * sizeof(struct flow_state),
 				      node);
 	if (pkt_dev->flows == NULL) {
 		kfree(pkt_dev);
 		return -ENOMEM;
 	}
-	memset(pkt_dev->flows, 0, MAX_CFLOWS * sizeof(struct flow_state));
 
 	pkt_dev->removal_mark = 0;
 	pkt_dev->min_pkt_size = ETH_ZLEN;
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 46/49] net/netfilter: Use vzalloc
From: Joe Perches @ 2010-11-05  3:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Patrick McHardy, David S. Miller, netfilter-devel, netfilter,
	coreteam, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/netfilter/x_tables.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 8046350..89e8895 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -753,12 +753,11 @@ static int xt_jumpstack_alloc(struct xt_table_info *i)
 
 	size = sizeof(void **) * nr_cpu_ids;
 	if (size > PAGE_SIZE)
-		i->jumpstack = vmalloc(size);
+		i->jumpstack = vzalloc(size);
 	else
-		i->jumpstack = kmalloc(size, GFP_KERNEL);
+		i->jumpstack = kzalloc(size, GFP_KERNEL);
 	if (i->jumpstack == NULL)
 		return -ENOMEM;
-	memset(i->jumpstack, 0, size);
 
 	i->stacksize *= xt_jumpstack_multiplier;
 	size = sizeof(void *) * i->stacksize;
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related

* [PATCH 47/49] net/rds: Use vzalloc
From: Joe Perches @ 2010-11-05  3:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Andy Grover, David S. Miller, rds-devel, netdev, linux-kernel
In-Reply-To: <cover.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/rds/ib_cm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index ee369d2..cc6b073 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -374,23 +374,21 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 		goto out;
 	}
 
-	ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
+	ic->i_sends = vzalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
 				   ibdev_to_node(dev));
 	if (!ic->i_sends) {
 		ret = -ENOMEM;
 		rdsdebug("send allocation failed\n");
 		goto out;
 	}
-	memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
 
-	ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
+	ic->i_recvs = vzalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
 				   ibdev_to_node(dev));
 	if (!ic->i_recvs) {
 		ret = -ENOMEM;
 		rdsdebug("recv allocation failed\n");
 		goto out;
 	}
-	memset(ic->i_recvs, 0, ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
 
 	rds_ib_recv_init_ack(ic);
 
-- 
1.7.3.1.g432b3.dirty

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox