svn commit: r238013 - in stable/9/sys: dev/mfi dev/mps dev/mpt kern

Marius Strobl marius at FreeBSD.org
Mon Jul 2 19:19:08 UTC 2012


Author: marius
Date: Mon Jul  2 19:19:07 2012
New Revision: 238013
URL: http://svn.freebsd.org/changeset/base/238013

Log:
  MFC: r237546
  
  Correct sizeof usage
  
  Obtained from:	DragonFly

Modified:
  stable/9/sys/dev/mfi/mfi_tbolt.c
  stable/9/sys/dev/mps/mps_sas.c
  stable/9/sys/dev/mpt/mpt_cam.c
  stable/9/sys/kern/subr_firmware.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)
  stable/9/sys/dev/isp/   (props changed)
  stable/9/sys/dev/ixgbe/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/dev/mfi/mfi_tbolt.c
==============================================================================
--- stable/9/sys/dev/mfi/mfi_tbolt.c	Mon Jul  2 19:13:38 2012	(r238012)
+++ stable/9/sys/dev/mfi/mfi_tbolt.c	Mon Jul  2 19:19:07 2012	(r238013)
@@ -1078,7 +1078,7 @@ mfi_tbolt_build_mpt_cmd(struct mfi_softc
 	if (!req_desc)
 		return NULL;
 
-	bzero(req_desc, sizeof(req_desc));
+	bzero(req_desc, sizeof(*req_desc));
 	req_desc->header.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO <<
 	    MFI_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
 	req_desc->header.SMID = index;

Modified: stable/9/sys/dev/mps/mps_sas.c
==============================================================================
--- stable/9/sys/dev/mps/mps_sas.c	Mon Jul  2 19:13:38 2012	(r238012)
+++ stable/9/sys/dev/mps/mps_sas.c	Mon Jul  2 19:19:07 2012	(r238013)
@@ -2217,7 +2217,7 @@ mpssas_scsiio_complete(struct mps_softc 
 			sense_len = min(returned_sense_len,
 			    ccb->csio.sense_len - ccb->csio.sense_resid);
 			bzero(&ccb->csio.sense_data,
-			      sizeof(&ccb->csio.sense_data));
+			      sizeof(ccb->csio.sense_data));
 			bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len);
 			ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 		}

Modified: stable/9/sys/dev/mpt/mpt_cam.c
==============================================================================
--- stable/9/sys/dev/mpt/mpt_cam.c	Mon Jul  2 19:13:38 2012	(r238012)
+++ stable/9/sys/dev/mpt/mpt_cam.c	Mon Jul  2 19:19:07 2012	(r238013)
@@ -3187,7 +3187,7 @@ mpt_scsi_reply_frame_handler(struct mpt_
 		else
 			ccb->csio.sense_resid = 0;
 
-		bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data));
+		bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data));
 		bcopy(req->sense_vbuf, &ccb->csio.sense_data,
 		    min(ccb->csio.sense_len, sense_returned));
 	}

Modified: stable/9/sys/kern/subr_firmware.c
==============================================================================
--- stable/9/sys/kern/subr_firmware.c	Mon Jul  2 19:13:38 2012	(r238012)
+++ stable/9/sys/kern/subr_firmware.c	Mon Jul  2 19:19:07 2012	(r238013)
@@ -193,7 +193,7 @@ firmware_register(const char *imagename,
 		    __func__, imagename);
 		return NULL;
 	}
-	bzero(frp, sizeof(frp));	/* start from a clean record */
+	bzero(frp, sizeof(*frp));	/* start from a clean record */
 	frp->fw.name = imagename;
 	frp->fw.data = data;
 	frp->fw.datasize = datasize;


More information about the svn-src-stable-9 mailing list