Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264AbcD1Qcm (ORCPT ); Thu, 28 Apr 2016 12:32:42 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:45492 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbcD1Qcl (ORCPT ); Thu, 28 Apr 2016 12:32:41 -0400 From: Vaishali Thakkar To: jejb@linux.vnet.ibm.com Cc: naresh@chelsio.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Vaishali Thakkar Subject: [PATCH] [SCSI] csiostor: Do not use sizeof on pointer type Date: Thu, 28 Apr 2016 22:02:10 +0530 Message-Id: <1461861130-22995-1-git-send-email-vaishali.thakkar@oracle.com> X-Mailer: git-send-email 2.1.4 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 922 Lines: 28 When sizeof is applied to a pointer typed expression, it gives the size of the pointer. So, here do not use sizeof on pointer type. Problem found using Coccinelle. Fixes: a3667aaed569 ('[SCSI] csiostor: Chelsio FCoE offload driver') Signed-off-by: Vaishali Thakkar --- drivers/scsi/csiostor/csio_mb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/csiostor/csio_mb.c b/drivers/scsi/csiostor/csio_mb.c index 9451787..a736de0 100644 --- a/drivers/scsi/csiostor/csio_mb.c +++ b/drivers/scsi/csiostor/csio_mb.c @@ -1534,7 +1534,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; -- 2.1.4