Messages in this thread Patch in this message | | | Subject | [PATCH 4/10] [SCSI] csiostor: Cocci spatch "noderef" | From | Thomas Meyer <> | Date | Thu, 19 Sep 2013 23:45:46 +0200 |
| |
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de> ---
diff -u -p a/drivers/scsi/csiostor/csio_mb.c b/drivers/scsi/csiostor/csio_mb.c --- a/drivers/scsi/csiostor/csio_mb.c +++ b/drivers/scsi/csiostor/csio_mb.c @@ -1531,7 +1531,7 @@ csio_mb_isr_handler(struct csio_hw *hw) * Enqueue event to EventQ. Events processing happens * in Event worker thread context */ - if (csio_enqueue_evt(hw, CSIO_EVT_MBX, mbp, sizeof(mbp))) + if (csio_enqueue_evt(hw, CSIO_EVT_MBX, mbp, sizeof(*mbp))) CSIO_INC_STATS(hw, n_evt_drop); return 0;
| |