Skip to contentSkip to conversation

kernel/fork.c: use sizeof() instead of sizeof

PATCH In review Wei Tang 5 participants 11 messages Feb 2, 2016 – Feb 3, 2016 1 message not in the archive

Subsystems (136)
lore
Share & tools
lore

Wei Tang

author
#0 lore raw

PATCH 1/1 kernel/fork.c: use sizeof() instead of sizeof

This patch fixes the checkpatch.pl warning to fork.c:

WARNING: sizeof sig->rlim should be sizeof(sig->rlim)

---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/fork.c +1 -1
index 2e391c7..30e04d2 100644
@@ -1143,7 +1143,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
 	sig->real_timer.function = it_real_fn;
 
 	task_lock(current->group_leader);
-	memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
+	memcpy(sig->rlim, current->signal->rlim, sizeof(sig->rlim));
 	task_unlock(current->group_leader);
 
 	posix_cpu_timers_init_group(sig);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 14 lines · Wei Tang

This patch fixes the checkpatch.pl warning to fork.c:

WARNING: sizeof sig->rlim should be sizeof(sig->rlim)

---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/fork.c +0 -0
index 2e391c7..30e04d2 100644

kernel/fork.c static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) · line 1149

Quoted 8 lines
kernel/fork.c +1 -1
@@ -1143,7 +1143,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
 	sig->real_timer.function = it_real_fn;
 
 	task_lock(current->group_leader);
-	memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
+	memcpy(sig->rlim, current->signal->rlim, sizeof(sig->rlim));
 	task_unlock(current->group_leader);
 
 	posix_cpu_timers_init_group(sig);

So there's over 1,000 such occurances in the kernel and we do not need this drip-drip churn...

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

Thanks,

Ingo

#2 lore raw

PATCH 1/1 treewide: Use 'sizeof(x)' instead of 'sizeof x'

Quoted 3 lines · Ingo Molnar

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

So applying a semantic patch like this to all .c files:

@@ expression E; @@
-sizeof E
+sizeof(E)
@@ expression E2; @@
-sizeof((E2))
+sizeof(E2)

Produces the single patch below for the whole kernel - instead of generating a churn of 1,000+ patches ...

Since it's Coccinelle that generated the patch we can be reasonably sure that it's an identity transformation - or if it fails, it's a visible failure.

Thanks,

Ingo

---
 arch/alpha/kernel/setup.c                          |   4 +-
 arch/alpha/oprofile/common.c                       |   2 +-
 arch/arm/common/mcpm_entry.c                       |   2 +-
 arch/arm/mach-davinci/board-dm644x-evm.c           |   2 +-
 arch/arm/mach-ixp4xx/common.c                      |   2 +-
 arch/arm/mach-pxa/devices.c                        |   2 +-
 arch/arm/mach-u300/dummyspichip.c                  |   2 +-
 arch/cris/arch-v10/kernel/traps.c                  |   2 +-
 arch/cris/arch-v32/mach-a3/pinmux.c                |  12 +-
 arch/cris/arch-v32/mach-fs/pinmux.c                |  12 +-
 arch/cris/arch-v32/mm/intmem.c                     |   6 +-
 arch/cris/boot/tools/build.c                       |   8 +-
 arch/ia64/kernel/mca_drv.c                         |   2 +-
 arch/m68k/bvme6000/rtc.c                           |   2 +-
 arch/m68k/mvme16x/rtc.c                            |   2 +-
 arch/mips/boot/elf2ecoff.c                         |  29 ++-
 arch/mips/kernel/module.c                          |   2 +-
 arch/mips/oprofile/common.c                        |   2 +-
 arch/mips/sgi-ip22/ip22-gio.c                      |   2 +-
 arch/parisc/kernel/cache.c                         |   2 +-
 arch/parisc/kernel/process.c                       |   2 +-
 arch/parisc/math-emu/driver.c                      |   4 +-
 arch/powerpc/crypto/sha1.c                         |   2 +-
 arch/powerpc/kernel/kgdb.c                         |   6 +-
 arch/powerpc/oprofile/common.c                     |   2 +-
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c          |   2 +-
 arch/powerpc/platforms/cell/spufs/context.c        |   2 +-
 arch/powerpc/platforms/cell/spufs/file.c           |  22 +-
 arch/powerpc/platforms/cell/spufs/gang.c           |   2 +-
 arch/s390/crypto/sha_common.c                      |   2 +-
 arch/sparc/lib/bitext.c                            |   2 +-
 arch/tile/kernel/backtrace.c                       |   6 +-
 arch/um/kernel/um_arch.c                           |   2 +-
 arch/x86/boot/cpucheck.c                           |   2 +-
 arch/x86/boot/early_serial_console.c               |   4 +-
 arch/x86/boot/edd.c                                |   6 +-
 arch/x86/boot/main.c                               |   4 +-
 arch/x86/boot/memory.c                             |   2 +-
 arch/x86/boot/regs.c                               |   2 +-
 arch/x86/boot/video-vesa.c                         |   6 +-
 arch/x86/boot/video.c                              |   2 +-
 arch/x86/kernel/cpu/common.c                       |   4 +-
 arch/x86/kernel/cpu/mcheck/mce.c                   |   2 +-
 arch/x86/kernel/cpu/mtrr/generic.c                 |   2 +-
 arch/x86/kernel/cpu/mtrr/if.c                      |   8 +-
 arch/x86/kernel/e820.c                             |   2 +-
 arch/x86/kernel/head64.c                           |   2 +-
 arch/x86/kernel/msr.c                              |   8 +-
 arch/x86/kvm/assigned-dev.c                        |  14 +-
 arch/x86/kvm/emulate.c                             |  22 +-
 arch/x86/kvm/lapic.c                               |   2 +-
 arch/x86/kvm/x86.c                                 |  46 ++--
 arch/x86/tools/relocs.c                            |   4 +-
 drivers/acpi/acpi_video.c                          |   2 +-
 drivers/ata/sata_promise.c                         |   2 +-
 drivers/atm/iphase.c                               |   2 +-
 drivers/atm/lanai.c                                |   2 +-
 drivers/base/isa.c                                 |   2 +-
 drivers/base/power/sysfs.c                         |  16 +-
 drivers/base/regmap/regcache-lzo.c                 |   2 +-
 drivers/base/regmap/regcache-rbtree.c              |   2 +-
 drivers/block/aoe/aoeblk.c                         |   4 +-
 drivers/block/aoe/aoechr.c                         |   4 +-
 drivers/block/aoe/aoecmd.c                         |  26 +--
 drivers/block/aoe/aoedev.c                         |   6 +-
 drivers/block/cciss.c                              |   2 +-
 drivers/char/genrtc.c                              |   2 +-
 drivers/char/rtc.c                                 |   2 +-
 drivers/crypto/nx/nx-aes-xcbc.c                    |   2 +-
 drivers/crypto/nx/nx-sha256.c                      |   2 +-
 drivers/crypto/nx/nx-sha512.c                      |   2 +-
 drivers/firewire/nosy.c                            |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c        |   2 +-
 drivers/gpu/drm/drm_atomic.c                       |  12 +-
 drivers/gpu/drm/i915/intel_display.c               |   4 +-
 drivers/gpu/drm/radeon/radeon_display.c            |   2 +-
 drivers/i2c/i2c-core.c                             |   2 +-
 drivers/iio/industrialio-trigger.c                 |   4 +-
 drivers/infiniband/core/addr.c                     |   4 +-
 drivers/infiniband/core/agent.c                    |   2 +-
 drivers/infiniband/core/cache.c                    |  12 +-
 drivers/infiniband/core/cm.c                       |  32 +--
 drivers/infiniband/core/cma.c                      |  78 +++----
 drivers/infiniband/core/device.c                   |   8 +-
 drivers/infiniband/core/fmr_pool.c                 |   8 +-
 drivers/infiniband/core/mad.c                      |  38 +--
 drivers/infiniband/core/mad_rmpp.c                 |   2 +-
 drivers/infiniband/core/multicast.c                |  16 +-
 drivers/infiniband/core/netlink.c                  |   2 +-
 drivers/infiniband/core/sa_query.c                 |  12 +-
 drivers/infiniband/core/sysfs.c                    |   6 +-
 drivers/infiniband/core/ucm.c                      |   8 +-
 drivers/infiniband/core/ucma.c                     |  18 +-
 drivers/infiniband/core/ud_header.c                |   8 +-
 drivers/infiniband/core/umem.c                     |   2 +-
 drivers/infiniband/core/user_mad.c                 |  16 +-
 drivers/infiniband/core/uverbs_cmd.c               | 260 ++++++++++-----------
 drivers/infiniband/core/uverbs_main.c              |  10 +-
 drivers/infiniband/core/uverbs_marshall.c          |  10 +-
 drivers/infiniband/core/verbs.c                    |   4 +-
 drivers/infiniband/hw/cxgb3/cxio_hal.c             |   4 +-
 drivers/infiniband/hw/cxgb3/iwch_cm.c              |   2 +-
 drivers/infiniband/hw/cxgb3/iwch_provider.c        |  26 +--
 drivers/infiniband/hw/cxgb4/cm.c                   |  14 +-
 drivers/infiniband/hw/cxgb4/cq.c                   |  10 +-
 drivers/infiniband/hw/cxgb4/device.c               |  10 +-
 drivers/infiniband/hw/cxgb4/mem.c                  |   4 +-
 drivers/infiniband/hw/cxgb4/provider.c             |   4 +-
 drivers/infiniband/hw/cxgb4/qp.c                   |  64 ++---
 drivers/infiniband/hw/cxgb4/resource.c             |  16 +-
 drivers/infiniband/hw/mlx4/ah.c                    |   4 +-
 drivers/infiniband/hw/mlx4/alias_GUID.c            |  11 +-
 drivers/infiniband/hw/mlx4/cq.c                    |  14 +-
 drivers/infiniband/hw/mlx4/doorbell.c              |   2 +-
 drivers/infiniband/hw/mlx4/mad.c                   |  30 +--
 drivers/infiniband/hw/mlx4/main.c                  |  36 +--
 drivers/infiniband/hw/mlx4/mcg.c                   |  30 +--
 drivers/infiniband/hw/mlx4/mr.c                    |   2 +-
 drivers/infiniband/hw/mlx4/qp.c                    |  40 ++--
 drivers/infiniband/hw/mlx4/srq.c                   |   6 +-
 drivers/infiniband/hw/mlx4/sysfs.c                 |   8 +-
 drivers/infiniband/hw/mthca/mthca_allocator.c      |   8 +-
 drivers/infiniband/hw/mthca/mthca_av.c             |   6 +-
 drivers/infiniband/hw/mthca/mthca_cmd.c            |   2 +-
 drivers/infiniband/hw/mthca/mthca_cq.c             |   2 +-
 drivers/infiniband/hw/mthca/mthca_eq.c             |   6 +-
 drivers/infiniband/hw/mthca/mthca_mad.c            |   6 +-
 drivers/infiniband/hw/mthca/mthca_main.c           |   4 +-
 drivers/infiniband/hw/mthca/mthca_mcg.c            |   2 +-
 drivers/infiniband/hw/mthca/mthca_memfree.c        |  12 +-
 drivers/infiniband/hw/mthca/mthca_mr.c             |  12 +-
 drivers/infiniband/hw/mthca/mthca_profile.c        |   2 +-
 drivers/infiniband/hw/mthca/mthca_provider.c       |  70 +++---
 drivers/infiniband/hw/mthca/mthca_qp.c             |   8 +-
 drivers/infiniband/hw/mthca/mthca_srq.c            |   6 +-
 drivers/infiniband/hw/nes/nes_cm.c                 |   2 +-
 drivers/infiniband/hw/nes/nes_hw.c                 |   2 +-
 drivers/infiniband/hw/nes/nes_mgt.c                |   4 +-
 drivers/infiniband/hw/nes/nes_verbs.c              |  12 +-
 drivers/infiniband/hw/ocrdma/ocrdma_stats.c        |   2 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c        |   2 +-
 drivers/infiniband/ulp/ipoib/ipoib_cm.c            |  22 +-
 drivers/infiniband/ulp/ipoib/ipoib_fs.c            |  10 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c            |   4 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c          |  16 +-
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c     |   6 +-
 drivers/infiniband/ulp/ipoib/ipoib_verbs.c         |   2 +-
 drivers/infiniband/ulp/ipoib/ipoib_vlan.c          |   2 +-
 drivers/infiniband/ulp/iser/iser_verbs.c           |   6 +-
 drivers/infiniband/ulp/srp/ib_srp.c                |  30 +--
 drivers/infiniband/ulp/srpt/ib_srpt.c              |  42 ++--
 drivers/input/keyboard/lm8323.c                    |   2 +-
 drivers/input/misc/dm355evm_keys.c                 |   2 +-
 drivers/input/touchscreen/ad7877.c                 |   6 +-
 drivers/input/touchscreen/ads7846.c                |   4 +-
 drivers/isdn/gigaset/bas-gigaset.c                 |   2 +-
 drivers/isdn/gigaset/capi.c                        |   2 +-
 drivers/isdn/gigaset/common.c                      |   6 +-
 drivers/isdn/gigaset/ev-layer.c                    |   2 +-
 drivers/isdn/gigaset/i4l.c                         |  12 +-
 drivers/isdn/gigaset/interface.c                   |   8 +-
 drivers/isdn/i4l/isdn_tty.c                        |   2 +-
 drivers/md/dm-bufio.c                              |   4 +-
 drivers/md/dm-kcopyd.c                             |   2 +-
 drivers/media/dvb-core/dvb_net.c                   |   4 +-
 drivers/media/i2c/tvp5150.c                        |   2 +-
 drivers/media/pci/ngene/ngene-dvb.c                |   2 +-
 drivers/media/pci/saa7134/saa7134-video.c          |   4 +-
 drivers/media/pci/ttpci/av7110_ir.c                |   8 +-
 drivers/media/pci/ttpci/av7110_v4l.c               |   4 +-
 drivers/media/platform/m2m-deinterlace.c           |   2 +-
 drivers/media/platform/mx2_emmaprp.c               |   2 +-
 drivers/media/rc/ir-rc6-decoder.c                  |   4 +-
 drivers/media/usb/gspca/etoms.c                    |  16 +-
 drivers/media/usb/gspca/gspca.c                    |  22 +-
 drivers/media/usb/gspca/jeilinj.c                  |   2 +-
 drivers/media/usb/gspca/mars.c                     |   2 +-
 drivers/media/usb/gspca/mr97310a.c                 |   6 +-
 drivers/media/usb/gspca/ov519.c                    |   2 +-
 drivers/media/usb/gspca/pac207.c                   |   4 +-
 drivers/media/usb/gspca/pac7302.c                  |   6 +-
 drivers/media/usb/gspca/pac7311.c                  |   4 +-
 drivers/media/usb/gspca/sn9c2028.c                 |   6 +-
 drivers/media/usb/gspca/sonixj.c                   |  14 +-
 drivers/media/usb/gspca/sq930x.c                   |   2 +-
 drivers/media/usb/gspca/t613.c                     |  72 +++---
 drivers/media/usb/gspca/topro.c                    |  10 +-
 drivers/media/usb/gspca/zc3xx.c                    |   2 +-
 drivers/media/usb/uvc/uvc_ctrl.c                   |   6 +-
 drivers/media/usb/uvc/uvc_driver.c                 |  52 ++---
 drivers/media/usb/uvc/uvc_v4l2.c                   |  12 +-
 drivers/media/usb/uvc/uvc_video.c                  |   2 +-
 drivers/media/v4l2-core/v4l2-mem2mem.c             |   4 +-
 drivers/media/v4l2-core/videobuf2-dma-contig.c     |   6 +-
 drivers/media/v4l2-core/videobuf2-dma-sg.c         |   4 +-
 drivers/mfd/t7l66xb.c                              |   2 +-
 drivers/mfd/tc6393xb.c                             |   2 +-
 drivers/mfd/tps65010.c                             |  16 +-
 drivers/misc/apds990x.c                            |   2 +-
 drivers/misc/bh1770glc.c                           |   2 +-
 drivers/misc/eeprom/at25.c                         |   2 +-
 drivers/misc/ibmasm/r_heartbeat.c                  |   4 +-
 drivers/mtd/devices/m25p80.c                       |   2 +-
 drivers/mtd/devices/mtd_dataflash.c                |   6 +-
 drivers/net/ethernet/marvell/skge.c                |   2 +-
 drivers/net/ethernet/mellanox/mlx4/alloc.c         |   4 +-
 drivers/net/ethernet/mellanox/mlx4/cmd.c           |   2 +-
 drivers/net/ethernet/mellanox/mlx4/en_resources.c  |   4 +-
 drivers/net/ethernet/mellanox/mlx4/en_rx.c         |   2 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c         |   2 +-
 drivers/net/ethernet/mellanox/mlx4/eq.c            |  18 +-
 drivers/net/ethernet/mellanox/mlx4/icm.c           |   2 +-
 drivers/net/ethernet/mellanox/mlx4/intf.c          |   2 +-
 drivers/net/ethernet/mellanox/mlx4/main.c          |   4 +-
 drivers/net/ethernet/mellanox/mlx4/mcg.c           |  12 +-
 drivers/net/ethernet/mellanox/mlx4/mr.c            |   6 +-
 drivers/net/ethernet/mellanox/mlx4/qp.c            |   4 +-
 .../net/ethernet/mellanox/mlx4/resource_tracker.c  |  24 +-
 drivers/net/usb/mcs7830.c                          |   4 +-
 drivers/net/usb/net1080.c                          |  14 +-
 drivers/net/usb/pegasus.c                          |   2 +-
 drivers/net/usb/rndis_host.c                       |  42 ++--
 drivers/net/usb/sierra_net.c                       |   4 +-
 drivers/net/usb/usbnet.c                           |  12 +-
 drivers/net/usb/zaurus.c                           |   6 +-
 drivers/net/virtio_net.c                           |   2 +-
 drivers/net/wan/sbni.c                             |   6 +-
 drivers/net/wireless/marvell/mwifiex/scan.c        |   3 +-
 drivers/net/wireless/rndis_wlan.c                  |   6 +-
 drivers/oprofile/oprofile_perf.c                   |   2 +-
 drivers/parport/parport_serial.c                   |   2 +-
 drivers/parport/probe.c                            |   2 +-
 drivers/pcmcia/bfin_cf_pcmcia.c                    |   2 +-
 drivers/pcmcia/omap_cf.c                           |   2 +-
 drivers/rapidio/rio.c                              |   2 +-
 drivers/s390/crypto/zcrypt_api.c                   |   4 +-
 drivers/scsi/aha152x.c                             |   2 +-
 drivers/scsi/lpfc/lpfc_init.c                      |   8 +-
 drivers/scsi/ultrastor.c                           |   2 +-
 drivers/scsi/virtio_scsi.c                         |   2 +-
 drivers/scsi/vmw_pvscsi.c                          |   4 +-
 drivers/spi/spi-lm70llp.c                          |   2 +-
 drivers/spi/spi-mpc512x-psc.c                      |   4 +-
 drivers/spi/spi-mpc52xx-psc.c                      |   4 +-
 drivers/spi/spi-mpc52xx.c                          |   2 +-
 drivers/spi/spi-omap-uwire.c                       |   2 +-
 drivers/spi/spi-omap2-mcspi.c                      |   4 +-
 drivers/spi/spi-ppc4xx.c                           |   4 +-
 drivers/staging/most/hdm-dim2/dim2_hdm.c           |   4 +-
 drivers/staging/rdma/ehca/ehca_qp.c                |   2 +-
 drivers/staging/rdma/ehca/ehca_uverbs.c            |   2 +-
 drivers/staging/rdma/ipath/ipath_driver.c          |   4 +-
 drivers/staging/rdma/ipath/ipath_eeprom.c          |  12 +-
 drivers/staging/rdma/ipath/ipath_file_ops.c        |   4 +-
 drivers/staging/rdma/ipath/ipath_fs.c              |   8 +-
 drivers/staging/rdma/ipath/ipath_iba6110.c         |   6 +-
 drivers/staging/rdma/ipath/ipath_init_chip.c       |   2 +-
 drivers/staging/rdma/ipath/ipath_intr.c            |  10 +-
 drivers/staging/rdma/ipath/ipath_mmap.c            |   2 +-
 drivers/staging/rdma/ipath/ipath_mr.c              |  10 +-
 drivers/staging/rdma/ipath/ipath_rc.c              |   4 +-
 drivers/staging/rdma/ipath/ipath_ruc.c             |   4 +-
 drivers/staging/rdma/ipath/ipath_stats.c           |   8 +-
 drivers/staging/rdma/ipath/ipath_sysfs.c           |   4 +-
 drivers/staging/rdma/ipath/ipath_uc.c              |   2 +-
 drivers/staging/rdma/ipath/ipath_ud.c              |   2 +-
 drivers/staging/rdma/ipath/ipath_verbs.c           |  10 +-
 drivers/staging/rdma/ipath/ipath_verbs_mcast.c     |   4 +-
 drivers/target/target_core_spc.c                   |   2 +-
 drivers/tty/pty.c                                  |   4 +-
 drivers/tty/serial/8250/8250_of.c                  |   2 +-
 drivers/tty/serial/crisv10.c                       |   6 +-
 drivers/tty/vt/vt_ioctl.c                          |   4 +-
 drivers/usb/class/cdc-acm.c                        |   6 +-
 drivers/usb/core/hcd.c                             |  12 +-
 drivers/usb/core/hub.c                             |  12 +-
 drivers/usb/core/sysfs.c                           |   4 +-
 drivers/usb/core/usb.c                             |   4 +-
 drivers/usb/gadget/composite.c                     |   7 +-
 drivers/usb/gadget/function/f_acm.c                |   4 +-
 drivers/usb/gadget/function/f_ecm.c                |  20 +-
 drivers/usb/gadget/function/f_eem.c                |   4 +-
 drivers/usb/gadget/function/f_fs.c                 |  10 +-
 drivers/usb/gadget/function/f_hid.c                |   4 +-
 drivers/usb/gadget/function/f_loopback.c           |   2 +-
 drivers/usb/gadget/function/f_mass_storage.c       |   2 +-
 drivers/usb/gadget/function/f_ncm.c                |  22 +-
 drivers/usb/gadget/function/f_phonet.c             |  12 +-
 drivers/usb/gadget/function/f_rndis.c              |  16 +-
 drivers/usb/gadget/function/f_serial.c             |   2 +-
 drivers/usb/gadget/function/f_subset.c             |  10 +-
 drivers/usb/gadget/function/f_uac1.c               |   2 +-
 drivers/usb/gadget/function/f_uac2.c               |  50 ++--
 drivers/usb/gadget/function/rndis.c                |   4 +-
 drivers/usb/gadget/function/storage_common.c       |   2 +-
 drivers/usb/gadget/function/u_ether.c              |   2 +-
 drivers/usb/gadget/legacy/acm_ms.c                 |   2 +-
 drivers/usb/gadget/legacy/audio.c                  |   2 +-
 drivers/usb/gadget/legacy/cdc2.c                   |   2 +-
 drivers/usb/gadget/legacy/dbgp.c                   |   8 +-
 drivers/usb/gadget/legacy/ether.c                  |   2 +-
 drivers/usb/gadget/legacy/g_ffs.c                  |   2 +-
 drivers/usb/gadget/legacy/hid.c                    |   2 +-
 drivers/usb/gadget/legacy/inode.c                  |  18 +-
 drivers/usb/gadget/legacy/mass_storage.c           |   2 +-
 drivers/usb/gadget/legacy/multi.c                  |   2 +-
 drivers/usb/gadget/legacy/ncm.c                    |   2 +-
 drivers/usb/gadget/legacy/printer.c                |   2 +-
 drivers/usb/gadget/legacy/zero.c                   |   2 +-
 drivers/usb/gadget/udc/dummy_hcd.c                 |   6 +-
 drivers/usb/gadget/udc/fsl_udc_core.c              |   2 +-
 drivers/usb/gadget/udc/goku_udc.c                  |   4 +-
 drivers/usb/gadget/udc/mv_u3d_core.c               |   2 +-
 drivers/usb/gadget/udc/mv_udc_core.c               |   2 +-
 drivers/usb/gadget/udc/omap_udc.c                  |   6 +-
 drivers/usb/gadget/udc/pch_udc.c                   |  12 +-
 drivers/usb/gadget/udc/pxa25x_udc.c                |   2 +-
 drivers/usb/gadget/udc/pxa27x_udc.c                |   4 +-
 drivers/usb/host/ehci-dbg.c                        |  16 +-
 drivers/usb/host/ehci-mem.c                        |   8 +-
 drivers/usb/host/ehci-sched.c                      |   8 +-
 drivers/usb/host/isp116x-hcd.c                     |   2 +-
 drivers/usb/host/isp1362-hcd.c                     |   2 +-
 drivers/usb/host/ohci-dbg.c                        |   2 +-
 drivers/usb/host/ohci-hcd.c                        |   2 +-
 drivers/usb/host/ohci-mem.c                        |   4 +-
 drivers/usb/host/oxu210hp-hcd.c                    |  12 +-
 drivers/usb/host/sl811-hcd.c                       |   2 +-
 drivers/usb/host/xhci-mem.c                        |   6 +-
 drivers/usb/musb/cppi_dma.c                        |   2 +-
 drivers/usb/musb/musb_gadget.c                     |   4 +-
 drivers/usb/musb/musb_gadget_ep0.c                 |   2 +-
 drivers/usb/musb/musb_host.c                       |   2 +-
 drivers/usb/phy/phy-isp1301-omap.c                 |   4 +-
 drivers/usb/renesas_usbhs/mod_gadget.c             |   2 +-
 drivers/usb/serial/pl2303.c                        |   4 +-
 drivers/usb/storage/sddr55.c                       |  10 +-
 drivers/vhost/net.c                                |  16 +-
 drivers/vhost/scsi.c                               |  10 +-
 drivers/vhost/test.c                               |   8 +-
 drivers/vhost/vhost.c                              |  62 ++---
 drivers/video/console/sticore.c                    |   4 +-
 drivers/video/fbdev/carminefb.c                    |   4 +-
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c     |   2 +-
 drivers/video/fbdev/tmiofb.c                       |   2 +-
 drivers/virtio/virtio_balloon.c                    |   2 +-
 drivers/virtio/virtio_mmio.c                       |  24 +-
 drivers/virtio/virtio_pci_common.c                 |  16 +-
 drivers/virtio/virtio_pci_modern.c                 |  24 +-
 fs/autofs4/expire.c                                |   2 +-
 fs/autofs4/waitq.c                                 |   2 +-
 fs/binfmt_elf.c                                    |   4 +-
 fs/char_dev.c                                      |   2 +-
 fs/cifs/connect.c                                  |   2 +-
 fs/compat.c                                        |   6 +-
 fs/hpfs/namei.c                                    |   8 +-
 fs/isofs/inode.c                                   |   4 +-
 fs/proc/task_mmu.c                                 |   2 +-
 fs/pstore/inode.c                                  |   2 +-
 fs/statfs.c                                        |   2 +-
 fs/xfs/uuid.c                                      |   2 +-
 init/initramfs.c                                   |   2 +-
 ipc/compat_mq.c                                    |   4 +-
 kernel/fork.c                                      |   2 +-
 kernel/power/suspend_test.c                        |   2 +-
 kernel/ptrace.c                                    |   4 +-
 kernel/signal.c                                    |   2 +-
 kernel/sys.c                                       |   2 +-
 kernel/time/posix-cpu-timers.c                     |   8 +-
 lib/mpi/mpi-pow.c                                  |   2 +-
 lib/mpi/mpih-mul.c                                 |   4 +-
 lib/mpi/mpiutil.c                                  |   2 +-
 net/9p/trans_rdma.c                                |   6 +-
 net/atm/br2684.c                                   |   6 +-
 net/atm/pppoatm.c                                  |   2 +-
 net/compat.c                                       |   2 +-
 net/core/scm.c                                     |   2 +-
 net/openvswitch/flow_table.c                       |   2 +-
 net/rds/ib_rdma.c                                  |   2 +-
 net/rds/iw.c                                       |   2 +-
 net/rds/iw_rdma.c                                  |   2 +-
 net/sunrpc/xprtrdma/svc_rdma_sendto.c              |   4 +-
 net/sunrpc/xprtrdma/svc_rdma_transport.c           |   8 +-
 security/keys/encrypted-keys/encrypted.c           |  20 +-
 security/keys/trusted.c                            |  20 +-
 security/selinux/hooks.c                           |   4 +-
 security/selinux/ss/conditional.c                  |   4 +-
 security/selinux/ss/ebitmap.c                      |   2 +-
 security/selinux/ss/policydb.c                     |  15 +-
 sound/core/sound.c                                 |   2 +-
 sound/soc/codecs/tlv320aic26.c                     |   2 +-
 sound/soc/codecs/wm8983.c                          |   4 +-
 sound/soc/codecs/wm8985.c                          |   4 +-
 sound/soc/fsl/mpc5200_dma.c                        |   8 +-
 sound/soc/soc-core.c                               |   6 +-
 sound/spi/at73c213.c                               |   2 +-
 tools/firewire/nosy-dump.c                         |  12 +-
 tools/power/cpupower/utils/helpers/msr.c           |   4 +-
 tools/power/x86/turbostat/turbostat.c              |   4 +-
 .../x86_energy_perf_policy.c                       |  12 +-
 tools/spi/spidev_fdx.c                             |  10 +-
 tools/testing/selftests/vm/thuge-gen.c             |   4 +-
 tools/usb/testusb.c                                |  14 +-
 tools/virtio/ringtest/main.c                       |   8 +-
 tools/virtio/ringtest/ring.c                       |  10 +-
 tools/virtio/ringtest/virtio_ring_0_9.c            |   4 +-
 tools/virtio/virtio_test.c                         |  12 +-
 usr/gen_init_cpio.c                                |   2 +-
 408 files changed, 1613 insertions(+), 1618 deletions(-)
arch/alpha/kernel/setup.c +2 -2
index b20af76f12c1..4b69ebf30bc2 100644
@@ -559,9 +559,9 @@ setup_arch(char **cmdline_p)
 	   boot flags depending on the boot mode, we need some shorthand.
 	   This should do for installation.  */
 	if (strcmp(COMMAND_LINE, "INSTALL") == 0) {
-		strlcpy(command_line, "root=/dev/fd0 load_ramdisk=1", sizeof command_line);
+		strlcpy(command_line, "root=/dev/fd0 load_ramdisk=1", sizeof(command_line));
 	} else {
-		strlcpy(command_line, COMMAND_LINE, sizeof command_line);
+		strlcpy(command_line, COMMAND_LINE, sizeof(command_line));
 	}
 	strcpy(boot_command_line, command_line);
 	*cmdline_p = command_line;
arch/alpha/oprofile/common.c +1 -1
index 310a4ce1dccc..6ea17fc12255 100644
@@ -114,7 +114,7 @@ op_axp_create_files(struct dentry *root)
 		struct dentry *dir;
 		char buf[4];
 
-		snprintf(buf, sizeof buf, "%d", i);
+		snprintf(buf, sizeof(buf), "%d", i);
 		dir = oprofilefs_mkdir(root, buf);
 
 		oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
arch/arm/common/mcpm_entry.c +1 -1
index a923524d1040..5b05511204d5 100644
@@ -426,7 +426,7 @@ int __init mcpm_sync_init(
 {
 	unsigned int i, j, mpidr, this_cluster;
 
-	BUILD_BUG_ON(MCPM_SYNC_CLUSTER_SIZE * MAX_NR_CLUSTERS != sizeof mcpm_sync);
+	BUILD_BUG_ON(MCPM_SYNC_CLUSTER_SIZE * MAX_NR_CLUSTERS != sizeof(mcpm_sync));
 	BUG_ON((unsigned long)&mcpm_sync & (__CACHE_WRITEBACK_GRANULE - 1));
 
 	/*
arch/arm/mach-davinci/board-dm644x-evm.c +1 -1
index 7a20507a3eef..68fd04841cdd 100644
@@ -314,7 +314,7 @@ evm_led_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
 	 */
 	evm_led_dev = platform_device_alloc("leds-gpio", 0);
 	platform_device_add_data(evm_led_dev,
-			&evm_led_data, sizeof evm_led_data);
+			&evm_led_data, sizeof(evm_led_data));
 
 	evm_led_dev->dev.parent = &client->dev;
 	status = platform_device_add(evm_led_dev);
arch/arm/mach-ixp4xx/common.c +1 -1
index 1cb6f2f02880..7434525d1a2a 100644
@@ -348,7 +348,7 @@ static struct pxa2xx_udc_mach_info ixp4xx_udc_info;
 
 void __init ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info)
 {
-	memcpy(&ixp4xx_udc_info, info, sizeof *info);
+	memcpy(&ixp4xx_udc_info, info, sizeof(*info));
 }
 
 static struct resource ixp4xx_udc_resources[] = {
arch/arm/mach-pxa/devices.c +1 -1
index 37d8d85662f0..2d390b52f98c 100644
@@ -95,7 +95,7 @@ static struct pxa2xx_udc_mach_info pxa_udc_info = {
 
 void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info)
 {
-	memcpy(&pxa_udc_info, info, sizeof *info);
+	memcpy(&pxa_udc_info, info, sizeof(*info));
 }
 
 static struct resource pxa2xx_udc_resources[] = {
arch/arm/mach-u300/dummyspichip.c +1 -1
index 68fe986ca42e..4e23239c21e7 100644
@@ -222,7 +222,7 @@ static int pl022_dummy_probe(struct spi_device *spi)
 
 	dev_info(&spi->dev, "probing dummy SPI device\n");
 
-	p_dummy = kzalloc(sizeof *p_dummy, GFP_KERNEL);
+	p_dummy = kzalloc(sizeof(*p_dummy), GFP_KERNEL);
 	if (!p_dummy)
 		return -ENOMEM;
 
arch/cris/arch-v10/kernel/traps.c +1 -1
index 7001beda716c..929e0d07e861 100644
@@ -119,7 +119,7 @@ handle_BUG(struct pt_regs *regs)
 	unsigned char c;
 	unsigned long irp = regs->irp;
 
-	if (__copy_from_user(&f, (const void __user *)(irp - 8), sizeof f))
+	if (__copy_from_user(&f, (const void __user *)(irp - 8), sizeof(f)))
 		return;
 	if (f.prefix != BUG_PREFIX || f.magic != BUG_MAGIC)
 		return;
arch/cris/arch-v32/mach-a3/pinmux.c +6 -6
index 591f77526746..5993aea23c68 100644
@@ -83,7 +83,7 @@ int
 crisv32_pinmux_alloc_fixed(enum fixed_function function)
 {
 	int ret = -EINVAL;
-	char saved[sizeof pins];
+	char saved[sizeof(pins)];
 	unsigned long flags;
 	reg_pinmux_rw_hwprot hwprot;
 	reg_clkgen_rw_clk_ctrl clk_ctrl;
@@ -91,7 +91,7 @@ crisv32_pinmux_alloc_fixed(enum fixed_function function)
 	spin_lock_irqsave(&pinmux_lock, flags);
 
 	/* Save internal data for recovery */
-	memcpy(saved, pins, sizeof pins);
+	memcpy(saved, pins, sizeof(pins));
 
 	crisv32_pinmux_init(); /* must be done before we read rw_hwprot */
 
@@ -203,7 +203,7 @@ crisv32_pinmux_alloc_fixed(enum fixed_function function)
 		REG_WR(pinmux, regi_pinmux, rw_hwprot, hwprot);
 		REG_WR(clkgen, regi_clkgen, rw_clk_ctrl, clk_ctrl);
 	} else
-		memcpy(pins, saved, sizeof pins);
+		memcpy(pins, saved, sizeof(pins));
 
   spin_unlock_irqrestore(&pinmux_lock, flags);
 
@@ -261,14 +261,14 @@ int
 crisv32_pinmux_dealloc_fixed(enum fixed_function function)
 {
 	int ret = -EINVAL;
-	char saved[sizeof pins];
+	char saved[sizeof(pins)];
 	unsigned long flags;
 	reg_pinmux_rw_hwprot hwprot;
 
 	spin_lock_irqsave(&pinmux_lock, flags);
 
 	/* Save internal data for recovery */
-	memcpy(saved, pins, sizeof pins);
+	memcpy(saved, pins, sizeof(pins));
 
 	crisv32_pinmux_init(); /* must be done before we read rw_hwprot */
 
@@ -361,7 +361,7 @@ crisv32_pinmux_dealloc_fixed(enum fixed_function function)
 	if (!ret)
 		REG_WR(pinmux, regi_pinmux, rw_hwprot, hwprot);
 	else
-		memcpy(pins, saved, sizeof pins);
+		memcpy(pins, saved, sizeof(pins));
 
   spin_unlock_irqrestore(&pinmux_lock, flags);
 
arch/cris/arch-v32/mach-fs/pinmux.c +6 -6
index d8a3a3c439dd..7ae63ec82e63 100644
@@ -93,14 +93,14 @@ int crisv32_pinmux_alloc(int port, int first_pin, int last_pin,
 int crisv32_pinmux_alloc_fixed(enum fixed_function function)
 {
 	int ret = -EINVAL;
-	char saved[sizeof pins];
+	char saved[sizeof(pins)];
 	unsigned long flags;
 	reg_pinmux_rw_hwprot hwprot;
 
 	spin_lock_irqsave(&pinmux_lock, flags);
 
 	/* Save internal data for recovery */
-	memcpy(saved, pins, sizeof pins);
+	memcpy(saved, pins, sizeof(pins));
 
 	crisv32_pinmux_init();	/* Must be done before we read rw_hwprot */
 
@@ -168,7 +168,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function)
 	if (!ret)
 		REG_WR(pinmux, regi_pinmux, rw_hwprot, hwprot);
 	else
-		memcpy(pins, saved, sizeof pins);
+		memcpy(pins, saved, sizeof(pins));
 
 	spin_unlock_irqrestore(&pinmux_lock, flags);
 
@@ -228,14 +228,14 @@ int crisv32_pinmux_dealloc(int port, int first_pin, int last_pin)
 int crisv32_pinmux_dealloc_fixed(enum fixed_function function)
 {
 	int ret = -EINVAL;
-	char saved[sizeof pins];
+	char saved[sizeof(pins)];
 	unsigned long flags;
 	reg_pinmux_rw_hwprot hwprot;
 
 	spin_lock_irqsave(&pinmux_lock, flags);
 
 	/* Save internal data for recovery */
-	memcpy(saved, pins, sizeof pins);
+	memcpy(saved, pins, sizeof(pins));
 
 	crisv32_pinmux_init();	/* Must be done before we read rw_hwprot */
 
@@ -303,7 +303,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function)
 	if (!ret)
 		REG_WR(pinmux, regi_pinmux, rw_hwprot, hwprot);
 	else
-		memcpy(pins, saved, sizeof pins);
+		memcpy(pins, saved, sizeof(pins));
 
 	spin_unlock_irqrestore(&pinmux_lock, flags);
 
arch/cris/arch-v32/mm/intmem.c +3 -3
index 9ef56092a4c5..fc8c4b075eef 100644
@@ -34,7 +34,7 @@ static void crisv32_intmem_init(void)
 	static int initiated = 0;
 	if (!initiated) {
 		struct intmem_allocation* alloc;
-		alloc = kmalloc(sizeof *alloc, GFP_KERNEL);
+		alloc = kmalloc(sizeof(*alloc), GFP_KERNEL);
 		INIT_LIST_HEAD(&intmem_allocations);
 		intmem_virtual = ioremap(MEM_INTMEM_START + RESERVED_SIZE,
 					 MEM_INTMEM_SIZE - RESERVED_SIZE);
@@ -63,7 +63,7 @@ void* crisv32_intmem_alloc(unsigned size, unsigned align)
 		    allocation->size >= size + alignment) {
 			if (allocation->size > size + alignment) {
 				struct intmem_allocation* alloc;
-				alloc = kmalloc(sizeof *alloc, GFP_ATOMIC);
+				alloc = kmalloc(sizeof(*alloc), GFP_ATOMIC);
 				alloc->status = STATUS_FREE;
 				alloc->size = allocation->size - size -
 					alignment;
@@ -73,7 +73,7 @@ void* crisv32_intmem_alloc(unsigned size, unsigned align)
 
 				if (alignment) {
 					struct intmem_allocation *tmp;
-					tmp = kmalloc(sizeof *tmp, GFP_ATOMIC);
+					tmp = kmalloc(sizeof(*tmp), GFP_ATOMIC);
 					tmp->offset = allocation->offset;
 					tmp->size = alignment;
 					tmp->status = STATUS_FREE;
arch/cris/boot/tools/build.c +4 -4
index c8adef364160..af0b5dc2ee39 100644
@@ -141,7 +141,7 @@ int main(int argc, char ** argv)
 		minor_root = DEFAULT_MINOR_ROOT;
 	}
 	fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
-	for (i=0;i<sizeof buf; i++) buf[i]=0;
+	for (i=0;i<sizeof(buf); i++) buf[i]=0;
 	if ((id=open(argv[1],O_RDONLY,0))<0)
 		die("Unable to open 'boot'");
 	if (read(id,buf,MINIX_HEADER) != MINIX_HEADER)
@@ -158,7 +158,7 @@ int main(int argc, char ** argv)
 		die("Non-Minix header of 'boot'");
 	if (((long *) buf)[7] != 0)
 		die("Illegal symbol table in 'boot'");
-	i=read(id,buf,sizeof buf);
+	i=read(id,buf,sizeof(buf));
 	fprintf(stderr,"Boot sector %d bytes.\n",i);
 	if (i != 512)
 		die("Boot block must be exactly 512 bytes");
@@ -187,7 +187,7 @@ int main(int argc, char ** argv)
 		die("Non-Minix header of 'setup'");
 	if (((long *) buf)[7] != 0)
 		die("Illegal symbol table in 'setup'");
-	for (i=0 ; (c=read(id,buf,sizeof buf))>0 ; i+=c )
+	for (i=0 ; (c=read(id,buf,sizeof(buf)))>0 ; i+=c )
 #ifdef __BIG_KERNEL__
 	{
 		if (!i) {
@@ -217,7 +217,7 @@ int main(int argc, char ** argv)
 	if (setup_sectors < SETUP_SECTS)
 		setup_sectors = SETUP_SECTS;
 	fprintf(stderr,"Setup is %d bytes.\n",i);
-	for (c=0 ; c<sizeof(buf) ; c++)
+	for (c=0 ; c<sizeof(buf); c++)
 		buf[c] = '\0';
 	while (i < setup_sectors * 512) {
 		c = setup_sectors * 512 - i;
arch/ia64/kernel/mca_drv.c +1 -1
index 94f8bf777afa..452130a4c9b4 100644
@@ -343,7 +343,7 @@ init_record_index_pools(void)
 
 	/* - 2 - */
 	sect_min_size = sal_log_sect_min_sizes[0];
-	for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++)
+	for (i = 1; i < sizeof(sal_log_sect_min_sizes)/sizeof(size_t); i++)
 		if (sect_min_size > sal_log_sect_min_sizes[i])
 			sect_min_size = sal_log_sect_min_sizes[i];
 
arch/m68k/bvme6000/rtc.c +1 -1
index cf12a17dc289..43a97e7f9afe 100644
@@ -64,7 +64,7 @@ static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		} while (wtime.tm_sec != bcd2bin(rtc->bcd_sec));
 		rtc->msr = msr;
 		local_irq_restore(flags);
-		return copy_to_user(argp, &wtime, sizeof wtime) ?
+		return copy_to_user(argp, &wtime, sizeof(wtime)) ?
 								-EFAULT : 0;
 	}
 	case RTC_SET_TIME:	/* Set the RTC */
arch/m68k/mvme16x/rtc.c +1 -1
index 1755e2f7137d..2e41e1684a1e 100644
@@ -59,7 +59,7 @@ static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1;
 		rtc->ctrl = 0;
 		local_irq_restore(flags);
-		return copy_to_user(argp, &wtime, sizeof wtime) ?
+		return copy_to_user(argp, &wtime, sizeof(wtime)) ?
 								-EFAULT : 0;
 	}
 	case RTC_SET_TIME:	/* Set the RTC */
arch/mips/boot/elf2ecoff.c +14 -15
index 266c8137e859..ac9b23f8b8ac 100644
@@ -77,8 +77,8 @@ static void copy(int out, int in, off_t offset, off_t size)
 	remaining = size;
 	while (remaining) {
 		cur = remaining;
-		if (cur > sizeof ibuf)
-			cur = sizeof ibuf;
+		if (cur > sizeof(ibuf))
+			cur = sizeof(ibuf);
 		remaining -= cur;
 		if ((count = read(in, ibuf, cur)) != cur) {
 			fprintf(stderr, "copy: read: %s\n",
@@ -302,8 +302,8 @@ int main(int argc, char *argv[])
 	}
 
 	/* Read the header, which is at the beginning of the file... */
-	i = read(infile, &ex, sizeof ex);
-	if (i != sizeof ex) {
+	i = read(infile, &ex, sizeof(ex));
+	if (i != sizeof(ex)) {
 		fprintf(stderr, "ex: %s: %s.\n",
 			argv[1],
 			i ? strerror(errno) : "End of file reached");
@@ -425,7 +425,7 @@ int main(int argc, char *argv[])
 	eah.data_start = data.vaddr;
 	eah.bss_start = bss.vaddr;
 	eah.gprmask = 0xf3fffffe;
-	memset(&eah.cprmask, '\0', sizeof eah.cprmask);
+	memset(&eah.cprmask, '\0', sizeof(eah.cprmask));
 	eah.gp_value = 0;	/* unused. */
 
 	if (format_bigendian)
@@ -440,10 +440,10 @@ int main(int argc, char *argv[])
 	efh.f_timdat = 0;	/* bogus */
 	efh.f_symptr = 0;
 	efh.f_nsyms = 0;
-	efh.f_opthdr = sizeof eah;
+	efh.f_opthdr = sizeof(eah);
 	efh.f_flags = 0x100f;	/* Stripped, not sharable. */
 
-	memset(esecs, 0, sizeof esecs);
+	memset(esecs, 0, sizeof(esecs));
 	strcpy(esecs[0].s_name, ".text");
 	strcpy(esecs[1].s_name, ".data");
 	strcpy(esecs[2].s_name, ".bss");
@@ -511,8 +511,8 @@ int main(int argc, char *argv[])
 	if (must_convert_endian)
 		convert_ecoff_filehdr(&efh);
 	/* Write the headers... */
-	i = write(outfile, &efh, sizeof efh);
-	if (i != sizeof efh) {
+	i = write(outfile, &efh, sizeof(efh));
+	if (i != sizeof(efh)) {
 		perror("efh: write");
 		exit(1);
 
@@ -527,8 +527,8 @@ int main(int argc, char *argv[])
 
 	if (must_convert_endian)
 		convert_ecoff_aouthdr(&eah);
-	i = write(outfile, &eah, sizeof eah);
-	if (i != sizeof eah) {
+	i = write(outfile, &eah, sizeof(eah));
+	if (i != sizeof(eah)) {
 		perror("eah: write");
 		exit(1);
 	}
@@ -576,13 +576,12 @@ int main(int argc, char *argv[])
 				fprintf(stderr,
 					"Warning: %ld byte intersegment gap.\n",
 					gap);
-				memset(obuf, 0, sizeof obuf);
+				memset(obuf, 0, sizeof(obuf));
 				while (gap) {
 					int count =
 					    write(outfile, obuf,
 						  (gap >
-						   sizeof obuf ? sizeof
-						   obuf : gap));
+						   sizeof(obuf) ? sizeof(obuf) : gap));
 					if (count < 0) {
 						fprintf(stderr,
 							"Error writing gap: %s\n",
@@ -607,7 +606,7 @@ int main(int argc, char *argv[])
 	 */
 	{
 		char obuf[4096];
-		memset(obuf, 0, sizeof obuf);
+		memset(obuf, 0, sizeof(obuf));
 		if (write(outfile, obuf, sizeof(obuf)) != sizeof(obuf)) {
 			fprintf(stderr, "Error writing PROM padding: %s\n",
 				strerror(errno));
arch/mips/kernel/module.c +1 -1
index 1833f5171ccd..733219f4486e 100644
@@ -94,7 +94,7 @@ static int apply_r_mips_hi16_rel(struct module *me, u32 *location, Elf_Addr v)
 	 * the carry we need to add.  Save the information, and let LO16 do the
 	 * actual relocation.
 	 */
-	n = kmalloc(sizeof *n, GFP_KERNEL);
+	n = kmalloc(sizeof(*n), GFP_KERNEL);
 	if (!n)
 		return -ENOMEM;
 
arch/mips/oprofile/common.c +1 -1
index 3c9ec3ddca84..1870546fd678 100644
@@ -43,7 +43,7 @@ static int op_mips_create_files(struct dentry *root)
 		struct dentry *dir;
 		char buf[4];
 
-		snprintf(buf, sizeof buf, "%d", i);
+		snprintf(buf, sizeof(buf), "%d", i);
 		dir = oprofilefs_mkdir(root, buf);
 
 		oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
arch/mips/sgi-ip22/ip22-gio.c +1 -1
index cdf187600010..1835763bb4e2 100644
@@ -358,7 +358,7 @@ static void ip22_check_gio(int slotno, unsigned long addr, int irq)
 		}
 		printk(KERN_INFO "GIO: slot %d : %s (id %x)\n",
 		       slotno, name, id);
-		gio_dev = kzalloc(sizeof *gio_dev, GFP_KERNEL);
+		gio_dev = kzalloc(sizeof(*gio_dev), GFP_KERNEL);
 		gio_dev->name = name;
 		gio_dev->slotno = slotno;
 		gio_dev->id.id = id;
arch/parisc/kernel/cache.c +1 -1
index 91c2a39cd5aa..86215afe34ab 100644
@@ -239,7 +239,7 @@ parisc_cache_init(void)
 
 #ifndef CONFIG_PA20
 	if (pdc_btlb_info(&btlb_info) < 0) {
-		memset(&btlb_info, 0, sizeof btlb_info);
+		memset(&btlb_info, 0, sizeof(btlb_info));
 	}
 #endif
 
arch/parisc/kernel/process.c +1 -1
index 809905a811ed..10b0a896a44d 100644
@@ -171,7 +171,7 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t *r)
 	if (regs == NULL)
 		return 0;
 
-	memcpy(r, regs->fr, sizeof *r);
+	memcpy(r, regs->fr, sizeof(*r));
 	return 1;
 }
 
arch/parisc/math-emu/driver.c +2 -2
index 09ef4136c693..30b51d24098b 100644
@@ -92,7 +92,7 @@ handle_fpe(struct pt_regs *regs)
 	 */
 	__u64 frcopy[36];
 
-	memcpy(frcopy, regs->fr, sizeof regs->fr);
+	memcpy(frcopy, regs->fr, sizeof(regs->fr));
 	frcopy[32] = 0;
 
 	memcpy(&orig_sw, frcopy, sizeof(orig_sw));
@@ -114,7 +114,7 @@ handle_fpe(struct pt_regs *regs)
 		printk(KERN_DEBUG "\n");
 	}
 
-	memcpy(regs->fr, frcopy, sizeof regs->fr);
+	memcpy(regs->fr, frcopy, sizeof(regs->fr));
 	if (signalcode != 0) {
 	    si.si_signo = signalcode >> 24;
 	    si.si_errno = 0;
arch/powerpc/crypto/sha1.c +1 -1
index c154cebc1041..9fa3db4c2af5 100644
@@ -99,7 +99,7 @@ static int sha1_final(struct shash_desc *desc, u8 *out)
 		dst[i] = cpu_to_be32(sctx->state[i]);
 
 	/* Wipe context */
-	memset(sctx, 0, sizeof *sctx);
+	memset(sctx, 0, sizeof(*sctx));
 
 	return 0;
 }
arch/powerpc/kernel/kgdb.c +3 -3
index e77c3ccf8dcf..abad4a656a39 100644
@@ -175,15 +175,15 @@ static int kgdb_singlestep(struct pt_regs *regs)
 
 	if (thread_info != exception_thread_info) {
 		/* Save the original current_thread_info. */
-		memcpy(backup_current_thread_info, exception_thread_info, sizeof *thread_info);
-		memcpy(exception_thread_info, thread_info, sizeof *thread_info);
+		memcpy(backup_current_thread_info, exception_thread_info, sizeof(*thread_info));
+		memcpy(exception_thread_info, thread_info, sizeof(*thread_info));
 	}
 
 	kgdb_handle_exception(0, SIGTRAP, 0, regs);
 
 	if (thread_info != exception_thread_info)
 		/* Restore current_thread_info lastly. */
-		memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info);
+		memcpy(exception_thread_info, backup_current_thread_info, sizeof(*thread_info));
 
 	return 1;
 }
arch/powerpc/oprofile/common.c +1 -1
index bf094c5a4bd9..de02342a3c63 100644
@@ -159,7 +159,7 @@ static int op_powerpc_create_files(struct dentry *root)
 		struct dentry *dir;
 		char buf[4];
 
-		snprintf(buf, sizeof buf, "%d", i);
+		snprintf(buf, sizeof(buf), "%d", i);
 		dir = oprofilefs_mkdir(root, buf);
 
 		oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -1
index 3048e34db6d8..d1a77befdf18 100644
@@ -724,7 +724,7 @@ static int mpc52xx_gpt_probe(struct platform_device *ofdev)
 {
 	struct mpc52xx_gpt_priv *gpt;
 
-	gpt = devm_kzalloc(&ofdev->dev, sizeof *gpt, GFP_KERNEL);
+	gpt = devm_kzalloc(&ofdev->dev, sizeof(*gpt), GFP_KERNEL);
 	if (!gpt)
 		return -ENOMEM;
 
arch/powerpc/platforms/cell/spufs/context.c +1 -1
index 3b4152faeb1f..64116dd10c24 100644
@@ -37,7 +37,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
 {
 	struct spu_context *ctx;
 
-	ctx = kzalloc(sizeof *ctx, GFP_KERNEL);
+	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		goto out;
 	/* Binding to physical processor deferred
arch/powerpc/platforms/cell/spufs/file.c +11 -11
index 2936a0044c04..da5641c151f8 100644
@@ -477,7 +477,7 @@ __spufs_regs_read(struct spu_context *ctx, char __user *buffer,
 {
 	struct spu_lscsa *lscsa = ctx->csa.lscsa;
 	return simple_read_from_buffer(buffer, size, pos,
-				      lscsa->gprs, sizeof lscsa->gprs);
+				      lscsa->gprs, sizeof(lscsa->gprs));
 }
 
 static ssize_t
@@ -668,7 +668,7 @@ static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
 
 	spu_release(ctx);
 
-	if (copy_to_user(buf, &mbox_stat, sizeof mbox_stat))
+	if (copy_to_user(buf, &mbox_stat, sizeof(mbox_stat)))
 		return -EFAULT;
 
 	return 4;
@@ -817,7 +817,7 @@ static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
 	ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff;
 	spu_release(ctx);
 
-	if (copy_to_user(buf, &ibox_stat, sizeof ibox_stat))
+	if (copy_to_user(buf, &ibox_stat, sizeof(ibox_stat)))
 		return -EFAULT;
 
 	return 4;
@@ -967,7 +967,7 @@ static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
 	wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff;
 	spu_release(ctx);
 
-	if (copy_to_user(buf, &wbox_stat, sizeof wbox_stat))
+	if (copy_to_user(buf, &wbox_stat, sizeof(wbox_stat)))
 		return -EFAULT;
 
 	return 4;
@@ -1695,11 +1695,11 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
 	struct mfc_dma_command cmd;
 	int ret = -EINVAL;
 
-	if (size != sizeof cmd)
+	if (size != sizeof(cmd))
 		goto out;
 
 	ret = -EFAULT;
-	if (copy_from_user(&cmd, buffer, sizeof cmd))
+	if (copy_from_user(&cmd, buffer, sizeof(cmd)))
 		goto out;
 
 	ret = spufs_check_valid_dma(&cmd);
@@ -2038,7 +2038,7 @@ static ssize_t __spufs_mbox_info_read(struct spu_context *ctx,
 
 	data = ctx->csa.prob.pu_mb_R;
 
-	return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
+	return simple_read_from_buffer(buf, len, pos, &data, sizeof(data));
 }
 
 static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf,
@@ -2078,7 +2078,7 @@ static ssize_t __spufs_ibox_info_read(struct spu_context *ctx,
 
 	data = ctx->csa.priv2.puint_mb_R;
 
-	return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
+	return simple_read_from_buffer(buf, len, pos, &data, sizeof(data));
 }
 
 static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf,
@@ -2173,7 +2173,7 @@ static ssize_t __spufs_dma_info_read(struct spu_context *ctx,
 	}
 
 	return simple_read_from_buffer(buf, len, pos, &info,
-				sizeof info);
+				sizeof(info));
 }
 
 static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
@@ -2207,7 +2207,7 @@ static ssize_t __spufs_proxydma_info_read(struct spu_context *ctx,
 {
 	struct spu_proxydma_info info;
 	struct mfc_cq_sr *qp, *puqp;
-	int ret = sizeof info;
+	int ret = sizeof(info);
 	int i;
 
 	if (len < ret)
@@ -2230,7 +2230,7 @@ static ssize_t __spufs_proxydma_info_read(struct spu_context *ctx,
 	}
 
 	return simple_read_from_buffer(buf, len, pos, &info,
-				sizeof info);
+				sizeof(info));
 }
 
 static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
arch/powerpc/platforms/cell/spufs/gang.c +1 -1
index 71a443253021..f4252e10c1fc 100644
@@ -29,7 +29,7 @@ struct spu_gang *alloc_spu_gang(void)
 {
 	struct spu_gang *gang;
 
-	gang = kzalloc(sizeof *gang, GFP_KERNEL);
+	gang = kzalloc(sizeof(*gang), GFP_KERNEL);
 	if (!gang)
 		goto out;
 
arch/s390/crypto/sha_common.c +1 -1
index 8620b0ec9c42..97f6824e4148 100644
@@ -96,7 +96,7 @@ int s390_sha_final(struct shash_desc *desc, u8 *out)
 	/* copy digest to out */
 	memcpy(out, ctx->state, crypto_shash_digestsize(desc->tfm));
 	/* wipe context */
-	memset(ctx, 0, sizeof *ctx);
+	memset(ctx, 0, sizeof(*ctx));
 
 	return 0;
 }
arch/sparc/lib/bitext.c +1 -1
index 8ec4e9c0251a..0bfe37fc7f43 100644
@@ -120,7 +120,7 @@ void bit_map_clear(struct bit_map *t, int offset, int len)
 void bit_map_init(struct bit_map *t, unsigned long *map, int size)
 {
 	bitmap_zero(map, size);
-	memset(t, 0, sizeof *t);
+	memset(t, 0, sizeof(*t));
 	spin_lock_init(&t->lock);
 	t->map = map;
 	t->size = size;
arch/tile/kernel/backtrace.c +3 -3
index f8b74ca83b92..1f2e8342cffc 100644
@@ -311,8 +311,8 @@ static void find_caller_pc_and_caller_sp(CallerLocation *location,
 			 * prevent any problems.
 			 */
 			unsigned int bytes_to_prefetch = 4096 - (pc & 4095);
-			if (bytes_to_prefetch > sizeof prefetched_bundles)
-				bytes_to_prefetch = sizeof prefetched_bundles;
+			if (bytes_to_prefetch > sizeof(prefetched_bundles))
+				bytes_to_prefetch = sizeof(prefetched_bundles);
 
 			if (!read_memory_func(prefetched_bundles, pc,
 					      bytes_to_prefetch,
@@ -641,7 +641,7 @@ bool backtrace_next(BacktraceIterator *state)
 	}
 
 	/* Try to read the frame linkage data chaining to the next function. */
-	if (!state->read_memory_func(&next_frame, state->fp, sizeof next_frame,
+	if (!state->read_memory_func(&next_frame, state->fp, sizeof(next_frame),
 				     state->read_memory_func_extra)) {
 		return false;
 	}
arch/um/kernel/um_arch.c +1 -1
index 16630e75f056..b553ee32891a 100644
@@ -345,7 +345,7 @@ void __init setup_arch(char **cmdline_p)
 	paging_init();
 	strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
 	*cmdline_p = command_line;
-	setup_hostinfo(host_info, sizeof host_info);
+	setup_hostinfo(host_info, sizeof(host_info));
 }
 
 void __init check_bugs(void)
arch/x86/boot/cpucheck.c +1 -1
index 1fd7d575092e..8f297c01edc6 100644
@@ -103,7 +103,7 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
 {
 	int err;
 
-	memset(&cpu.flags, 0, sizeof cpu.flags);
+	memset(&cpu.flags, 0, sizeof(cpu.flags));
 	cpu.level = 3;
 
 	if (has_eflag(X86_EFLAGS_AC))
arch/x86/boot/early_serial_console.c +2 -2
index 45a07684bbab..f764a466c4e3 100644
@@ -45,7 +45,7 @@ static void parse_earlyprintk(void)
 	int pos = 0;
 	int port = 0;
 
-	if (cmdline_find_option("earlyprintk", arg, sizeof arg) > 0) {
+	if (cmdline_find_option("earlyprintk", arg, sizeof(arg)) > 0) {
 		char *e;
 
 		if (!strncmp(arg, "serial", 6)) {
@@ -119,7 +119,7 @@ static void parse_console_uart8250(void)
 	 * console=uart8250,io,0x3f8,115200n8
 	 * need to make sure it is last one console !
 	 */
-	if (cmdline_find_option("console", optstr, sizeof optstr) <= 0)
+	if (cmdline_find_option("console", optstr, sizeof(optstr)) <= 0)
 		return;
 
 	options = optstr;
arch/x86/boot/edd.c +3 -3
index 223e42527077..6c176b6a42ad 100644
@@ -76,7 +76,7 @@ static int get_edd_info(u8 devno, struct edd_info *ei)
 {
 	struct biosregs ireg, oreg;
 
-	memset(ei, 0, sizeof *ei);
+	memset(ei, 0, sizeof(*ei));
 
 	/* Check Extensions Present */
 
@@ -133,7 +133,7 @@ void query_edd(void)
 	struct edd_info ei, *edp;
 	u32 *mbrptr;
 
-	if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
+	if (cmdline_find_option("edd", eddarg, sizeof(eddarg)) > 0) {
 		if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) {
 			do_edd = 1;
 			do_mbr = 0;
@@ -166,7 +166,7 @@ void query_edd(void)
 		 */
 		if (!get_edd_info(devno, &ei)
 		    && boot_params.eddbuf_entries < EDDMAXNR) {
-			memcpy(edp, &ei, sizeof ei);
+			memcpy(edp, &ei, sizeof(ei));
 			edp++;
 			boot_params.eddbuf_entries++;
 		}
arch/x86/boot/main.c +2 -2
index 9bcea386db65..73532543d689 100644
@@ -36,8 +36,8 @@ static void copy_boot_params(void)
 	const struct old_cmdline * const oldcmd =
 		(const struct old_cmdline *)OLD_CL_ADDRESS;
 
-	BUILD_BUG_ON(sizeof boot_params != 4096);
-	memcpy(&boot_params.hdr, &hdr, sizeof hdr);
+	BUILD_BUG_ON(sizeof(boot_params) != 4096);
+	memcpy(&boot_params.hdr, &hdr, sizeof(hdr));
 
 	if (!boot_params.hdr.cmd_line_ptr &&
 	    oldcmd->cl_magic == OLD_CL_MAGIC) {
arch/x86/boot/memory.c +1 -1
index db75d07c3645..cf1bd92873b4 100644
@@ -26,7 +26,7 @@ static int detect_memory_e820(void)
 
 	initregs(&ireg);
 	ireg.ax  = 0xe820;
-	ireg.cx  = sizeof buf;
+	ireg.cx  = sizeof(buf);
 	ireg.edx = SMAP;
 	ireg.di  = (size_t)&buf;
 
arch/x86/boot/regs.c +1 -1
index c0fb356a3092..2fe3616ba161 100644
@@ -21,7 +21,7 @@
 
 void initregs(struct biosregs *reg)
 {
-	memset(reg, 0, sizeof *reg);
+	memset(reg, 0, sizeof(*reg));
 	reg->eflags |= X86_EFLAGS_CF;
 	reg->ds = ds();
 	reg->es = ds();
arch/x86/boot/video-vesa.c +3 -3
index ba3e100654db..3ecc11a9c440 100644
@@ -62,7 +62,7 @@ static int vesa_probe(void)
 		if (mode & ~0x1ff)
 			continue;
 
-		memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
+		memset(&vminfo, 0, sizeof(vminfo)); /* Just in case... */
 
 		ireg.ax = 0x4f01;
 		ireg.cx = mode;
@@ -109,7 +109,7 @@ static int vesa_set_mode(struct mode_info *mode)
 	int is_graphic;
 	u16 vesa_mode = mode->mode - VIDEO_FIRST_VESA;
 
-	memset(&vminfo, 0, sizeof vminfo); /* Just in case... */
+	memset(&vminfo, 0, sizeof(vminfo)); /* Just in case... */
 
 	initregs(&ireg);
 	ireg.ax = 0x4f01;
@@ -241,7 +241,7 @@ void vesa_store_edid(void)
 	struct biosregs ireg, oreg;
 
 	/* Apparently used as a nonsense token... */
-	memset(&boot_params.edid_info, 0x13, sizeof boot_params.edid_info);
+	memset(&boot_params.edid_info, 0x13, sizeof(boot_params.edid_info));
 
 	if (vginfo.version < 0x0200)
 		return;		/* EDID requires VBE 2.0+ */
arch/x86/boot/video.c +1 -1
index 77780e386e9b..ac89b6624a40 100644
@@ -115,7 +115,7 @@ static unsigned int get_entry(void)
 		} else if ((key >= '0' && key <= '9') ||
 			   (key >= 'A' && key <= 'Z') ||
 			   (key >= 'a' && key <= 'z')) {
-			if (len < sizeof entry_buf) {
+			if (len < sizeof(entry_buf)) {
 				entry_buf[len++] = key;
 				putchar(key);
 			}
arch/x86/kernel/cpu/common.c +2 -2
index 37830de8f60a..acdf06dd655c 100644
@@ -727,7 +727,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 #endif
 	c->x86_cache_alignment = c->x86_clflush_size;
 
-	memset(&c->x86_capability, 0, sizeof c->x86_capability);
+	memset(&c->x86_capability, 0, sizeof(c->x86_capability));
 	c->extended_cpuid_level = 0;
 
 	if (!have_cpuid_p())
@@ -879,7 +879,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
 	c->x86_virt_bits = 32;
 #endif
 	c->x86_cache_alignment = c->x86_clflush_size;
-	memset(&c->x86_capability, 0, sizeof c->x86_capability);
+	memset(&c->x86_capability, 0, sizeof(c->x86_capability));
 
 	generic_identify(c);
 
arch/x86/kernel/cpu/mcheck/mce.c +1 -1
index a006f4cd792b..953eb59bad1b 100644
@@ -2312,7 +2312,7 @@ static int mce_device_create(unsigned int cpu)
 	if (!mce_available(&boot_cpu_data))
 		return -EIO;
 
-	dev = kzalloc(sizeof *dev, GFP_KERNEL);
+	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
 	if (!dev)
 		return -ENOMEM;
 	dev->id  = cpu;
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
index c870af161008..e3a372d37661 100644
@@ -795,7 +795,7 @@ static void generic_set_all(void)
 	local_irq_restore(flags);
 
 	/* Use the atomic bitops to update the global mask */
-	for (count = 0; count < sizeof mask * 8; ++count) {
+	for (count = 0; count < sizeof(mask) * 8; ++count) {
 		if (mask & 0x01)
 			set_bit(count, &smp_changes_mask);
 		mask >>= 1;
arch/x86/kernel/cpu/mtrr/if.c +4 -4
index d76f13d6d8d6..6c2502524c6a 100644
@@ -43,7 +43,7 @@ mtrr_file_add(unsigned long base, unsigned long size,
 
 	max = num_var_ranges;
 	if (fcount == NULL) {
-		fcount = kzalloc(max * sizeof *fcount, GFP_KERNEL);
+		fcount = kzalloc(max * sizeof(*fcount), GFP_KERNEL);
 		if (!fcount)
 			return -ENOMEM;
 		FILE_FCOUNT(file) = fcount;
@@ -182,12 +182,12 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
 	case MTRRIOC_SET_PAGE_ENTRY:
 	case MTRRIOC_DEL_PAGE_ENTRY:
 	case MTRRIOC_KILL_PAGE_ENTRY:
-		if (copy_from_user(&sentry, arg, sizeof sentry))
+		if (copy_from_user(&sentry, arg, sizeof(sentry)))
 			return -EFAULT;
 		break;
 	case MTRRIOC_GET_ENTRY:
 	case MTRRIOC_GET_PAGE_ENTRY:
-		if (copy_from_user(&gentry, arg, sizeof gentry))
+		if (copy_from_user(&gentry, arg, sizeof(gentry)))
 			return -EFAULT;
 		break;
 #ifdef CONFIG_COMPAT
@@ -340,7 +340,7 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
 	switch (cmd) {
 	case MTRRIOC_GET_ENTRY:
 	case MTRRIOC_GET_PAGE_ENTRY:
-		if (copy_to_user(arg, &gentry, sizeof gentry))
+		if (copy_to_user(arg, &gentry, sizeof(gentry)))
 			err = -EFAULT;
 		break;
 #ifdef CONFIG_COMPAT
arch/x86/kernel/e820.c +1 -1
index 569c1e4f96fe..cc3521216046 100644
@@ -302,7 +302,7 @@ int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
 	chg_nr = chgidx;
 
 	/* sort change-point list by memory addresses (low -> high) */
-	sort(change_point, chg_nr, sizeof *change_point, cpcompare, NULL);
+	sort(change_point, chg_nr, sizeof(*change_point), cpcompare, NULL);
 
 	/* create a new bios memory map, removing overlaps */
 	overlap_entries = 0;	 /* number of entries in the overlap table */
arch/x86/kernel/head64.c +1 -1
index 2c0f3407bd1f..16313eeabf7f 100644
@@ -129,7 +129,7 @@ static void __init copy_bootdata(char *real_mode_data)
 	char * command_line;
 	unsigned long cmd_line_ptr;
 
-	memcpy(&boot_params, real_mode_data, sizeof boot_params);
+	memcpy(&boot_params, real_mode_data, sizeof(boot_params));
 	sanitize_boot_params(&boot_params);
 	cmd_line_ptr = get_cmd_line_ptr();
 	if (cmd_line_ptr) {
arch/x86/kernel/msr.c +4 -4
index 64f9616f93f1..f56dcbff3105 100644
@@ -114,14 +114,14 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
 			err = -EBADF;
 			break;
 		}
-		if (copy_from_user(&regs, uregs, sizeof regs)) {
+		if (copy_from_user(&regs, uregs, sizeof(regs))) {
 			err = -EFAULT;
 			break;
 		}
 		err = rdmsr_safe_regs_on_cpu(cpu, regs);
 		if (err)
 			break;
-		if (copy_to_user(uregs, &regs, sizeof regs))
+		if (copy_to_user(uregs, &regs, sizeof(regs)))
 			err = -EFAULT;
 		break;
 
@@ -130,14 +130,14 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
 			err = -EBADF;
 			break;
 		}
-		if (copy_from_user(&regs, uregs, sizeof regs)) {
+		if (copy_from_user(&regs, uregs, sizeof(regs))) {
 			err = -EFAULT;
 			break;
 		}
 		err = wrmsr_safe_regs_on_cpu(cpu, regs);
 		if (err)
 			break;
-		if (copy_to_user(uregs, &regs, sizeof regs))
+		if (copy_to_user(uregs, &regs, sizeof(regs)))
 			err = -EFAULT;
 		break;
 
arch/x86/kvm/assigned-dev.c +7 -7
index 9dc091acd5fb..38c6d76186c9 100644
@@ -982,7 +982,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 		struct kvm_assigned_pci_dev assigned_dev;
 
 		r = -EFAULT;
-		if (copy_from_user(&assigned_dev, argp, sizeof assigned_dev))
+		if (copy_from_user(&assigned_dev, argp, sizeof(assigned_dev)))
 			goto out;
 		r = kvm_vm_ioctl_assign_device(kvm, &assigned_dev);
 		if (r)
@@ -997,7 +997,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 		struct kvm_assigned_irq assigned_irq;
 
 		r = -EFAULT;
-		if (copy_from_user(&assigned_irq, argp, sizeof assigned_irq))
+		if (copy_from_user(&assigned_irq, argp, sizeof(assigned_irq)))
 			goto out;
 		r = kvm_vm_ioctl_assign_irq(kvm, &assigned_irq);
 		if (r)
@@ -1008,7 +1008,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 		struct kvm_assigned_irq assigned_irq;
 
 		r = -EFAULT;
-		if (copy_from_user(&assigned_irq, argp, sizeof assigned_irq))
+		if (copy_from_user(&assigned_irq, argp, sizeof(assigned_irq)))
 			goto out;
 		r = kvm_vm_ioctl_deassign_dev_irq(kvm, &assigned_irq);
 		if (r)
@@ -1019,7 +1019,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 		struct kvm_assigned_pci_dev assigned_dev;
 
 		r = -EFAULT;
-		if (copy_from_user(&assigned_dev, argp, sizeof assigned_dev))
+		if (copy_from_user(&assigned_dev, argp, sizeof(assigned_dev)))
 			goto out;
 		r = kvm_vm_ioctl_deassign_device(kvm, &assigned_dev);
 		if (r)
@@ -1029,7 +1029,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 	case KVM_ASSIGN_SET_MSIX_NR: {
 		struct kvm_assigned_msix_nr entry_nr;
 		r = -EFAULT;
-		if (copy_from_user(&entry_nr, argp, sizeof entry_nr))
+		if (copy_from_user(&entry_nr, argp, sizeof(entry_nr)))
 			goto out;
 		r = kvm_vm_ioctl_set_msix_nr(kvm, &entry_nr);
 		if (r)
@@ -1039,7 +1039,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 	case KVM_ASSIGN_SET_MSIX_ENTRY: {
 		struct kvm_assigned_msix_entry entry;
 		r = -EFAULT;
-		if (copy_from_user(&entry, argp, sizeof entry))
+		if (copy_from_user(&entry, argp, sizeof(entry)))
 			goto out;
 		r = kvm_vm_ioctl_set_msix_entry(kvm, &entry);
 		if (r)
@@ -1050,7 +1050,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
 		struct kvm_assigned_pci_dev assigned_dev;
 
 		r = -EFAULT;
-		if (copy_from_user(&assigned_dev, argp, sizeof assigned_dev))
+		if (copy_from_user(&assigned_dev, argp, sizeof(assigned_dev)))
 			goto out;
 		r = kvm_vm_ioctl_set_pci_irq_mask(kvm, &assigned_dev);
 		break;
arch/x86/kvm/emulate.c +11 -11
index 1505587d06e9..54206cd20635 100644
@@ -1449,7 +1449,7 @@ static int read_interrupt_descriptor(struct x86_emulate_ctxt *ctxt,
 		return emulate_gp(ctxt, index << 3 | 0x2);
 
 	addr = dt.address + index * 8;
-	return ctxt->ops->read_std(ctxt, addr, desc, sizeof *desc,
+	return ctxt->ops->read_std(ctxt, addr, desc, sizeof(*desc),
 				   &ctxt->exception);
 }
 
@@ -1463,7 +1463,7 @@ static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt,
 		struct desc_struct desc;
 		u16 sel;
 
-		memset (dt, 0, sizeof *dt);
+		memset (dt, 0, sizeof(*dt));
 		if (!ops->get_segment(ctxt, &sel, &desc, &base3,
 				      VCPU_SREG_LDTR))
 			return;
@@ -1528,7 +1528,7 @@ static int write_segment_descriptor(struct x86_emulate_ctxt *ctxt,
 	if (rc != X86EMUL_CONTINUE)
 		return rc;
 
-	return ctxt->ops->write_std(ctxt, addr, desc, sizeof *desc,
+	return ctxt->ops->write_std(ctxt, addr, desc, sizeof(*desc),
 				    &ctxt->exception);
 }
 
@@ -1548,7 +1548,7 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
 	u16 dummy;
 	u32 base3 = 0;
 
-	memset(&seg_desc, 0, sizeof seg_desc);
+	memset(&seg_desc, 0, sizeof(seg_desc));
 
 	if (ctxt->mode == X86EMUL_MODE_REAL) {
 		/* set real mode segment descriptor (keep limit etc. for
@@ -2958,19 +2958,19 @@ static int task_switch_16(struct x86_emulate_ctxt *ctxt,
 	int ret;
 	u32 new_tss_base = get_desc_base(new_desc);
 
-	ret = ops->read_std(ctxt, old_tss_base, &tss_seg, sizeof tss_seg,
+	ret = ops->read_std(ctxt, old_tss_base, &tss_seg, sizeof(tss_seg),
 			    &ctxt->exception);
 	if (ret != X86EMUL_CONTINUE)
 		return ret;
 
 	save_state_to_tss16(ctxt, &tss_seg);
 
-	ret = ops->write_std(ctxt, old_tss_base, &tss_seg, sizeof tss_seg,
+	ret = ops->write_std(ctxt, old_tss_base, &tss_seg, sizeof(tss_seg),
 			     &ctxt->exception);
 	if (ret != X86EMUL_CONTINUE)
 		return ret;
 
-	ret = ops->read_std(ctxt, new_tss_base, &tss_seg, sizeof tss_seg,
+	ret = ops->read_std(ctxt, new_tss_base, &tss_seg, sizeof(tss_seg),
 			    &ctxt->exception);
 	if (ret != X86EMUL_CONTINUE)
 		return ret;
@@ -2980,7 +2980,7 @@ static int task_switch_16(struct x86_emulate_ctxt *ctxt,
 
 		ret = ops->write_std(ctxt, new_tss_base,
 				     &tss_seg.prev_task_link,
-				     sizeof tss_seg.prev_task_link,
+				     sizeof(tss_seg.prev_task_link),
 				     &ctxt->exception);
 		if (ret != X86EMUL_CONTINUE)
 			return ret;
@@ -3104,7 +3104,7 @@ static int task_switch_32(struct x86_emulate_ctxt *ctxt,
 	u32 eip_offset = offsetof(struct tss_segment_32, eip);
 	u32 ldt_sel_offset = offsetof(struct tss_segment_32, ldt_selector);
 
-	ret = ops->read_std(ctxt, old_tss_base, &tss_seg, sizeof tss_seg,
+	ret = ops->read_std(ctxt, old_tss_base, &tss_seg, sizeof(tss_seg),
 			    &ctxt->exception);
 	if (ret != X86EMUL_CONTINUE)
 		return ret;
@@ -3117,7 +3117,7 @@ static int task_switch_32(struct x86_emulate_ctxt *ctxt,
 	if (ret != X86EMUL_CONTINUE)
 		return ret;
 
-	ret = ops->read_std(ctxt, new_tss_base, &tss_seg, sizeof tss_seg,
+	ret = ops->read_std(ctxt, new_tss_base, &tss_seg, sizeof(tss_seg),
 			    &ctxt->exception);
 	if (ret != X86EMUL_CONTINUE)
 		return ret;
@@ -3127,7 +3127,7 @@ static int task_switch_32(struct x86_emulate_ctxt *ctxt,
 
 		ret = ops->write_std(ctxt, new_tss_base,
 				     &tss_seg.prev_task_link,
-				     sizeof tss_seg.prev_task_link,
+				     sizeof(tss_seg.prev_task_link),
 				     &ctxt->exception);
 		if (ret != X86EMUL_CONTINUE)
 			return ret;
arch/x86/kvm/lapic.c +1 -1
index 36591faed13b..e78fac6dddf3 100644
@@ -1900,7 +1900,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu,
 	kvm_lapic_set_base(vcpu, vcpu->arch.apic_base);
 	/* set SPIV separately to get count of SW disabled APICs right */
 	apic_set_spiv(apic, *((u32 *)(s->regs + APIC_SPIV)));
-	memcpy(vcpu->arch.apic->regs, s->regs, sizeof *s);
+	memcpy(vcpu->arch.apic->regs, s->regs, sizeof(*s));
 	/* call kvm_apic_set_id() to put apic into apic_map */
 	kvm_apic_set_id(apic, kvm_apic_id(apic));
 	kvm_apic_set_version(vcpu);
arch/x86/kvm/x86.c +23 -23

180 lines not on this page · raw message

arch/x86/tools/relocs.c +2 -2
index 0c2fae8d929d..4a3b61ddecc5 100644
@@ -128,7 +128,7 @@ static void regex_init(int use_real_mode)
 			      REG_EXTENDED|REG_NOSUB);
 
 		if (err) {
-			regerror(err, &sym_regex_c[i], errbuf, sizeof errbuf);
+			regerror(err, &sym_regex_c[i], errbuf, sizeof(errbuf));
 			die("%s", errbuf);
 		}
         }
@@ -402,7 +402,7 @@ static void read_shdrs(FILE *fp)
 	}
 	for (i = 0; i < ehdr.e_shnum; i++) {
 		struct section *sec = &secs[i];
-		if (fread(&shdr, sizeof shdr, 1, fp) != 1)
+		if (fread(&shdr, sizeof(shdr), 1, fp) != 1)
 			die("Cannot read ELF section headers %d/%d: %s\n",
 			    i, ehdr.e_shnum, strerror(errno));
 		sec->shdr.sh_name      = elf_word_to_cpu(shdr.sh_name);
drivers/acpi/acpi_video.c +1 -1
index a76f8be1bfe7..8bfac37f0acf 100644
@@ -811,7 +811,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
 		goto out;
 	}
 
-	br->levels = kmalloc((obj->package.count + 2) * sizeof *(br->levels),
+	br->levels = kmalloc((obj->package.count + 2) * sizeof(*(br->levels)),
 				GFP_KERNEL);
 	if (!br->levels) {
 		result = -ENOMEM;
drivers/ata/sata_promise.c +1 -1
index 0fa211e2831c..f65316db40ff 100644
@@ -1223,7 +1223,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev,
 		dev_err(&pdev->dev, "failed to allocate host\n");
 		return -ENOMEM;
 	}
-	hpriv = devm_kzalloc(&pdev->dev, sizeof *hpriv, GFP_KERNEL);
+	hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL);
 	if (!hpriv)
 		return -ENOMEM;
 	spin_lock_init(&hpriv->hard_reset_lock);
drivers/atm/iphase.c +1 -1
index 7d00f2994738..108e6bdeda09 100644
@@ -2753,7 +2753,7 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
       if (!dev->phy->ioctl) return -EINVAL;
       return dev->phy->ioctl(dev,cmd,arg);
    }
-   if (copy_from_user(&ia_cmds, arg, sizeof ia_cmds)) return -EFAULT; 
+   if (copy_from_user(&ia_cmds, arg, sizeof(ia_cmds))) return -EFAULT; 
    board = ia_cmds.status;
    if ((board < 0) || (board > iadev_count))
          board = 0;    
drivers/atm/lanai.c +1 -1
index ce43ae3e87b3..7bcae6680a34 100644
@@ -2127,7 +2127,7 @@ static int lanai_dev_open(struct atm_dev *atmdev)
 	lanai->nbound = 0;
 #endif
 	lanai->cbrvcc = NULL;
-	memset(&lanai->stats, 0, sizeof lanai->stats);
+	memset(&lanai->stats, 0, sizeof(lanai->stats));
 	spin_lock_init(&lanai->endtxlock);
 	spin_lock_init(&lanai->servicelock);
 	atmdev->ci_range.vpi_bits = 0;
drivers/base/isa.c +1 -1
index 91dba65d7264..536127790a4e 100644
@@ -126,7 +126,7 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev)
 	for (id = 0; id < ndev; id++) {
 		struct isa_dev *isa_dev;
 
-		isa_dev = kzalloc(sizeof *isa_dev, GFP_KERNEL);
+		isa_dev = kzalloc(sizeof(*isa_dev), GFP_KERNEL);
 		if (!isa_dev) {
 			error = -ENOMEM;
 			break;
drivers/base/power/sysfs.c +8 -8
index a7b46798c81d..77990d414b9f 100644
@@ -115,9 +115,9 @@ static ssize_t control_store(struct device * dev, struct device_attribute *attr,
 	if (cp)
 		len = cp - buf;
 	device_lock(dev);
-	if (len == sizeof ctrl_auto - 1 && strncmp(buf, ctrl_auto, len) == 0)
+	if (len == sizeof(ctrl_auto) - 1 && strncmp(buf, ctrl_auto, len) == 0)
 		pm_runtime_allow(dev);
-	else if (len == sizeof ctrl_on - 1 && strncmp(buf, ctrl_on, len) == 0)
+	else if (len == sizeof(ctrl_on) - 1 && strncmp(buf, ctrl_on, len) == 0)
 		pm_runtime_forbid(dev);
 	else
 		n = -EINVAL;
@@ -355,11 +355,11 @@ wake_store(struct device * dev, struct device_attribute *attr,
 	cp = memchr(buf, '\n', n);
 	if (cp)
 		len = cp - buf;
-	if (len == sizeof _enabled - 1
-			&& strncmp(buf, _enabled, sizeof _enabled - 1) == 0)
+	if (len == sizeof(_enabled) - 1
+			&& strncmp(buf, _enabled, sizeof(_enabled) - 1) == 0)
 		device_set_wakeup_enable(dev, 1);
-	else if (len == sizeof _disabled - 1
-			&& strncmp(buf, _disabled, sizeof _disabled - 1) == 0)
+	else if (len == sizeof(_disabled) - 1
+			&& strncmp(buf, _disabled, sizeof(_disabled) - 1) == 0)
 		device_set_wakeup_enable(dev, 0);
 	else
 		return -EINVAL;
@@ -576,9 +576,9 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
 	cp = memchr(buf, '\n', n);
 	if (cp)
 		len = cp - buf;
-	if (len == sizeof _enabled - 1 && strncmp(buf, _enabled, len) == 0)
+	if (len == sizeof(_enabled) - 1 && strncmp(buf, _enabled, len) == 0)
 		device_enable_async_suspend(dev);
-	else if (len == sizeof _disabled - 1 &&
+	else if (len == sizeof(_disabled) - 1 &&
 		 strncmp(buf, _disabled, len) == 0)
 		device_disable_async_suspend(dev);
 	else
drivers/base/regmap/regcache-lzo.c +1 -1
index 6f77d7319fc6..0e675ed1532e 100644
@@ -162,7 +162,7 @@ static int regcache_lzo_init(struct regmap *map)
 
 	/* allocate the lzo blocks and initialize them */
 	for (i = 0; i < blkcount; i++) {
-		lzo_blocks[i] = kzalloc(sizeof **lzo_blocks,
+		lzo_blocks[i] = kzalloc(sizeof(**lzo_blocks),
 					GFP_KERNEL);
 		if (!lzo_blocks[i]) {
 			kfree(sync_bmp);
drivers/base/regmap/regcache-rbtree.c +1 -1
index aa56af87d941..47ca3d82976e 100644
@@ -202,7 +202,7 @@ static int regcache_rbtree_init(struct regmap *map)
 	int i;
 	int ret;
 
-	map->cache = kmalloc(sizeof *rbtree_ctx, GFP_KERNEL);
+	map->cache = kmalloc(sizeof(*rbtree_ctx), GFP_KERNEL);
 	if (!map->cache)
 		return -ENOMEM;
 
drivers/block/aoe/aoeblk.c +2 -2
index dd73e1ff1759..38305392403d 100644
@@ -65,7 +65,7 @@ static ssize_t aoedisk_show_netif(struct device *dev,
 	struct aoeif *ifp, *e;
 	char *p;
 
-	memset(nds, 0, sizeof nds);
+	memset(nds, 0, sizeof(nds));
 	nd = nds;
 	ne = nd + ARRAY_SIZE(nds);
 	t = d->targets;
@@ -409,7 +409,7 @@ aoeblk_gdalloc(void *vp)
 	gd->fops = &aoe_bdops;
 	gd->private_data = d;
 	set_capacity(gd, d->ssize);
-	snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%d",
+	snprintf(gd->disk_name, sizeof(gd->disk_name), "etherd/e%ld.%d",
 		d->aoemajor, d->aoeminor);
 
 	d->flags &= ~DEVFL_GDALLOC;
drivers/block/aoe/aoechr.c +2 -2
index ab41be625a53..9c52dec327df 100644
@@ -85,9 +85,9 @@ revalidate(const char __user *str, size_t size)
 	struct sk_buff *skb;
 	char buf[16];
 
-	if (size >= sizeof buf)
+	if (size >= sizeof(buf))
 		return -EINVAL;
-	buf[sizeof buf - 1] = '\0';
+	buf[sizeof(buf) - 1] = '\0';
 	if (copy_from_user(buf, str, size))
 		return -EFAULT;
 
drivers/block/aoe/aoecmd.c +13 -13
index d048d2009e89..84553e3b27c5 100644
@@ -130,8 +130,8 @@ aoehdr_atainit(struct aoedev *d, struct aoetgt *t, struct aoe_hdr *h)
 {
 	u32 host_tag = newtag(d);
 
-	memcpy(h->src, t->ifp->nd->dev_addr, sizeof h->src);
-	memcpy(h->dst, t->addr, sizeof h->dst);
+	memcpy(h->src, t->ifp->nd->dev_addr, sizeof(h->src));
+	memcpy(h->dst, t->addr, sizeof(h->dst));
 	h->type = __constant_cpu_to_be16(ETH_P_AOE);
 	h->verfl = AOE_HVER;
 	h->major = cpu_to_be16(d->aoemajor);
@@ -424,19 +424,19 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff_head *qu
 		if (!is_aoe_netif(ifp))
 			goto cont;
 
-		skb = new_skb(sizeof *h + sizeof *ch);
+		skb = new_skb(sizeof(*h) + sizeof(*ch));
 		if (skb == NULL) {
 			printk(KERN_INFO "aoe: skb alloc failure\n");
 			goto cont;
 		}
-		skb_put(skb, sizeof *h + sizeof *ch);
+		skb_put(skb, sizeof(*h) + sizeof(*ch));
 		skb->dev = ifp;
 		__skb_queue_tail(queue, skb);
 		h = (struct aoe_hdr *) skb_mac_header(skb);
-		memset(h, 0, sizeof *h + sizeof *ch);
+		memset(h, 0, sizeof(*h) + sizeof(*ch));
 
-		memset(h->dst, 0xff, sizeof h->dst);
-		memcpy(h->src, ifp->dev_addr, sizeof h->src);
+		memset(h->dst, 0xff, sizeof(h->dst));
+		memcpy(h->src, ifp->dev_addr, sizeof(h->src));
 		h->type = __constant_cpu_to_be16(ETH_P_AOE);
 		h->verfl = AOE_HVER;
 		h->major = cpu_to_be16(aoemajor);
@@ -482,8 +482,8 @@ resend(struct aoedev *d, struct frame *f)
 	f->tag = n;
 	fhash(f);
 	h->tag = cpu_to_be32(n);
-	memcpy(h->dst, t->addr, sizeof h->dst);
-	memcpy(h->src, t->ifp->nd->dev_addr, sizeof h->src);
+	memcpy(h->dst, t->addr, sizeof(h->dst));
+	memcpy(h->src, t->ifp->nd->dev_addr, sizeof(h->src));
 
 	skb->dev = t->ifp->nd;
 	skb = skb_clone(skb, GFP_ATOMIC);
@@ -562,7 +562,7 @@ ejectif(struct aoetgt *t, struct aoeif *ifp)
 
 	nd = ifp->nd;
 	e = t->ifs + NAOEIFS - 1;
-	n = (e - ifp) * sizeof *ifp;
+	n = (e - ifp) * sizeof(*ifp);
 	memmove(ifp, ifp+1, n);
 	e->nd = NULL;
 	dev_put(nd);
@@ -1374,7 +1374,7 @@ aoecmd_ata_rsp(struct sk_buff *skb)
 	aoemajor = be16_to_cpu(get_unaligned(&h->major));
 	d = aoedev_by_aoeaddr(aoemajor, h->minor, 0);
 	if (d == NULL) {
-		snprintf(ebuf, sizeof ebuf, "aoecmd_ata_rsp: ata response "
+		snprintf(ebuf, sizeof(ebuf), "aoecmd_ata_rsp: ata response "
 			"for unknown device %d.%d\n",
 			aoemajor, h->minor);
 		aoechr_error(ebuf);
@@ -1453,7 +1453,7 @@ aoecmd_ata_id(struct aoedev *d)
 	skb = f->skb;
 	h = (struct aoe_hdr *) skb_mac_header(skb);
 	ah = (struct aoe_atahdr *) (h+1);
-	skb_put(skb, sizeof *h + sizeof *ah);
+	skb_put(skb, sizeof(*h) + sizeof(*ah));
 	memset(h, 0, skb->len);
 	f->tag = aoehdr_atainit(d, t, h);
 	fhash(f);
@@ -1521,7 +1521,7 @@ addtgt(struct aoedev *d, char *addr, ulong nframes)
 		goto nomem;
 	t->nframes = nframes;
 	t->d = d;
-	memcpy(t->addr, addr, sizeof t->addr);
+	memcpy(t->addr, addr, sizeof(t->addr));
 	t->ifp = t->ifs;
 	aoecmd_wreset(t);
 	t->maxout = t->nframes / 2;
drivers/block/aoe/aoedev.c +3 -3
index ffd1947500c6..0c55bd501875 100644
@@ -313,8 +313,8 @@ flush(const char __user *str, size_t cnt, int exiting)
 	skipflags = DEVFL_GDALLOC | DEVFL_NEWSIZE | DEVFL_TKILL;
 
 	if (!exiting && cnt >= 3) {
-		if (cnt > sizeof buf)
-			cnt = sizeof buf;
+		if (cnt > sizeof(buf))
+			cnt = sizeof(buf);
 		if (copy_from_user(buf, str, cnt))
 			return -EFAULT;
 		all = !strncmp(buf, "all", 3);
@@ -453,7 +453,7 @@ aoedev_by_aoeaddr(ulong maj, int min, int do_alloc)
 		}
 	if (d || !do_alloc || minor_get(&sysminor, maj, min) < 0)
 		goto out;
-	d = kcalloc(1, sizeof *d, GFP_ATOMIC);
+	d = kcalloc(1, sizeof(*d), GFP_ATOMIC);
 	if (!d)
 		goto out;
 	d->targets = kcalloc(NTARGETS, sizeof(*d->targets), GFP_ATOMIC);
drivers/block/cciss.c +1 -1
index 63c2064689f8..88a849179209 100644
@@ -519,7 +519,7 @@ cciss_proc_write(struct file *file, const char __user *buf,
 		return PTR_ERR(buffer);
 
 #ifdef CONFIG_CISS_SCSI_TAPE
-	if (strncmp(ENGAGE_SCSI, buffer, sizeof ENGAGE_SCSI - 1) == 0) {
+	if (strncmp(ENGAGE_SCSI, buffer, sizeof(ENGAGE_SCSI) - 1) == 0) {
 		struct seq_file *seq = file->private_data;
 		ctlr_info_t *h = seq->private;
 
drivers/char/genrtc.c +1 -1
index 4f943759d376..d27a7f10df5e 100644
@@ -276,7 +276,7 @@ static int gen_rtc_ioctl(struct file *file,
 	    if (get_rtc_pll(&pll))
 	 	    return -EINVAL;
 	    else
-		    return copy_to_user(argp, &pll, sizeof pll) ? -EFAULT : 0;
+		    return copy_to_user(argp, &pll, sizeof(pll)) ? -EFAULT : 0;
 
 	case RTC_PLL_SET:
 		if (!capable(CAP_SYS_TIME))
drivers/char/rtc.c +1 -1
index 35259961cc38..11a3005926d0 100644
@@ -712,7 +712,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
 		return -ENOTTY;
 	}
 	return copy_to_user((void __user *)arg,
-			    &wtime, sizeof wtime) ? -EFAULT : 0;
+			    &wtime, sizeof(wtime)) ? -EFAULT : 0;
 }
 
 static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
drivers/crypto/nx/nx-aes-xcbc.c +1 -1
index c2f7d4befb55..871d69336af7 100644
@@ -171,7 +171,7 @@ static int nx_xcbc_init(struct shash_desc *desc)
 {
 	struct xcbc_state *sctx = shash_desc_ctx(desc);
 
-	memset(sctx, 0, sizeof *sctx);
+	memset(sctx, 0, sizeof(*sctx));
 
 	return 0;
 }
drivers/crypto/nx/nx-sha256.c +1 -1
index becb738c897b..5c7fdbaba180 100644
@@ -50,7 +50,7 @@ static int nx_crypto_ctx_sha256_init(struct crypto_tfm *tfm)
 static int nx_sha256_init(struct shash_desc *desc) {
 	struct sha256_state *sctx = shash_desc_ctx(desc);
 
-	memset(sctx, 0, sizeof *sctx);
+	memset(sctx, 0, sizeof(*sctx));
 
 	sctx->state[0] = __cpu_to_be32(SHA256_H0);
 	sctx->state[1] = __cpu_to_be32(SHA256_H1);
drivers/crypto/nx/nx-sha512.c +1 -1
index b6e183d58d73..af2a2c0010ee 100644
@@ -50,7 +50,7 @@ static int nx_sha512_init(struct shash_desc *desc)
 {
 	struct sha512_state *sctx = shash_desc_ctx(desc);
 
-	memset(sctx, 0, sizeof *sctx);
+	memset(sctx, 0, sizeof(*sctx));
 
 	sctx->state[0] = __cpu_to_be64(SHA512_H0);
 	sctx->state[1] = __cpu_to_be64(SHA512_H1);
drivers/firewire/nosy.c +3 -3
index 76b2d390f6ec..d82102aca91b 100644
@@ -289,7 +289,7 @@ nosy_open(struct inode *inode, struct file *file)
 	if (lynx == NULL)
 		return -ENODEV;
 
-	client = kmalloc(sizeof *client, GFP_KERNEL);
+	client = kmalloc(sizeof(*client), GFP_KERNEL);
 	if (client == NULL)
 		goto fail;
 
@@ -366,7 +366,7 @@ nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		stats.lost_packet_count  = client->buffer.lost_packet_count;
 		spin_unlock_irq(client_list_lock);
 
-		if (copy_to_user((void __user *) arg, &stats, sizeof stats))
+		if (copy_to_user((void __user *) arg, &stats, sizeof(stats)))
 			return -EFAULT;
 		else
 			return 0;
@@ -547,7 +547,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)
 	}
 	pci_set_master(dev);
 
-	lynx = kzalloc(sizeof *lynx, GFP_KERNEL);
+	lynx = kzalloc(sizeof(*lynx), GFP_KERNEL);
 	if (lynx == NULL) {
 		dev_err(&dev->dev, "Failed to allocate control structure\n");
 		ret = -ENOMEM;
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
index acd066d0a805..5ebb5106b535 100644
@@ -169,7 +169,7 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
 	u64 base;
 	int i, r;
 
-	work = kzalloc(sizeof *work, GFP_KERNEL);
+	work = kzalloc(sizeof(*work), GFP_KERNEL);
 	if (work == NULL)
 		return -ENOMEM;
 
drivers/gpu/drm/drm_atomic.c +6 -6
index 3f74193885f1..44adf9264ef7 100644
@@ -1350,23 +1350,23 @@ static struct drm_pending_vblank_event *create_vblank_event(
 	unsigned long flags;
 
 	spin_lock_irqsave(&dev->event_lock, flags);
-	if (file_priv->event_space < sizeof e->event) {
+	if (file_priv->event_space < sizeof(e->event)) {
 		spin_unlock_irqrestore(&dev->event_lock, flags);
 		goto out;
 	}
-	file_priv->event_space -= sizeof e->event;
+	file_priv->event_space -= sizeof(e->event);
 	spin_unlock_irqrestore(&dev->event_lock, flags);
 
-	e = kzalloc(sizeof *e, GFP_KERNEL);
+	e = kzalloc(sizeof(*e), GFP_KERNEL);
 	if (e == NULL) {
 		spin_lock_irqsave(&dev->event_lock, flags);
-		file_priv->event_space += sizeof e->event;
+		file_priv->event_space += sizeof(e->event);
 		spin_unlock_irqrestore(&dev->event_lock, flags);
 		goto out;
 	}
 
 	e->event.base.type = DRM_EVENT_FLIP_COMPLETE;
-	e->event.base.length = sizeof e->event;
+	e->event.base.length = sizeof(e->event);
 	e->event.user_data = user_data;
 	e->base.event = &e->event.base;
 	e->base.file_priv = file_priv;
@@ -1382,7 +1382,7 @@ static void destroy_vblank_event(struct drm_device *dev,
 	unsigned long flags;
 
 	spin_lock_irqsave(&dev->event_lock, flags);
-	file_priv->event_space += sizeof e->event;
+	file_priv->event_space += sizeof(e->event);
 	spin_unlock_irqrestore(&dev->event_lock, flags);
 	kfree(e);
 }
drivers/gpu/drm/i915/intel_display.c +2 -2
index 2f00828ccc6e..4d15d40636e9 100644
@@ -6504,7 +6504,7 @@ struct intel_connector *intel_connector_alloc(void)
 {
 	struct intel_connector *connector;
 
-	connector = kzalloc(sizeof *connector, GFP_KERNEL);
+	connector = kzalloc(sizeof(*connector), GFP_KERNEL);
 	if (!connector)
 		return NULL;
 
@@ -12336,7 +12336,7 @@ clear_intel_crtc_state(struct intel_crtc_state *crtc_state)
 	ddi_pll_sel = crtc_state->ddi_pll_sel;
 	force_thru = crtc_state->pch_pfit.force_thru;
 
-	memset(crtc_state, 0, sizeof *crtc_state);
+	memset(crtc_state, 0, sizeof(*crtc_state));
 
 	crtc_state->base = tmp_state;
 	crtc_state->scaler_state = scaler_state;
drivers/gpu/drm/radeon/radeon_display.c +1 -1
index 298ea1c453c3..ffd4438f2ed6 100644
@@ -502,7 +502,7 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc,
 	unsigned long flags;
 	int r;
 
-	work = kzalloc(sizeof *work, GFP_KERNEL);
+	work = kzalloc(sizeof(*work), GFP_KERNEL);
 	if (work == NULL)
 		return -ENOMEM;
 
drivers/i2c/i2c-core.c +1 -1
index ffe715d346d8..2158b03fd2f2 100644
@@ -1038,7 +1038,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
 	struct i2c_client	*client;
 	int			status;
 
-	client = kzalloc(sizeof *client, GFP_KERNEL);
+	client = kzalloc(sizeof(*client), GFP_KERNEL);
 	if (!client)
 		return NULL;
 
drivers/iio/industrialio-trigger.c +2 -2
index ae2806aafb72..0c93905d1604 100644
@@ -267,7 +267,7 @@ struct iio_poll_func
 	va_list vargs;
 	struct iio_poll_func *pf;
 
-	pf = kmalloc(sizeof *pf, GFP_KERNEL);
+	pf = kmalloc(sizeof(*pf), GFP_KERNEL);
 	if (pf == NULL)
 		return NULL;
 	va_start(vargs, fmt);
@@ -445,7 +445,7 @@ static void iio_trig_subirqunmask(struct irq_data *d)
 static struct iio_trigger *viio_trigger_alloc(const char *fmt, va_list vargs)
 {
 	struct iio_trigger *trig;
-	trig = kzalloc(sizeof *trig, GFP_KERNEL);
+	trig = kzalloc(sizeof(*trig), GFP_KERNEL);
 	if (trig) {
 		int i;
 		trig->dev.type = &iio_trig_type;
drivers/infiniband/core/addr.c +2 -2
index 337353d86cfa..68a633c5a1cf 100644
@@ -271,7 +271,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
 	struct rt6_info *rt;
 	int ret;
 
-	memset(&fl6, 0, sizeof fl6);
+	memset(&fl6, 0, sizeof(fl6));
 	fl6.daddr = dst_in->sin6_addr;
 	fl6.saddr = src_in->sin6_addr;
 	fl6.flowi6_oif = addr->bound_dev_if;
@@ -447,7 +447,7 @@ int rdma_resolve_ip(struct rdma_addr_client *client,
 	struct addr_req *req;
 	int ret = 0;
 
-	req = kzalloc(sizeof *req, GFP_KERNEL);
+	req = kzalloc(sizeof(*req), GFP_KERNEL);
 	if (!req)
 		return -ENOMEM;
 
drivers/infiniband/core/agent.c +1 -1
index 4fa524dfb6cf..5a482c684278 100644
@@ -154,7 +154,7 @@ int ib_agent_port_open(struct ib_device *device, int port_num)
 	int ret;
 
 	/* Create new device info */
-	port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL);
+	port_priv = kzalloc(sizeof(*port_priv), GFP_KERNEL);
 	if (!port_priv) {
 		dev_err(&device->dev, "No memory for ib_agent_port_private\n");
 		ret = -ENOMEM;
drivers/infiniband/core/cache.c +6 -6
index 53343ffbff7a..164aadf02c10 100644
@@ -1037,7 +1037,7 @@ static void ib_cache_update(struct ib_device *device,
 
 	table = ports_table[port - rdma_start_port(device)];
 
-	tprops = kmalloc(sizeof *tprops, GFP_KERNEL);
+	tprops = kmalloc(sizeof(*tprops), GFP_KERNEL);
 	if (!tprops)
 		return;
 
@@ -1048,8 +1048,8 @@ static void ib_cache_update(struct ib_device *device,
 		goto err;
 	}
 
-	pkey_cache = kmalloc(sizeof *pkey_cache + tprops->pkey_tbl_len *
-			     sizeof *pkey_cache->table, GFP_KERNEL);
+	pkey_cache = kmalloc(sizeof(*pkey_cache) + tprops->pkey_tbl_len *
+			     sizeof(*pkey_cache->table), GFP_KERNEL);
 	if (!pkey_cache)
 		goto err;
 
@@ -1135,7 +1135,7 @@ static void ib_cache_event(struct ib_event_handler *handler,
 	    event->event == IB_EVENT_SM_CHANGE   ||
 	    event->event == IB_EVENT_CLIENT_REREGISTER ||
 	    event->event == IB_EVENT_GID_CHANGE) {
-		work = kmalloc(sizeof *work, GFP_ATOMIC);
+		work = kmalloc(sizeof(*work), GFP_ATOMIC);
 		if (work) {
 			INIT_WORK(&work->work, ib_cache_task);
 			work->device   = event->device;
@@ -1153,9 +1153,9 @@ int ib_cache_setup_one(struct ib_device *device)
 	rwlock_init(&device->cache.lock);
 
 	device->cache.pkey_cache =
-		kzalloc(sizeof *device->cache.pkey_cache *
+		kzalloc(sizeof(*device->cache.pkey_cache) *
 			(rdma_end_port(device) - rdma_start_port(device) + 1), GFP_KERNEL);
-	device->cache.lmc_cache = kmalloc(sizeof *device->cache.lmc_cache *
+	device->cache.lmc_cache = kmalloc(sizeof(*device->cache.lmc_cache) *
 					  (rdma_end_port(device) -
 					   rdma_start_port(device) + 1),
 					  GFP_KERNEL);
drivers/infiniband/core/cm.c +16 -16
index 1d92e091e22e..be29d26f16a7 100644
@@ -630,7 +630,7 @@ static struct cm_id_private * cm_insert_remote_sidr(struct cm_id_private
 		else {
 			int cmp;
 			cmp = memcmp(port_gid, &cur_cm_id_priv->av.dgid,
-				     sizeof *port_gid);
+				     sizeof(*port_gid));
 			if (cmp < 0)
 				link = &(*link)->rb_left;
 			else if (cmp > 0)
@@ -649,7 +649,7 @@ static void cm_reject_sidr_req(struct cm_id_private *cm_id_priv,
 {
 	struct ib_cm_sidr_rep_param param;
 
-	memset(&param, 0, sizeof param);
+	memset(&param, 0, sizeof(param));
 	param.status = status;
 	ib_send_cm_sidr_rep(&cm_id_priv->id, &param);
 }
@@ -661,7 +661,7 @@ struct ib_cm_id *ib_create_cm_id(struct ib_device *device,
 	struct cm_id_private *cm_id_priv;
 	int ret;
 
-	cm_id_priv = kzalloc(sizeof *cm_id_priv, GFP_KERNEL);
+	cm_id_priv = kzalloc(sizeof(*cm_id_priv), GFP_KERNEL);
 	if (!cm_id_priv)
 		return ERR_PTR(-ENOMEM);
 
@@ -748,7 +748,7 @@ static struct cm_timewait_info * cm_create_timewait_info(__be32 local_id)
 {
 	struct cm_timewait_info *timewait_info;
 
-	timewait_info = kzalloc(sizeof *timewait_info, GFP_KERNEL);
+	timewait_info = kzalloc(sizeof(*timewait_info), GFP_KERNEL);
 	if (!timewait_info)
 		return ERR_PTR(-ENOMEM);
 
@@ -847,7 +847,7 @@ static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
 		spin_unlock_irq(&cm_id_priv->lock);
 		ib_send_cm_rej(cm_id, IB_CM_REJ_TIMEOUT,
 			       &cm_id_priv->id.device->node_guid,
-			       sizeof cm_id_priv->id.device->node_guid,
+			       sizeof(cm_id_priv->id.device->node_guid),
 			       NULL, 0);
 		break;
 	case IB_CM_REQ_RCVD:
@@ -1293,7 +1293,7 @@ static void cm_format_paths_from_req(struct cm_req_msg *req_msg,
 					    struct ib_sa_path_rec *primary_path,
 					    struct ib_sa_path_rec *alt_path)
 {
-	memset(primary_path, 0, sizeof *primary_path);
+	memset(primary_path, 0, sizeof(*primary_path));
 	primary_path->dgid = req_msg->primary_local_gid;
 	primary_path->sgid = req_msg->primary_remote_gid;
 	primary_path->dlid = req_msg->primary_local_lid;
@@ -1315,7 +1315,7 @@ static void cm_format_paths_from_req(struct cm_req_msg *req_msg,
 	primary_path->service_id = req_msg->service_id;
 
 	if (req_msg->alt_local_lid) {
-		memset(alt_path, 0, sizeof *alt_path);
+		memset(alt_path, 0, sizeof(*alt_path));
 		alt_path->dgid = req_msg->alt_local_gid;
 		alt_path->sgid = req_msg->alt_remote_gid;
 		alt_path->dlid = req_msg->alt_local_lid;
@@ -1667,7 +1667,7 @@ static int cm_req_handler(struct cm_work *work)
 		}
 		work->path[0].gid_type = gid_attr.gid_type;
 		ib_send_cm_rej(cm_id, IB_CM_REJ_INVALID_GID,
-			       &work->path[0].sgid, sizeof work->path[0].sgid,
+			       &work->path[0].sgid, sizeof(work->path[0].sgid),
 			       NULL, 0);
 		goto rejected;
 	}
@@ -1676,7 +1676,7 @@ static int cm_req_handler(struct cm_work *work)
 		if (ret) {
 			ib_send_cm_rej(cm_id, IB_CM_REJ_INVALID_ALT_GID,
 				       &work->path[0].sgid,
-				       sizeof work->path[0].sgid, NULL, 0);
+				       sizeof(work->path[0].sgid), NULL, 0);
 			goto rejected;
 		}
 	}
@@ -2762,7 +2762,7 @@ static void cm_format_path_from_lap(struct cm_id_private *cm_id_priv,
 				    struct ib_sa_path_rec *path,
 				    struct cm_lap_msg *lap_msg)
 {
-	memset(path, 0, sizeof *path);
+	memset(path, 0, sizeof(*path));
 	path->dgid = lap_msg->alt_local_gid;
 	path->sgid = lap_msg->alt_remote_gid;
 	path->dlid = lap_msg->alt_local_lid;
@@ -3263,7 +3263,7 @@ static void cm_process_send_error(struct ib_mad_send_buf *msg,
 	enum ib_cm_state state;
 	int ret;
 
-	memset(&cm_event, 0, sizeof cm_event);
+	memset(&cm_event, 0, sizeof(cm_event));
 	cm_id_priv = msg->context[0];
 
 	/* Discard old sends or ones without a response. */
@@ -3413,7 +3413,7 @@ static int cm_establish(struct ib_cm_id *cm_id)
 	if (!cm_dev)
 		return -ENODEV;
 
-	work = kmalloc(sizeof *work, GFP_ATOMIC);
+	work = kmalloc(sizeof(*work), GFP_ATOMIC);
 	if (!work)
 		return -ENOMEM;
 
@@ -3560,7 +3560,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
 	atomic_long_inc(&port->counter_group[CM_RECV].
 			counter[attr_id - CM_ATTR_ID_OFFSET]);
 
-	work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
+	work = kmalloc(sizeof(*work) + sizeof(struct ib_sa_path_rec) * paths,
 		       GFP_KERNEL);
 	if (!work) {
 		ib_free_recv_mad(mad_recv_wc);
@@ -3880,7 +3880,7 @@ static void cm_add_one(struct ib_device *ib_device)
 		if (!rdma_cap_ib_cm(ib_device, i))
 			continue;
 
-		port = kzalloc(sizeof *port, GFP_KERNEL);
+		port = kzalloc(sizeof(*port), GFP_KERNEL);
 		if (!port)
 			goto error1;
 
@@ -3985,7 +3985,7 @@ static int __init ib_cm_init(void)
 {
 	int ret;
 
-	memset(&cm, 0, sizeof cm);
+	memset(&cm, 0, sizeof(cm));
 	INIT_LIST_HEAD(&cm.device_list);
 	rwlock_init(&cm.device_lock);
 	spin_lock_init(&cm.lock);
@@ -3995,7 +3995,7 @@ static int __init ib_cm_init(void)
 	cm.remote_qp_table = RB_ROOT;
 	cm.remote_sidr_table = RB_ROOT;
 	idr_init(&cm.local_id_table);
-	get_random_bytes(&cm.random_id_operand, sizeof cm.random_id_operand);
+	get_random_bytes(&cm.random_id_operand, sizeof(cm.random_id_operand));
 	INIT_LIST_HEAD(&cm.timewait_list);
 
 	ret = class_register(&cm_class);
drivers/infiniband/core/cma.c +39 -39

299 lines not on this page · raw message

drivers/infiniband/core/device.c +4 -4
index 00da80e02154..9d2886b5ae9b 100644
@@ -152,14 +152,14 @@ static int alloc_name(char *name)
 			continue;
 		if (i < 0 || i >= PAGE_SIZE * 8)
 			continue;
-		snprintf(buf, sizeof buf, name, i);
+		snprintf(buf, sizeof(buf), name, i);
 		if (!strncmp(buf, device->name, IB_DEVICE_NAME_MAX))
 			set_bit(i, inuse);
 	}
 
 	i = find_first_zero_bit(inuse, PAGE_SIZE * 8);
 	free_page((unsigned long) inuse);
-	snprintf(buf, sizeof buf, name, i);
+	snprintf(buf, sizeof(buf), name, i);
 
 	if (__ib_device_get_by_name(buf))
 		return -ENFILE;
@@ -253,7 +253,7 @@ static int add_client_context(struct ib_device *device, struct ib_client *client
 	struct ib_client_data *context;
 	unsigned long flags;
 
-	context = kmalloc(sizeof *context, GFP_KERNEL);
+	context = kmalloc(sizeof(*context), GFP_KERNEL);
 	if (!context) {
 		printk(KERN_WARNING "Couldn't allocate client context for %s/%s\n",
 		       device->name, client->name);
@@ -844,7 +844,7 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,
 			ret = ib_query_gid(device, port, i, &tmp_gid, NULL);
 			if (ret)
 				return ret;
-			if (!memcmp(&tmp_gid, gid, sizeof *gid)) {
+			if (!memcmp(&tmp_gid, gid, sizeof(*gid))) {
 				*port_num = port;
 				if (index)
 					*index = i;
drivers/infiniband/core/fmr_pool.c +4 -4
index 6ac3683c144b..f4739cdc0464 100644
@@ -128,7 +128,7 @@ static inline struct ib_pool_fmr *ib_fmr_cache_lookup(struct ib_fmr_pool *pool,
 		if (io_virtual_address == fmr->io_virtual_address &&
 		    page_list_len      == fmr->page_list_len      &&
 		    !memcmp(page_list, fmr->page_list,
-			    page_list_len * sizeof *page_list))
+			    page_list_len * sizeof(*page_list)))
 			return fmr;
 
 	return NULL;
@@ -232,7 +232,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
 	else
 		max_remaps = device->attrs.max_map_per_fmr;
 
-	pool = kmalloc(sizeof *pool, GFP_KERNEL);
+	pool = kmalloc(sizeof(*pool), GFP_KERNEL);
 	if (!pool) {
 		printk(KERN_WARNING PFX "couldn't allocate pool struct\n");
 		return ERR_PTR(-ENOMEM);
@@ -248,7 +248,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
 
 	if (params->cache) {
 		pool->cache_bucket =
-			kmalloc(IB_FMR_HASH_SIZE * sizeof *pool->cache_bucket,
+			kmalloc(IB_FMR_HASH_SIZE * sizeof(*pool->cache_bucket),
 				GFP_KERNEL);
 		if (!pool->cache_bucket) {
 			printk(KERN_WARNING PFX "Failed to allocate cache in pool\n");
@@ -287,7 +287,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
 			.max_maps   = pool->max_remaps,
 			.page_shift = params->page_shift
 		};
-		int bytes_per_fmr = sizeof *fmr;
+		int bytes_per_fmr = sizeof(*fmr);
 
 		if (pool->cache_bucket)
 			bytes_per_fmr += params->max_pages_per_fmr * sizeof (u64);
drivers/infiniband/core/mad.c +19 -19
index 9fa5bf33f5a3..2c1ff225ac5c 100644
@@ -335,14 +335,14 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
 	}
 
 	/* Allocate structures */
-	mad_agent_priv = kzalloc(sizeof *mad_agent_priv, GFP_KERNEL);
+	mad_agent_priv = kzalloc(sizeof(*mad_agent_priv), GFP_KERNEL);
 	if (!mad_agent_priv) {
 		ret = ERR_PTR(-ENOMEM);
 		goto error1;
 	}
 
 	if (mad_reg_req) {
-		reg_req = kmemdup(mad_reg_req, sizeof *reg_req, GFP_KERNEL);
+		reg_req = kmemdup(mad_reg_req, sizeof(*reg_req), GFP_KERNEL);
 		if (!reg_req) {
 			ret = ERR_PTR(-ENOMEM);
 			goto error3;
@@ -463,7 +463,7 @@ static int register_snoop_agent(struct ib_mad_qp_info *qp_info,
 	if (i == qp_info->snoop_table_size) {
 		/* Grow table. */
 		new_snoop_table = krealloc(qp_info->snoop_table,
-					   sizeof mad_snoop_priv *
+					   sizeof(mad_snoop_priv) *
 					   (qp_info->snoop_table_size + 1),
 					   GFP_ATOMIC);
 		if (!new_snoop_table) {
@@ -511,7 +511,7 @@ struct ib_mad_agent *ib_register_mad_snoop(struct ib_device *device,
 		goto error1;
 	}
 	/* Allocate structures */
-	mad_snoop_priv = kzalloc(sizeof *mad_snoop_priv, GFP_KERNEL);
+	mad_snoop_priv = kzalloc(sizeof(*mad_snoop_priv), GFP_KERNEL);
 	if (!mad_snoop_priv) {
 		ret = ERR_PTR(-ENOMEM);
 		goto error1;
@@ -695,7 +695,7 @@ static void snoop_recv(struct ib_mad_qp_info *qp_info,
 static void build_smp_wc(struct ib_qp *qp, struct ib_cqe *cqe, u16 slid,
 		u16 pkey_index, u8 port_num, struct ib_wc *wc)
 {
-	memset(wc, 0, sizeof *wc);
+	memset(wc, 0, sizeof(*wc));
 	wc->wr_cqe = cqe;
 	wc->status = IB_WC_SUCCESS;
 	wc->opcode = IB_WC_RECV;
@@ -817,7 +817,7 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
 			goto out;
 	}
 
-	local = kmalloc(sizeof *local, GFP_ATOMIC);
+	local = kmalloc(sizeof(*local), GFP_ATOMIC);
 	if (!local) {
 		ret = -ENOMEM;
 		dev_err(&device->dev, "No memory for ib_mad_local_private\n");
@@ -949,11 +949,11 @@ static int alloc_send_rmpp_list(struct ib_mad_send_wr_private *send_wr,
 
 	/* Allocate data segments. */
 	for (left = send_buf->data_len + pad; left > 0; left -= seg_size) {
-		seg = kmalloc(sizeof (*seg) + seg_size, gfp_mask);
+		seg = kmalloc(sizeof(*seg) + seg_size, gfp_mask);
 		if (!seg) {
 			dev_err(&send_buf->mad_agent->device->dev,
 				"alloc_send_rmpp_segs: RMPP mem alloc failed for len %zd, gfp %#x\n",
-				sizeof (*seg) + seg_size, gfp_mask);
+				sizeof(*seg) + seg_size, gfp_mask);
 			free_send_rmpp_list(send_wr);
 			return -ENOMEM;
 		}
@@ -1017,7 +1017,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
 			return ERR_PTR(-EINVAL);
 
 	size = rmpp_active ? hdr_len : mad_size;
-	buf = kzalloc(sizeof *mad_send_wr + size, gfp_mask);
+	buf = kzalloc(sizeof(*mad_send_wr) + size, gfp_mask);
 	if (!buf)
 		return ERR_PTR(-ENOMEM);
 
@@ -1365,7 +1365,7 @@ static int method_in_use(struct ib_mad_mgmt_method_table **method,
 static int allocate_method_table(struct ib_mad_mgmt_method_table **method)
 {
 	/* Allocate management method table */
-	*method = kzalloc(sizeof **method, GFP_ATOMIC);
+	*method = kzalloc(sizeof(**method), GFP_ATOMIC);
 	if (!*method) {
 		pr_err("No memory for ib_mad_mgmt_method_table\n");
 		return -ENOMEM;
@@ -1460,7 +1460,7 @@ static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req,
 	class = &port_priv->version[mad_reg_req->mgmt_class_version].class;
 	if (!*class) {
 		/* Allocate management class table for "new" class version */
-		*class = kzalloc(sizeof **class, GFP_ATOMIC);
+		*class = kzalloc(sizeof(**class), GFP_ATOMIC);
 		if (!*class) {
 			dev_err(&agent_priv->agent.device->dev,
 				"No memory for ib_mad_mgmt_class_table\n");
@@ -1527,7 +1527,7 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
 				mad_reg_req->mgmt_class_version].vendor;
 	if (!*vendor_table) {
 		/* Allocate mgmt vendor class table for "new" class version */
-		vendor = kzalloc(sizeof *vendor, GFP_ATOMIC);
+		vendor = kzalloc(sizeof(*vendor), GFP_ATOMIC);
 		if (!vendor) {
 			dev_err(&agent_priv->agent.device->dev,
 				"No memory for ib_mad_mgmt_vendor_class_table\n");
@@ -1538,7 +1538,7 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
 	}
 	if (!(*vendor_table)->vendor_class[vclass]) {
 		/* Allocate table for this management vendor class */
-		vendor_class = kzalloc(sizeof *vendor_class, GFP_ATOMIC);
+		vendor_class = kzalloc(sizeof(*vendor_class), GFP_ATOMIC);
 		if (!vendor_class) {
 			dev_err(&agent_priv->agent.device->dev,
 				"No memory for ib_mad_mgmt_vendor_class\n");
@@ -2545,7 +2545,7 @@ static bool ib_mad_send_error(struct ib_mad_port_private *port_priv,
 		struct ib_qp_attr *attr;
 
 		/* Transition QP to RTS and fail offending send */
-		attr = kmalloc(sizeof *attr, GFP_KERNEL);
+		attr = kmalloc(sizeof(*attr), GFP_KERNEL);
 		if (attr) {
 			attr->qp_state = IB_QPS_RTS;
 			attr->cur_qp_state = IB_QPS_SQE;
@@ -2964,7 +2964,7 @@ static int ib_mad_port_start(struct ib_mad_port_private *port_priv)
 	struct ib_qp *qp;
 	u16 pkey_index;
 
-	attr = kmalloc(sizeof *attr, GFP_KERNEL);
+	attr = kmalloc(sizeof(*attr), GFP_KERNEL);
 	if (!attr) {
 		dev_err(&port_priv->device->dev,
 			"Couldn't kmalloc ib_qp_attr\n");
@@ -3079,7 +3079,7 @@ static int create_mad_qp(struct ib_mad_qp_info *qp_info,
 	struct ib_qp_init_attr	qp_init_attr;
 	int ret;
 
-	memset(&qp_init_attr, 0, sizeof qp_init_attr);
+	memset(&qp_init_attr, 0, sizeof(qp_init_attr));
 	qp_init_attr.send_cq = qp_info->port_priv->cq;
 	qp_init_attr.recv_cq = qp_info->port_priv->cq;
 	qp_init_attr.sq_sig_type = IB_SIGNAL_ALL_WR;
@@ -3127,7 +3127,7 @@ static int ib_mad_port_open(struct ib_device *device,
 	int ret, cq_size;
 	struct ib_mad_port_private *port_priv;
 	unsigned long flags;
-	char name[sizeof "ib_mad123"];
+	char name[sizeof("ib_mad123")];
 	int has_smi;
 
 	if (WARN_ON(rdma_max_mad_size(device, port_num) < IB_MGMT_MAD_SIZE))
@@ -3138,7 +3138,7 @@ static int ib_mad_port_open(struct ib_device *device,
 		return -EFAULT;
 
 	/* Create new device info */
-	port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL);
+	port_priv = kzalloc(sizeof(*port_priv), GFP_KERNEL);
 	if (!port_priv) {
 		dev_err(&device->dev, "No memory for ib_mad_port_private\n");
 		return -ENOMEM;
@@ -3180,7 +3180,7 @@ static int ib_mad_port_open(struct ib_device *device,
 	if (ret)
 		goto error7;
 
-	snprintf(name, sizeof name, "ib_mad%d", port_num);
+	snprintf(name, sizeof(name), "ib_mad%d", port_num);
 	port_priv->wq = create_singlethread_workqueue(name);
 	if (!port_priv->wq) {
 		ret = -ENOMEM;
drivers/infiniband/core/mad_rmpp.c +1 -1
index 382941b46e43..08cc04a5d5f4 100644
@@ -287,7 +287,7 @@ create_rmpp_recv(struct ib_mad_agent_private *agent,
 	struct mad_rmpp_recv *rmpp_recv;
 	struct ib_mad_hdr *mad_hdr;
 
-	rmpp_recv = kmalloc(sizeof *rmpp_recv, GFP_KERNEL);
+	rmpp_recv = kmalloc(sizeof(*rmpp_recv), GFP_KERNEL);
 	if (!rmpp_recv)
 		return NULL;
 
drivers/infiniband/core/multicast.c +8 -8
index 250937cb9a1a..75417187424b 100644
@@ -136,7 +136,7 @@ static struct mcast_group *mcast_find(struct mcast_port *port,
 
 	while (node) {
 		group = rb_entry(node, struct mcast_group, node);
-		ret = memcmp(mgid->raw, group->rec.mgid.raw, sizeof *mgid);
+		ret = memcmp(mgid->raw, group->rec.mgid.raw, sizeof(*mgid));
 		if (!ret)
 			return group;
 
@@ -162,7 +162,7 @@ static struct mcast_group *mcast_insert(struct mcast_port *port,
 		cur_group = rb_entry(parent, struct mcast_group, node);
 
 		ret = memcmp(group->rec.mgid.raw, cur_group->rec.mgid.raw,
-			     sizeof group->rec.mgid);
+			     sizeof(group->rec.mgid));
 		if (ret < 0)
 			link = &(*link)->rb_left;
 		else if (ret > 0)
@@ -286,7 +286,7 @@ static int cmp_rec(struct ib_sa_mcmember_rec *src,
 	/* MGID must already match */
 
 	if (comp_mask & IB_SA_MCMEMBER_REC_PORT_GID &&
-	    memcmp(&src->port_gid, &dst->port_gid, sizeof src->port_gid))
+	    memcmp(&src->port_gid, &dst->port_gid, sizeof(src->port_gid)))
 		return -EINVAL;
 	if (comp_mask & IB_SA_MCMEMBER_REC_QKEY && src->qkey != dst->qkey)
 		return -EINVAL;
@@ -566,7 +566,7 @@ static struct mcast_group *acquire_group(struct mcast_port *port,
 	unsigned long flags;
 	int is_mgid0;
 
-	is_mgid0 = !memcmp(&mgid0, mgid, sizeof mgid0);
+	is_mgid0 = !memcmp(&mgid0, mgid, sizeof(mgid0));
 	if (!is_mgid0) {
 		spin_lock_irqsave(&port->lock, flags);
 		group = mcast_find(port, mgid);
@@ -575,7 +575,7 @@ static struct mcast_group *acquire_group(struct mcast_port *port,
 		spin_unlock_irqrestore(&port->lock, flags);
 	}
 
-	group = kzalloc(sizeof *group, gfp_mask);
+	group = kzalloc(sizeof(*group), gfp_mask);
 	if (!group)
 		return NULL;
 
@@ -626,7 +626,7 @@ ib_sa_join_multicast(struct ib_sa_client *client,
 	if (!dev)
 		return ERR_PTR(-ENODEV);
 
-	member = kmalloc(sizeof *member, gfp_mask);
+	member = kmalloc(sizeof(*member), gfp_mask);
 	if (!member)
 		return ERR_PTR(-ENOMEM);
 
@@ -747,7 +747,7 @@ int ib_init_ah_from_mcmember(struct ib_device *device, u8 port_num,
 	if (ret)
 		return ret;
 
-	memset(ah_attr, 0, sizeof *ah_attr);
+	memset(ah_attr, 0, sizeof(*ah_attr));
 	ah_attr->dlid = be16_to_cpu(rec->mlid);
 	ah_attr->sl = rec->sl;
 	ah_attr->port_num = port_num;
@@ -821,7 +821,7 @@ static void mcast_add_one(struct ib_device *device)
 	int i;
 	int count = 0;
 
-	dev = kmalloc(sizeof *dev + device->phys_port_cnt * sizeof *port,
+	dev = kmalloc(sizeof(*dev) + device->phys_port_cnt * sizeof(*port),
 		      GFP_KERNEL);
 	if (!dev)
 		return;
drivers/infiniband/core/netlink.c +1 -1
index d47df9356779..0609194a5e4c 100644
@@ -63,7 +63,7 @@ int ibnl_add_client(int index, int nops,
 	struct ibnl_client *cur;
 	struct ibnl_client *nl_client;
 
-	nl_client = kmalloc(sizeof *nl_client, GFP_KERNEL);
+	nl_client = kmalloc(sizeof(*nl_client), GFP_KERNEL);
 	if (!nl_client)
 		return -ENOMEM;
 
drivers/infiniband/core/sa_query.c +6 -6
index f334090bb612..ecd4900a1548 100644
@@ -868,7 +868,7 @@ static void update_sm_ah(struct work_struct *work)
 		return;
 	}
 
-	new_ah = kmalloc(sizeof *new_ah, GFP_KERNEL);
+	new_ah = kmalloc(sizeof(*new_ah), GFP_KERNEL);
 	if (!new_ah) {
 		printk(KERN_WARNING "Couldn't allocate new SM AH\n");
 		return;
@@ -882,7 +882,7 @@ static void update_sm_ah(struct work_struct *work)
 			 IB_DEFAULT_PKEY_FULL, &new_ah->pkey_index))
 		printk(KERN_ERR "Couldn't find index for default PKey\n");
 
-	memset(&ah_attr, 0, sizeof ah_attr);
+	memset(&ah_attr, 0, sizeof(ah_attr));
 	ah_attr.dlid     = port_attr.sm_lid;
 	ah_attr.sl       = port_attr.sm_sl;
 	ah_attr.port_num = port->port_num;
@@ -1005,7 +1005,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
 	int use_roce;
 	struct net_device *ndev = NULL;
 
-	memset(ah_attr, 0, sizeof *ah_attr);
+	memset(ah_attr, 0, sizeof(*ah_attr));
 	ah_attr->dlid = be16_to_cpu(rec->dlid);
 	ah_attr->sl = rec->sl;
 	ah_attr->src_path_bits = be16_to_cpu(rec->slid) &
@@ -1137,7 +1137,7 @@ static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent)
 {
 	unsigned long flags;
 
-	memset(mad, 0, sizeof *mad);
+	memset(mad, 0, sizeof(*mad));
 
 	mad->mad_hdr.base_version  = IB_MGMT_BASE_VERSION;
 	mad->mad_hdr.mgmt_class    = IB_MGMT_CLASS_SUBN_ADM;
@@ -1704,7 +1704,7 @@ static void ib_sa_add_one(struct ib_device *device)
 	s = rdma_start_port(device);
 	e = rdma_end_port(device);
 
-	sa_dev = kzalloc(sizeof *sa_dev +
+	sa_dev = kzalloc(sizeof(*sa_dev) +
 			 (e - s + 1) * sizeof (struct ib_sa_port),
 			 GFP_KERNEL);
 	if (!sa_dev)
@@ -1794,7 +1794,7 @@ static int __init ib_sa_init(void)
 {
 	int ret;
 
-	get_random_bytes(&tid, sizeof tid);
+	get_random_bytes(&tid, sizeof(tid));
 
 	atomic_set(&ib_nl_sa_request_seq, 0);
 
drivers/infiniband/core/sysfs.c +3 -3
index 3de93517efe4..b93fd7c3628c 100644
@@ -425,8 +425,8 @@ static int get_perf_mad(struct ib_device *dev, int port_num, __be16 attr,
 	if (!dev->process_mad)
 		return -ENOSYS;
 
-	in_mad  = kzalloc(sizeof *in_mad, GFP_KERNEL);
-	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
+	in_mad  = kzalloc(sizeof(*in_mad), GFP_KERNEL);
+	out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL);
 	if (!in_mad || !out_mad) {
 		ret = -ENOMEM;
 		goto out;
@@ -749,7 +749,7 @@ static int add_port(struct ib_device *device, int port_num,
 	if (ret)
 		return ret;
 
-	p = kzalloc(sizeof *p, GFP_KERNEL);
+	p = kzalloc(sizeof(*p), GFP_KERNEL);
 	if (!p)
 		return -ENOMEM;
 
drivers/infiniband/core/ucm.c +4 -4
index 6b4e8a008bc0..fe858952da21 100644
@@ -177,7 +177,7 @@ static struct ib_ucm_context *ib_ucm_ctx_alloc(struct ib_ucm_file *file)
 {
 	struct ib_ucm_context *ctx;
 
-	ctx = kzalloc(sizeof *ctx, GFP_KERNEL);
+	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return NULL;
 
@@ -353,7 +353,7 @@ static int ib_ucm_event_handler(struct ib_cm_id *cm_id,
 
 	ctx = cm_id->context;
 
-	uevent = kzalloc(sizeof *uevent, GFP_KERNEL);
+	uevent = kzalloc(sizeof(*uevent), GFP_KERNEL);
 	if (!uevent)
 		goto err1;
 
@@ -611,7 +611,7 @@ static ssize_t ib_ucm_init_qp_attr(struct ib_ucm_file *file,
 		return PTR_ERR(ctx);
 
 	resp.qp_attr_mask = 0;
-	memset(&qp_attr, 0, sizeof qp_attr);
+	memset(&qp_attr, 0, sizeof(qp_attr));
 	qp_attr.qp_state = cmd.qp_state;
 	result = ib_cm_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask);
 	if (result)
@@ -1255,7 +1255,7 @@ static void ib_ucm_add_one(struct ib_device *device)
 	if (!device->alloc_ucontext || !rdma_cap_ib_cm(device, 1))
 		return;
 
-	ucm_dev = kzalloc(sizeof *ucm_dev, GFP_KERNEL);
+	ucm_dev = kzalloc(sizeof(*ucm_dev), GFP_KERNEL);
 	if (!ucm_dev)
 		return;
 
drivers/infiniband/core/ucma.c +9 -9
index 8b5a934e1133..5971b476ca29 100644
@@ -62,7 +62,7 @@ static struct ctl_table ucma_ctl_table[] = {
 	{
 		.procname	= "max_backlog",
 		.data		= &max_backlog,
-		.maxlen		= sizeof max_backlog,
+		.maxlen		= sizeof(max_backlog),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
@@ -379,7 +379,7 @@ static ssize_t ucma_get_event(struct ucma_file *file, const char __user *inbuf,
 	struct ucma_event *uevent;
 	int ret = 0;
 
-	if (out_len < sizeof uevent->resp)
+	if (out_len < sizeof(uevent->resp))
 		return -ENOSPC;
 
 	if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
@@ -414,7 +414,7 @@ static ssize_t ucma_get_event(struct ucma_file *file, const char __user *inbuf,
 	}
 
 	if (copy_to_user((void __user *)(unsigned long)cmd.response,
-			 &uevent->resp, sizeof uevent->resp)) {
+			 &uevent->resp, sizeof(uevent->resp))) {
 		ret = -EFAULT;
 		goto done;
 	}
@@ -809,7 +809,7 @@ static ssize_t ucma_query_route(struct ucma_file *file,
 	if (IS_ERR(ctx))
 		return PTR_ERR(ctx);
 
-	memset(&resp, 0, sizeof resp);
+	memset(&resp, 0, sizeof(resp));
 	addr = (struct sockaddr *) &ctx->cm_id->route.addr.src_addr;
 	memcpy(&resp.src_addr, addr, addr->sa_family == AF_INET ?
 				     sizeof(struct sockaddr_in) :
@@ -862,7 +862,7 @@ static ssize_t ucma_query_addr(struct ucma_context *ctx,
 	if (out_len < sizeof(resp))
 		return -ENOSPC;
 
-	memset(&resp, 0, sizeof resp);
+	memset(&resp, 0, sizeof(resp));
 
 	addr = (struct sockaddr *) &ctx->cm_id->route.addr.src_addr;
 	resp.src_size = rdma_addr_size(addr);
@@ -922,7 +922,7 @@ static ssize_t ucma_query_gid(struct ucma_context *ctx,
 	if (out_len < sizeof(resp))
 		return -ENOSPC;
 
-	memset(&resp, 0, sizeof resp);
+	memset(&resp, 0, sizeof(resp));
 
 	ucma_query_device_addr(ctx->cm_id, &resp);
 
@@ -1143,7 +1143,7 @@ static ssize_t ucma_init_qp_attr(struct ucma_file *file,
 		return PTR_ERR(ctx);
 
 	resp.qp_attr_mask = 0;
-	memset(&qp_attr, 0, sizeof qp_attr);
+	memset(&qp_attr, 0, sizeof(qp_attr));
 	qp_attr.qp_state = cmd.qp_state;
 	ret = rdma_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask);
 	if (ret)
@@ -1219,7 +1219,7 @@ static int ucma_set_ib_path(struct ucma_context *ctx,
 	if (ret)
 		return ret;
 
-	memset(&event, 0, sizeof event);
+	memset(&event, 0, sizeof(event));
 	event.event = RDMA_CM_EVENT_ROUTE_RESOLVED;
 	return ucma_event_handler(ctx->cm_id, &event);
 }
@@ -1621,7 +1621,7 @@ static int ucma_open(struct inode *inode, struct file *filp)
 {
 	struct ucma_file *file;
 
-	file = kmalloc(sizeof *file, GFP_KERNEL);
+	file = kmalloc(sizeof(*file), GFP_KERNEL);
 	if (!file)
 		return -ENOMEM;
 
drivers/infiniband/core/ud_header.c +4 -4
index 19837d270278..2fa2d6ce35a6 100644
@@ -323,7 +323,7 @@ int ib_ud_header_init(int     payload_bytes,
 		      struct ib_ud_header *header)
 {
 	grh_present = grh_present && !ip_version;
-	memset(header, 0, sizeof *header);
+	memset(header, 0, sizeof(*header));
 
 	/*
 	 * UDP header without IP header doesn't make sense
@@ -454,8 +454,8 @@ int ib_ud_header_pack(struct ib_ud_header *header,
 	len += IB_DETH_BYTES;
 
 	if (header->immediate_present) {
-		memcpy(buf + len, &header->immediate_data, sizeof header->immediate_data);
-		len += sizeof header->immediate_data;
+		memcpy(buf + len, &header->immediate_data, sizeof(header->immediate_data));
+		len += sizeof(header->immediate_data);
 	}
 
 	return len;
@@ -540,7 +540,7 @@ int ib_ud_header_unpack(void                *buf,
 	buf += IB_DETH_BYTES;
 
 	if (header->immediate_present)
-		memcpy(&header->immediate_data, buf, sizeof header->immediate_data);
+		memcpy(&header->immediate_data, buf, sizeof(header->immediate_data));
 
 	return 0;
 }
drivers/infiniband/core/umem.c +1 -1
index 38acb3cfc545..f53d0f3d647c 100644
@@ -113,7 +113,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
 	if (!can_do_mlock())
 		return ERR_PTR(-EPERM);
 
-	umem = kzalloc(sizeof *umem, GFP_KERNEL);
+	umem = kzalloc(sizeof(*umem), GFP_KERNEL);
 	if (!umem)
 		return ERR_PTR(-ENOMEM);
 
drivers/infiniband/core/user_mad.c +8 -8
index 415a3185cde7..5ea53487294e 100644
@@ -219,7 +219,7 @@ static void recv_handler(struct ib_mad_agent *agent,
 	if (mad_recv_wc->wc->status != IB_WC_SUCCESS)
 		goto err1;
 
-	packet = kzalloc(sizeof *packet, GFP_KERNEL);
+	packet = kzalloc(sizeof(*packet), GFP_KERNEL);
 	if (!packet)
 		goto err1;
 
@@ -459,7 +459,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
 	if (count < hdr_size(file) + IB_MGMT_RMPP_HDR)
 		return -EINVAL;
 
-	packet = kzalloc(sizeof *packet + IB_MGMT_RMPP_HDR, GFP_KERNEL);
+	packet = kzalloc(sizeof(*packet) + IB_MGMT_RMPP_HDR, GFP_KERNEL);
 	if (!packet)
 		return -ENOMEM;
 
@@ -488,7 +488,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
 		goto err_up;
 	}
 
-	memset(&ah_attr, 0, sizeof ah_attr);
+	memset(&ah_attr, 0, sizeof(ah_attr));
 	ah_attr.dlid          = be16_to_cpu(packet->mad.hdr.lid);
 	ah_attr.sl            = packet->mad.hdr.sl;
 	ah_attr.src_path_bits = packet->mad.hdr.path_bits;
@@ -638,7 +638,7 @@ static int ib_umad_reg_agent(struct ib_umad_file *file, void __user *arg,
 		goto out;
 	}
 
-	if (copy_from_user(&ureq, arg, sizeof ureq)) {
+	if (copy_from_user(&ureq, arg, sizeof(ureq))) {
 		ret = -EFAULT;
 		goto out;
 	}
@@ -666,7 +666,7 @@ static int ib_umad_reg_agent(struct ib_umad_file *file, void __user *arg,
 		memset(&req, 0, sizeof(req));
 		req.mgmt_class         = ureq.mgmt_class;
 		req.mgmt_class_version = ureq.mgmt_class_version;
-		memcpy(req.oui, ureq.oui, sizeof req.oui);
+		memcpy(req.oui, ureq.oui, sizeof(req.oui));
 
 		if (compat_method_mask) {
 			u32 *umm = (u32 *) ureq.method_mask;
@@ -677,7 +677,7 @@ static int ib_umad_reg_agent(struct ib_umad_file *file, void __user *arg,
 					umm[i * 2] | ((u64) umm[i * 2 + 1] << 32);
 		} else
 			memcpy(req.method_mask, ureq.method_mask,
-			       sizeof req.method_mask);
+			       sizeof(req.method_mask));
 	}
 
 	agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num,
@@ -939,7 +939,7 @@ static int ib_umad_open(struct inode *inode, struct file *filp)
 		goto out;
 
 	ret = -ENOMEM;
-	file = kzalloc(sizeof *file, GFP_KERNEL);
+	file = kzalloc(sizeof(*file), GFP_KERNEL);
 	if (!file)
 		goto out;
 
@@ -1284,7 +1284,7 @@ static void ib_umad_add_one(struct ib_device *device)
 	s = rdma_start_port(device);
 	e = rdma_end_port(device);
 
-	umad_dev = kzalloc(sizeof *umad_dev +
+	umad_dev = kzalloc(sizeof(*umad_dev) +
 			   (e - s + 1) * sizeof (struct ib_umad_port),
 			   GFP_KERNEL);
 	if (!umad_dev)
drivers/infiniband/core/uverbs_cmd.c +130 -130

444 lines not on this page · raw message

drivers/infiniband/core/uverbs_main.c +5 -5
index 39680aed99dd..03d8ffa60ba3 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/core/uverbs_marshall.c +5 -5
index af020f80d50f..afb79ca25bc6 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/core/verbs.c +2 -2
index 5af6d024e053..bee1e89c9a09 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb3/cxio_hal.c +2 -2
index de1c61b417d6..720372eaa958 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb3/iwch_cm.c +1 -1
index f504ba73e5dc..52a451f26110 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb3/iwch_provider.c +13 -13
index 2734820d291b..524bd0023ef2 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/cm.c +7 -7
index cd2ff5f9518a..9abbeedd16c0 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/cq.c +5 -5
index cf21df4a8bf5..42b207d91f89 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/device.c +5 -5
index 8024ea4417b8..300a594acdee 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/mem.c +2 -2
index 7849890c4781..747c0f0dc13b 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/provider.c +2 -2
index ec04272fbdc2..c0b72c9249ac 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/qp.c +32 -32

64 lines not on this page · raw message

drivers/infiniband/hw/cxgb4/resource.c +8 -8
index 67df71a7012e..991b4fe1f06f 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/ah.c +2 -2
index 105246fba2e7..888afc3197bb 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/alias_GUID.c +5 -6
index 21cb41a60fe8..c6eb1ccdac8b 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/cq.c +7 -7
index 9f8b516eb2b0..45c96d269165 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/doorbell.c +1 -1
index c51740986367..e1b02c8bc69e 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/mad.c +15 -15
index 26833bfa639b..a9514b28c579 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/main.c +18 -18
index 1c7ab6cabbb8..a1b777088d86 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/mcg.c +15 -15
index 99451d887266..d113031cfaea 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/mr.c +1 -1
index 242b94ec105b..f6a7b85623c7 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/qp.c +20 -20
index bc5536f00b6c..65a1c32d37de 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/srq.c +3 -3
index 0597f3eef5d0..5f7fdb8fcfbf 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mlx4/sysfs.c +4 -4
index 69fb5ba94d0f..29a2d42323da 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_allocator.c +4 -4
index b4e0cf4e95cd..01eef569c2e3 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_av.c +3 -3
index bcac294042f5..46bb2b52a731 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_cmd.c +1 -1
index c7f49bbb0c72..cb62eaa3ca42 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_cq.c +1 -1
index a6531ffe29a6..b08be138d095 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_eq.c +3 -3
index 690201738993..927ac756af95 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_mad.c +3 -3
index 7c3f2fb44ba5..7da71b822f04 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_main.c +2 -2
index ded76c101dde..03a0ef0c7782 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_mcg.c +1 -1
index 6304ae8f4a6c..9cb36a345fc2 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_memfree.c +6 -6
index 7d2e42dd6926..fcd43f68d9e3 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_mr.c +6 -6
index ed9a989e501b..3b4cc911771c 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_profile.c +1 -1
index 15d064479ef6..d7f759c507c6 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_provider.c +35 -35

70 lines not on this page · raw message

drivers/infiniband/hw/mthca/mthca_qp.c +4 -4
index 96e5fb91fb48..648c82727995 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/mthca/mthca_srq.c +3 -3
index d22f970480c0..eb0c642d0154 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/nes/nes_cm.c +1 -1
index cb9f0f27308d..e73ab04ce8dd 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/nes/nes_hw.c +1 -1
index 4713dd7ed764..3b8b7b216ce9 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/nes/nes_mgt.c +2 -2
index 416645259b0f..5e20fc7224b4 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/nes/nes_verbs.c +6 -6
index 8c4daf7f22ec..09f64b0a9030 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/ocrdma/ocrdma_stats.c +1 -1
index 86c303a620c1..7bbbdec1f7f0 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
index d4c687b548d8..c28b66fd12db 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_cm.c +11 -11
index 917e46ea3bf6..fa09406f0033 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_fs.c +5 -5
index 6bd5740e2691..c65de8155d8d 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_ib.c +2 -2
index 5ea0c14070d1..35f341ecdc07 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_main.c +8 -8
index 25509bbd4a05..443928f3cbee 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_multicast.c +3 -3
index 050dfa175d16..0b0d9aa28df2 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_verbs.c +1 -1
index d48c5bae7877..a0ecc0d907a7 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/ipoib/ipoib_vlan.c +1 -1
index fca1a882de27..6df51bc0b9f2 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/iser/iser_verbs.c +3 -3
index 40c0f4978e2f..2c8a65ed5b1d 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/srp/ib_srp.c +15 -15
index 03022f6420d7..2057b1543764 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/ulp/srpt/ib_srpt.c +21 -21

42 lines not on this page · raw message

drivers/input/keyboard/lm8323.c +1 -1
index 21bea52d4365..bb1f3ed5134d 100644

Lines of this file are not shown. View the raw message.

drivers/input/misc/dm355evm_keys.c +1 -1
index b6b7bd4e5462..a890dd6a8626 100644

Lines of this file are not shown. View the raw message.

drivers/input/touchscreen/ad7877.c +3 -3
index 9c250ae780d9..7e6e7760723e 100644

Lines of this file are not shown. View the raw message.

drivers/input/touchscreen/ads7846.c +2 -2
index a61b2153ab8c..33fa0c7c21db 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/bas-gigaset.c +1 -1
index aecec6d32463..b9f4120f84aa 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/capi.c +1 -1
index ccec7778cad2..bf9678697cbd 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/common.c +3 -3
index 7c7814497e3e..c3b25307fec9 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/ev-layer.c +1 -1
index 1cfcea62aed9..c6a59ff091b4 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/i4l.c +6 -6
index 2d75329007f1..c51642cd4460 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/interface.c +4 -4
index 600c79b030cd..0b10a0d0e30a 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/i4l/isdn_tty.c +1 -1
index 2175225af742..7678e414a08e 100644

Lines of this file are not shown. View the raw message.

drivers/md/dm-bufio.c +2 -2
index cd77216beff1..f3467958f282 100644

Lines of this file are not shown. View the raw message.

drivers/md/dm-kcopyd.c +1 -1
index 1452ed9aacb4..93d49354ce72 100644

Lines of this file are not shown. View the raw message.

drivers/media/dvb-core/dvb_net.c +2 -2
index ce6a711b42d4..8f535e7ee2a1 100644

Lines of this file are not shown. View the raw message.

drivers/media/i2c/tvp5150.c +1 -1
index 6c3769d44b75..799bf8545e13 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ngene/ngene-dvb.c +1 -1
index 59bb2858c8d0..7ce12f15bd55 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/saa7134/saa7134-video.c +2 -2
index a63c1366a64e..063e348187f5 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ttpci/av7110_ir.c +4 -4
index 0e763a784e2b..842d2a92bf30 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ttpci/av7110_v4l.c +2 -2
index 479aff02db81..cd1ff925518f 100644

Lines of this file are not shown. View the raw message.

drivers/media/platform/m2m-deinterlace.c +1 -1
index 7383818c2be6..c5ed8938b8e3 100644

Lines of this file are not shown. View the raw message.

drivers/media/platform/mx2_emmaprp.c +1 -1
index 3c4012d42d69..43661330afb9 100644

Lines of this file are not shown. View the raw message.

drivers/media/rc/ir-rc6-decoder.c +2 -2
index e0e2edefa651..15b806f43f97 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/etoms.c +8 -8
index 26c9ee1f1045..8e7b06093f62 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/gspca.c +11 -11
index af5cd8213e8b..4889f9db5357 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/jeilinj.c +1 -1
index 19736e237b37..3cc14adcf99e 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/mars.c +1 -1
index 779a8785f421..ea31bdf72cc6 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/mr97310a.c +3 -3
index f006e29ca019..357af10d0d61 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/ov519.c +1 -1
index c95f32a0c02b..ec278c2868d7 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/pac207.c +2 -2
index 07529e5a0c56..9e97a4f175a9 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/pac7302.c +3 -3
index 8b08bd0172f4..010f5eddbc05 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/pac7311.c +2 -2
index 25f86b1e74a8..b58c078e481e 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/sn9c2028.c +3 -3
index 4f2050a5ec94..9cee0b9d7983 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/sonixj.c +7 -7
index fd1c8706d86a..a0be6743456e 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/sq930x.c +1 -1
index e274cf19a3ea..54418fe3fd4b 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/t613.c +36 -36

72 lines not on this page · raw message

drivers/media/usb/gspca/topro.c +5 -5
index c028a5c2438e..e647cf6cf675 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/zc3xx.c +1 -1
index c5d8ee6fa3c7..b33754710e9b 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/uvc/uvc_ctrl.c +3 -3
index c2ee6e39fd0c..91cc583a08c7 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/uvc/uvc_driver.c +26 -26

52 lines not on this page · raw message

drivers/media/usb/uvc/uvc_v4l2.c +6 -6
index d7723ce772b3..ee929a04ff44 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/uvc/uvc_video.c +1 -1
index 075a0fe77485..26fb5f130460 100644

Lines of this file are not shown. View the raw message.

drivers/media/v4l2-core/v4l2-mem2mem.c +2 -2
index 61d56c940f80..909a5ffc56d3 100644

Lines of this file are not shown. View the raw message.

drivers/media/v4l2-core/videobuf2-dma-contig.c +3 -3
index c33127284cfe..a6164bdafa3f 100644

Lines of this file are not shown. View the raw message.

drivers/media/v4l2-core/videobuf2-dma-sg.c +2 -2
index 9985c89f0513..f6c431985cb5 100644

Lines of this file are not shown. View the raw message.

drivers/mfd/t7l66xb.c +1 -1
index 94bd89cb1f06..c53e79a7414b 100644

Lines of this file are not shown. View the raw message.

drivers/mfd/tc6393xb.c +1 -1
index 1ecbfa40d1b3..c095c1255a5b 100644

Lines of this file are not shown. View the raw message.

drivers/mfd/tps65010.c +8 -8
index 83e615ed100a..ba9a19d90d8e 100644

Lines of this file are not shown. View the raw message.

drivers/misc/apds990x.c +1 -1
index a3e789b85cc8..b8272a00f21e 100644

Lines of this file are not shown. View the raw message.

drivers/misc/bh1770glc.c +1 -1
index 753d7ecdadaa..7813d13023a8 100644

Lines of this file are not shown. View the raw message.

drivers/misc/eeprom/at25.c +1 -1
index f850ef556bcc..462271dc4d38 100644

Lines of this file are not shown. View the raw message.

drivers/misc/ibmasm/r_heartbeat.c +2 -2
index 232034f5da48..e222ea7348cf 100644

Lines of this file are not shown. View the raw message.

drivers/mtd/devices/m25p80.c +1 -1
index c9c3b7fa3051..22de50e167e6 100644

Lines of this file are not shown. View the raw message.

drivers/mtd/devices/mtd_dataflash.c +3 -3
index f9e9bd1cfaa0..0b17faccf6bf 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/marvell/skge.c +1 -1
index 7173836fe361..fe289ef00d79 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/alloc.c +2 -2
index 0c51c69f802f..055a83f5bec3 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/cmd.c +1 -1
index d48d5793407d..d8ecfb2f10a5 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/en_resources.c +2 -2
index 12aab5a659d3..36209dd20bbd 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/en_rx.c +1 -1
index 41440b2b20a3..c3e2f137636d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/en_tx.c +1 -1
index 4421bf5463f6..b6049af395e8 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/eq.c +9 -9
index 4696053165f8..ce57631d3eaf 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/icm.c +1 -1
index 2a9dd460a95f..84fe587d5dfe 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/intf.c +1 -1
index 0472941af820..96c97b0d6541 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/main.c +2 -2
index f1b6d219e445..f58f65ef2f94 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/mcg.c +6 -6
index 1d4e2e054647..bc2365da8922 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/mr.c +3 -3
index 93195191f45b..0cb3d6a96c3a 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/qp.c +2 -2
index d1cd9c32a9ae..0b9777864df4 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +12 -12
index b46dbe29ef6c..21d551191478 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/mcs7830.c +2 -2
index 4f345bd4e6e2..e44f50322a3a 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/net1080.c +7 -7
index 4cbdb1307f3e..3f718c0123c3 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/pegasus.c +1 -1
index f84080215915..b12728aa5ab7 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/rndis_host.c +21 -21

42 lines not on this page · raw message

drivers/net/usb/sierra_net.c +2 -2
index a251588762ec..4b3e0c8ecf1c 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/usbnet.c +6 -6
index 0b0ba7ef14e4..71e509a646a1 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/zaurus.c +3 -3
index 6aaa6eb9df72..5578dbafa17b 100644

Lines of this file are not shown. View the raw message.

drivers/net/virtio_net.c +1 -1
index 767ab11a6e9f..3753a7964200 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/sbni.c +3 -3
index 8fef8d83436d..d2cb262f5e78 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/scan.c +1 -2
index c20017ced566..811b35c76a9a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/rndis_wlan.c +3 -3
index a13d1f2b5912..c55fc0553155 100644

Lines of this file are not shown. View the raw message.

drivers/oprofile/oprofile_perf.c +1 -1
index d5b2732b1b81..495b145f55d0 100644

Lines of this file are not shown. View the raw message.

drivers/parport/parport_serial.c +1 -1
index e15b4845f7c6..df9ebe23fe4d 100644

Lines of this file are not shown. View the raw message.

drivers/parport/probe.c +1 -1
index d763bc9e44c1..eacfbf201dfb 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/bfin_cf_pcmcia.c +1 -1
index bba1dcbb8075..1a1532e01296 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/omap_cf.c +1 -1
index 4e2f501e5548..41ee25f8e9e9 100644

Lines of this file are not shown. View the raw message.

drivers/rapidio/rio.c +1 -1
index d7b87c64b7cd..2305e95e067d 100644

Lines of this file are not shown. View the raw message.

drivers/s390/crypto/zcrypt_api.c +2 -2
index 5d3d04c040c2..413e9ade9dc6 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aha152x.c +1 -1
index f44d0487236e..eb7d68724fba 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_init.c +4 -4
index a544366a367e..d04e7bd69d13 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ultrastor.c +1 -1
index 14e0c40a68c9..ad8b6f408d6e 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/virtio_scsi.c +1 -1
index 7dbbb29d24c6..3c2149ab6820 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/vmw_pvscsi.c +2 -2
index 6164634aff18..a6be9d847427 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-lm70llp.c +1 -1
index 61ee0f4269ae..7ac6a4ac41e0 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-mpc512x-psc.c +2 -2
index c3ec46cd9f91..66fb04cb1687 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-mpc52xx-psc.c +2 -2
index 72d11ebefb28..5287e1e822df 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-mpc52xx.c +1 -1
index c36002110c30..fb044c8ad098 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-omap-uwire.c +1 -1
index ce8dbdbce312..d46a67099212 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-omap2-mcspi.c +2 -2
index 7273820275e9..cf1fb5f7fed9 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-ppc4xx.c +2 -2
index dd3d0a218d8b..2b45048e15ef 100644

Lines of this file are not shown. View the raw message.

drivers/staging/most/hdm-dim2/dim2_hdm.c +2 -2
index 327d738c7194..33984bcfb411 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ehca/ehca_qp.c +1 -1
index 896c01f810f6..b7e0b51b91ee 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ehca/ehca_uverbs.c +1 -1
index 1a1d5d99fcf9..7017302c49ec 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_driver.c +2 -2
index 2ab22f98e3ba..59c4f397b8e1 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_eeprom.c +6 -6
index ef84107c7ce0..0bbf2071f0da 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_file_ops.c +2 -2
index 6187b848b3ca..e51a66d71085 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_fs.c +4 -4
index 476fcdf05acb..1349c7e5d8b5 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_iba6110.c +3 -3
index 5f13572a5e24..62af0f497c71 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_init_chip.c +1 -1
index a5eea199f733..05f353217e25 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_intr.c +5 -5
index 0403fa28ed8d..17a8ef85994f 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_mmap.c +1 -1
index e73274229404..7dc1dc9b99fb 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_mr.c +5 -5
index b76b0ce66709..b80bb6c08aca 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_rc.c +2 -2
index d4aa53574e57..dfbbaf074f05 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_ruc.c +2 -2
index e541a01f1f61..95aee4184c00 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_stats.c +4 -4
index f63e143e3292..d3ceaa6d6583 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_sysfs.c +2 -2
index b12b1f6caf59..2e4444a425e6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_uc.c +1 -1
index 0246b30280b9..a91ed22713b2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_ud.c +1 -1
index 385d9410a51e..088d2b7cdd90 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_verbs.c +5 -5
index 53f9dcab180d..8c2dc23941f5 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rdma/ipath/ipath_verbs_mcast.c +2 -2
index 72d476fa5b8f..dfba8010a276 100644

Lines of this file are not shown. View the raw message.

drivers/target/target_core_spc.c +1 -1
index 0aa47babd16c..59e79597b1e4 100644

Lines of this file are not shown. View the raw message.

drivers/tty/pty.c +2 -2
index b3110040164a..783ef215ade4 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_of.c +1 -1
index 33021c1f7d55..9418e6641d5a 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/crisv10.c +3 -3
index f13f2ebd215b..99c459d9169b 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vt_ioctl.c +2 -2
index 97d5a74558a3..9d8105740351 100644

Lines of this file are not shown. View the raw message.

drivers/usb/class/cdc-acm.c +3 -3
index fa4e23930614..db4541d7b706 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hcd.c +6 -6
index df0e3b92533a..cd71c5ffbd67 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hub.c +6 -6
index 350dcd9af5d8..3c44b620e2d2 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/sysfs.c +2 -2
index 65b6e6b84043..881c934cdd58 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/usb.c +2 -2
index ebb29caa3fe4..73d57a4c7d87 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/composite.c +3 -4
index 8b14c2a13ac5..563848bdd6e8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_acm.c +2 -2
index 2fa1e80a3ce7..9d428b992114 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_ecm.c +10 -10
index 7ad60ee41914..f46f9b7f71df 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_eem.c +2 -2
index cad35a502d3f..35c78be4cb1a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_fs.c +5 -5
index cf43e9e18368..f27cb5216b17 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_hid.c +2 -2
index 99285b416308..72e11ecf59e3 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_loopback.c +1 -1
index ddc3aad886b7..552cf8edfa44 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_mass_storage.c +1 -1
index 223ccf89d226..c2e38e2b4df9 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_ncm.c +11 -11
index 7ad798ace1e5..432dc9aab308 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_phonet.c +6 -6
index 157441dbfeba..ce43237367eb 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_rndis.c +8 -8
index e587767e374c..9720c7e229da 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_serial.c +1 -1
index 6bb44d613bab..33f8125f34fa 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_subset.c +5 -5
index 829c78de9eba..a7a617c5a569 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_uac1.c +1 -1
index 6a2346b99f55..ed07adb58b8c 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_uac2.c +25 -25

50 lines not on this page · raw message

drivers/usb/gadget/function/rndis.c +2 -2
index 70d3917cc003..7cb49fd1fefc 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/storage_common.c +1 -1
index d62683017cf3..2ab5f8011c0e 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/u_ether.c +1 -1
index 637809e3bd0d..403f4048e589 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/acm_ms.c +1 -1
index c16089efc322..b6c409c6d14d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/audio.c +1 -1
index 5d7b3c6a422b..dbb3d115b4e1 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/cdc2.c +1 -1
index 51c08682de84..1f6b374582e6 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/dbgp.c +4 -4
index 99ca3dabc4f3..607ca8e69cba 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/ether.c +1 -1
index 25a2c2e48592..6a105216668a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/g_ffs.c +1 -1
index f85639ef8a8f..ab809e7b627d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/hid.c +1 -1
index a71a884f79fc..822f0a5e47cd 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/inode.c +9 -9
index 7e179f81d05c..a91d2c7dc2b0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/mass_storage.c +1 -1
index e61af53c7d2b..21f3f29185be 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/multi.c +1 -1
index 229d704a620b..9f3e7950f927 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/ncm.c +1 -1
index 0aba68253e3d..fd3c40ce48ac 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/printer.c +1 -1
index 6f969a86175c..125420dc7000 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/zero.c +1 -1
index d02e2ce73ea5..b5e7f1e54688 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/dummy_hcd.c +3 -3
index dde44450dfa9..eda66f3b9468 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/fsl_udc_core.c +1 -1
index aab5221d6c2e..3a3bc7a0e70c 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/goku_udc.c +2 -2
index 1fdfec14a3ba..56cd6e31bd03 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/mv_u3d_core.c +1 -1
index dafe74eb9ade..c9213ad44475 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/mv_udc_core.c +1 -1
index 81b6229c7805..c60c1bdcb385 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/omap_udc.c +3 -3
index 9b7d39484ed3..86b77117f648 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/pch_udc.c +6 -6
index 7a04157ff579..3c5399d03ed0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/pxa25x_udc.c +1 -1
index b82cb14850b6..e02c0feff6d6 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/pxa27x_udc.c +2 -2
index 001a3b74a993..78234c87e180 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ehci-dbg.c +8 -8
index b7d623f1523c..6bc854d6271e 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ehci-mem.c +4 -4
index 4de43011df23..84f8e3823c4b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ehci-sched.c +4 -4
index f9a332775c47..288df035dcbc 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/isp116x-hcd.c +1 -1
index d089b3fb7a13..473eaf2aa2f5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/isp1362-hcd.c +1 -1
index 6cf82ee460a6..cba181199b06 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ohci-dbg.c +1 -1
index c3eded317495..ee2efb47abcb 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ohci-hcd.c +1 -1
index 04dcedfdebf8..072fdfebb712 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ohci-mem.c +2 -2
index c9e315c6808a..3c19658565ef 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/oxu210hp-hcd.c +6 -6
index bc74aca8a54c..ec5dc4ac4c16 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/sl811-hcd.c +1 -1
index fd2a11473be7..67dce2d559e7 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-mem.c +3 -3
index 5cd080e0a685..01c9f4d944e2 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/cppi_dma.c +1 -1
index cc134109b056..0e78fec163a0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/musb_gadget.c +2 -2
index 87bd578799a8..e4561f765a03 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/musb_gadget_ep0.c +1 -1
index 10d30afe4a3c..a87ae60d991b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/musb_host.c +1 -1
index 795a45b1b25b..9d3ca7ba782d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/phy/phy-isp1301-omap.c +2 -2
index 3af263cc0caa..b084c4113e74 100644

Lines of this file are not shown. View the raw message.

drivers/usb/renesas_usbhs/mod_gadget.c +1 -1
index 657f9672ceba..00a92274f949 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/pl2303.c +2 -2
index ae682e4eeaef..5183e53e7111 100644

Lines of this file are not shown. View the raw message.

drivers/usb/storage/sddr55.c +5 -5
index e5e0a25ecd96..f5c6c48bb044 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/net.c +8 -8
index 9eda69e40678..9ab1644086c2 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/scsi.c +5 -5
index 29cfc57d496e..05410866c556 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/test.c +4 -4
index f2882ac98726..c3a1b505906c 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/vhost.c +31 -31

62 lines not on this page · raw message

drivers/video/console/sticore.c +2 -2
index 7da1ad03acb5..dbbe9c2db686 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/carminefb.c +2 -2
index 65f7c15f5fdb..1cba1c271b59 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/omap2/omapfb/omapfb-main.c +1 -1
index d3af01c94a58..e6b20d009762 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/tmiofb.c +1 -1
index 7fb4e321a431..2fa438e4f96e 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_balloon.c +1 -1
index 0c3691f46575..c8da32af4195 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_mmio.c +12 -12
index 745c6ee1bb3e..a17b3788733e 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_pci_common.c +8 -8
index f6bed86c17f9..41fda6695c36 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_pci_modern.c +12 -12
index c0c11fad4611..edbc6f9c89b4 100644

Lines of this file are not shown. View the raw message.

fs/autofs4/expire.c +1 -1
index 1cebc3c52fa5..cba6666a7546 100644

Lines of this file are not shown. View the raw message.

fs/autofs4/waitq.c +1 -1
index 35b755e79c2d..57ce5c76c790 100644

Lines of this file are not shown. View the raw message.

fs/binfmt_elf.c +2 -2
index 051ea4809c14..1630d4b00f22 100644

Lines of this file are not shown. View the raw message.

fs/char_dev.c +1 -1
index 24b142569ca9..ed640ad2e2b8 100644

Lines of this file are not shown. View the raw message.

fs/cifs/connect.c +1 -1
index 4fbd92d2e113..7edfa47b7ead 100644

Lines of this file are not shown. View the raw message.

fs/compat.c +3 -3
index a71936a3f4cb..82d351098ab1 100644

Lines of this file are not shown. View the raw message.

fs/hpfs/namei.c +4 -4
index 506765afa1a3..4c4fb25f6c67 100644

Lines of this file are not shown. View the raw message.

fs/isofs/inode.c +2 -2
index bcd2d41b318a..fc615ea62d5b 100644

Lines of this file are not shown. View the raw message.

fs/proc/task_mmu.c +1 -1
index 85d16c67c33e..0afebfeea006 100644

Lines of this file are not shown. View the raw message.

fs/pstore/inode.c +1 -1
index dc645b66cd79..a4616d824574 100644

Lines of this file are not shown. View the raw message.

fs/statfs.c +1 -1
index 083dc0ac9140..825542123b3c 100644

Lines of this file are not shown. View the raw message.

fs/xfs/uuid.c +1 -1
index b83f76b6d410..b7af65af0046 100644

Lines of this file are not shown. View the raw message.

init/initramfs.c +1 -1
index b32ad7d97ac9..fc6097672e05 100644

Lines of this file are not shown. View the raw message.

ipc/compat_mq.c +2 -2
index ef6f91cc4490..27496d912ae0 100644

Lines of this file are not shown. View the raw message.

kernel/fork.c +1 -1
index 2e391c754ae7..30e04d28bff4 100644

Lines of this file are not shown. View the raw message.

kernel/power/suspend_test.c +1 -1
index 084452e34a12..14e002e0d16e 100644

Lines of this file are not shown. View the raw message.

kernel/ptrace.c +2 -2
index 2341efe7fe02..fd06700cd933 100644

Lines of this file are not shown. View the raw message.

kernel/signal.c +1 -1
index f3f1f7a972fd..13b267a99fea 100644

Lines of this file are not shown. View the raw message.

kernel/sys.c +1 -1
index 78947de6f969..b6a4bcc0f815 100644

Lines of this file are not shown. View the raw message.

kernel/time/posix-cpu-timers.c +4 -4
index f5e86d282d52..eb1760020a3f 100644

Lines of this file are not shown. View the raw message.

lib/mpi/mpi-pow.c +1 -1
index 5464c8744ea9..a0367b6c2c85 100644

Lines of this file are not shown. View the raw message.

lib/mpi/mpih-mul.c +2 -2
index 7c841719fdfb..8fc5b5cb0e2f 100644

Lines of this file are not shown. View the raw message.

lib/mpi/mpiutil.c +1 -1
index 314f4dfa603e..aeadcce5d2e0 100644

Lines of this file are not shown. View the raw message.

net/9p/trans_rdma.c +3 -3
index 52b4a2f993f2..3cd4c1ea4a5c 100644

Lines of this file are not shown. View the raw message.

net/atm/br2684.c +3 -3
index aa0047c5c467..975825678dfb 100644

Lines of this file are not shown. View the raw message.

net/atm/pppoatm.c +1 -1
index c4e09846d1de..963670812cbb 100644

Lines of this file are not shown. View the raw message.

net/compat.c +1 -1
index 5cfd26a0006f..59851e30aa3a 100644

Lines of this file are not shown. View the raw message.

net/core/scm.c +1 -1
index 14596fb37172..bddc9ded93e5 100644

Lines of this file are not shown. View the raw message.

net/openvswitch/flow_table.c +1 -1
index d073fff82fdb..3f3645078913 100644

Lines of this file are not shown. View the raw message.

net/rds/ib_rdma.c +1 -1
index a2340748ec86..3d7680f6d8cb 100644

Lines of this file are not shown. View the raw message.

net/rds/iw.c +1 -1
index f4a9fff829e0..ec68e0b0307e 100644

Lines of this file are not shown. View the raw message.

net/rds/iw_rdma.c +1 -1
index b09a40c1adce..341999a626dd 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtrdma/svc_rdma_sendto.c +2 -2
index df57f3ce6cd2..70db517e7c7f 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtrdma/svc_rdma_transport.c +4 -4
index 5763825d09bf..ac3e796eeae6 100644

Lines of this file are not shown. View the raw message.

security/keys/encrypted-keys/encrypted.c +10 -10
index 696ccfa08d10..37688d7581f6 100644

Lines of this file are not shown. View the raw message.

security/keys/trusted.c +10 -10
index 0dcab20cdacd..5428c679598f 100644

Lines of this file are not shown. View the raw message.

security/selinux/hooks.c +2 -2
index f8110cfd80ff..d8a3cf6fa0c8 100644

Lines of this file are not shown. View the raw message.

security/selinux/ss/conditional.c +2 -2
index 456e1a9bcfde..e60f7855f4ce 100644

Lines of this file are not shown. View the raw message.

security/selinux/ss/ebitmap.c +1 -1
index 57644b1dc42e..e9c45692d6e4 100644

Lines of this file are not shown. View the raw message.

security/selinux/ss/policydb.c +7 -8
index 992a31530825..79ddb86b180e 100644

Lines of this file are not shown. View the raw message.

sound/core/sound.c +1 -1
index 175f9e4e01c8..e35344c87b8a 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/tlv320aic26.c +1 -1
index 2c904d7150ad..e5fca13c264b 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/wm8983.c +2 -2
index 7350ff654bbf..35b5d04c375d 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/wm8985.c +2 -2
index 9918152a03c7..0ef374b714ac 100644

Lines of this file are not shown. View the raw message.

sound/soc/fsl/mpc5200_dma.c +4 -4
index 0b82e209b6e3..bc310ec4aa74 100644

Lines of this file are not shown. View the raw message.

sound/soc/soc-core.c +3 -3
index 790ee2bf1a47..ae5c74c78433 100644

Lines of this file are not shown. View the raw message.

sound/spi/at73c213.c +1 -1
index fac7e6eb9529..cf8571322090 100644

Lines of this file are not shown. View the raw message.

tools/firewire/nosy-dump.c +6 -6
index 3179c711bd65..73287dea3026 100644

Lines of this file are not shown. View the raw message.

tools/power/cpupower/utils/helpers/msr.c +2 -2
index 31a4b24a8bc6..852f18c35b18 100644

Lines of this file are not shown. View the raw message.

tools/power/x86/turbostat/turbostat.c +2 -2
index 0dac7e05a6ac..c5d1cea97d1c 100644

Lines of this file are not shown. View the raw message.

tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c +6 -6
index 40b3e5482f8a..0cece734cd3e 100644

Lines of this file are not shown. View the raw message.

tools/spi/spidev_fdx.c +5 -5
index 0ea3e51292fc..b304776fb21c 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/vm/thuge-gen.c +2 -2
index c87957295f74..3e5c6975c22b 100644

Lines of this file are not shown. View the raw message.

tools/usb/testusb.c +7 -7
index 0692d99b6d8f..ec342121b75c 100644

Lines of this file are not shown. View the raw message.

tools/virtio/ringtest/main.c +4 -4
index 3a5ff438bd62..130e46f7ca91 100644

Lines of this file are not shown. View the raw message.

tools/virtio/ringtest/ring.c +5 -5
index c25c8d248b6b..a62ea4743646 100644

Lines of this file are not shown. View the raw message.

tools/virtio/ringtest/virtio_ring_0_9.c +2 -2
index 47c9a1a18d36..70a2d5016f4e 100644

Lines of this file are not shown. View the raw message.

tools/virtio/virtio_test.c +6 -6
index e0445898f08f..51ea75f7a950 100644

Lines of this file are not shown. View the raw message.

usr/gen_init_cpio.c +1 -1
index 225ad244cf88..156101d8d67a 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#3 lore raw

Re: [PATCH] treewide: Use 'sizeof(x)' instead of 'sizeof x'

Quoted 15 lines · Ingo Molnar
Quoted 3 lines · Ingo Molnar

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

So applying a semantic patch like this to all .c files:

  @@ expression E; @@
  -sizeof E
  +sizeof(E)
  @@ expression E2; @@
  -sizeof((E2))
  +sizeof(E2)

Quoted 2 lines

Produces the single patch below for the whole kernel - instead of generating a churn of 1,000+ patches ...

If this isn't a joke, a nicer way to submit this is by subsystem and not as a single huge patch.

This allows subsystem maintainers to reduce patch
contention as this patch already doesn't apply
to -next.

maintainer
#4 lore raw
In reply to Ingo Molnar
Quoted 24 lines · Ingo Molnar
Quoted 21 lines · Wei Tang

This patch fixes the checkpatch.pl warning to fork.c:

WARNING: sizeof sig->rlim should be sizeof(sig->rlim)

---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/fork.c +1 -1
index 2e391c7..30e04d2 100644
@@ -1143,7 +1143,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
 	sig->real_timer.function = it_real_fn;
 
 	task_lock(current->group_leader);
-	memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
+	memcpy(sig->rlim, current->signal->rlim, sizeof(sig->rlim));
 	task_unlock(current->group_leader);
 
Quoted 8 lines

kernel/fork.c static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) · line 1149

Quoted 1 line
kernel/fork.c +0 -0
 	posix_cpu_timers_init_group(sig);

So there's over 1,000 such occurances in the kernel and we do not need this drip-drip churn...

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

That, or a single patch taking that piece of idiocy out of checkpatch.pl...

#5 lore raw
Quoted 2 lines · Al Viro
Quoted 1 line · Ingo Molnar

* Wei Tang <[email protected]> wrote:

[]

Quoted 1 line
Quoted 1 line
Quoted 1 line

WARNING: sizeof sig->rlim should be sizeof(sig->rlim)

[]

Quoted 5 lines
Quoted 3 lines

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

That, or a single patch taking that piece of idiocy out of checkpatch.pl...

https://lkml.org/lkml/2012/7/11/103

maintainer
#6 lore raw
Quoted 5 lines · Joe Perches
Quoted 2 lines · Al Viro
Quoted 1 line · Ingo Molnar

* Wei Tang <[email protected]> wrote:

[]

Quoted 1 line
Quoted 1 line
Quoted 1 line

WARNING: sizeof sig->rlim should be sizeof(sig->rlim)

Quoted 8 lines

[]

Quoted 5 lines
Quoted 3 lines

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

That, or a single patch taking that piece of idiocy out of checkpatch.pl...

https://lkml.org/lkml/2012/7/11/103

Umm... Matter of taste, really - and I don't quite agree about "should think of sizeof() as a function, not as some ass-backwards special case C parsing rule that is subtle as hell". I've seen enough folks getting confused about treatment of arrays; confusion between sizeof uses and function calls often contributed to that.

#7 lore raw
Quoted 11 lines · Al Viro
Quoted 10 lines · Joe Perches
Quoted 2 lines · Al Viro
Quoted 1 line · Ingo Molnar

* Wei Tang <[email protected]> wrote:

[]

Quoted 1 line
Quoted 1 line
Quoted 1 line

WARNING: sizeof sig->rlim should be sizeof(sig->rlim)

[]

Quoted 4 lines
Quoted 3 lines

If anyone feels strongly about accepting such patches, then the right solution is to create a Coccinelle semantic patch to run over the whole kernel and get over with the churn once and for all.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

That, or a single patch taking that piece of idiocy out of checkpatch.pl...

https://lkml.org/lkml/2012/7/11/103

Umm...  Matter of taste, really

On that I can agree.  Idiocy rather less so.

A message that is not in the archive (sent off-list or not yet received): CAOviyajXB2y5zuFhdRPQfVSe_NYvaFjjUz6f86e791AvFPYfMw@mail.gmail.com

maintainer
#9 lore raw
Quoted 4 lines · Aleksa Sarai

I haven't looked at the order of operations for sizeof, but I imagine there's cases where it might bind in a different way than is expected. Are you sure there'd be no negative downside to removing the check (the whole point is to ensure no new code has stuff like that).

I won't comment on the whole point (or lack thereof) of checkpatch.pl, but the only subtlety with sizeof is that sizeof ( type-name ) <something> is *never* interpreted as sizeof of something cast to type-name. IOW, its priority is higher than that of typecasts. If <something> starts with {, it's a sizeof of compound literal, otherwise it's an unary expression "sizeof ( type-name )" followed by <something>, which might or might not yield a valid expression (e.g.
sizeof(int)1
won't parse, while

	sizeof(int)-1

will be treated as (sizeof(int)) - 1).

Potential headache is along the lines of
#define A (int)-1
sizeof A
but that's more of "use enough parentheses in body of a macro to avoid nasty surprises" - same as e.g.
#define A 2 + 2
A * A
yielding 8 (2 + 2 * 2 + 2) rather than expected 16 ((2 + 2) * (2 + 2))

FWIW, the actual rules are
unary-expression: postfix-expression |
++ unary-expression | -- unary-expression |
- cast-expression |
+ cast-expression | ! cast-expression | ~ cast-expression |
* cast-expression | & cast-expression | sizeof unary-expression | sizeof ( type-name )
cast-expression: unary-expression |
( type-name ) cast-expression
Note that while e.g.

	++ ++ n

is allowed by grammar, it runs afoul of the constraint for ++ argument, which must be a modifiable lvalue. None of the operators above yield that, so the rules for ++ and -- might as well have been ++ postfix-expression and -- postfix-expression resp.

#10 lore raw
Quoted 15 lines · Al Viro

FWIW, the actual rules are
unary-expression: postfix-expression |
++ unary-expression | -- unary-expression |
- cast-expression |
+ cast-expression | ! cast-expression | ~ cast-expression |
* cast-expression | & cast-expression | sizeof unary-expression | sizeof ( type-name )
cast-expression: unary-expression |
( type-name ) cast-expression
Note that while e.g.

Quoted 5 lines
	++ ++ n

is allowed by grammar, it runs afoul of the constraint for ++ argument, which must be a modifiable lvalue. None of the operators above yield that, so the rules for ++ and -- might as well have been ++ postfix-expression and -- postfix-expression resp.

Unless I'm mistaken, * cast-expression yields an lvalue.

- Kevin

maintainer
#11 lore raw
Quoted 6 lines · Kevin Easton
Quoted 2 lines · Al Viro

the rules for ++ and -- might as well have been ++ postfix-expression and -- postfix-expression resp.

Unless I'm mistaken, * cast-expression yields an lvalue.

D'oh... Obviously correct (and just as obviously, ++*p is valid and quite common). Shouldn't have posted while half-asleep ;-/ Self-LART applied...