From patchwork Thu Apr 28 16:32:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 8972481 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B077BF29F for ; Thu, 28 Apr 2016 16:32:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5AFA2026C for ; Thu, 28 Apr 2016 16:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBDA820219 for ; Thu, 28 Apr 2016 16:32:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774AbcD1Qcm (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 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3SGWQNA010911 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Apr 2016 16:32:27 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u3SGWQ8f024799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Apr 2016 16:32:26 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u3SGWOeo026441; Thu, 28 Apr 2016 16:32:25 GMT Received: from vaishali.oracle.com (/115.99.73.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 28 Apr 2016 09:32:24 -0700 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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;