From patchwork Thu Oct 1 19:59:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 7311151 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 90386BEEA4 for ; Thu, 1 Oct 2015 19:59:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B58F0207AA for ; Thu, 1 Oct 2015 19:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1AFD207A9 for ; Thu, 1 Oct 2015 19:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756890AbbJAT7O (ORCPT ); Thu, 1 Oct 2015 15:59:14 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:36290 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756881AbbJAT7L (ORCPT ); Thu, 1 Oct 2015 15:59:11 -0400 Received: by lbcao8 with SMTP id ao8so15637023lbc.3 for ; Thu, 01 Oct 2015 12:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id; bh=KWW7/nxIPD2rpREnyUa/SyO03pzBFo0ElXK+TkdmG8M=; b=MMkZMc0CmW1i4fc8yfu30wemXDJtikjMnLIEfkQxerkPEFQAZ1FGaKCQYgYY3b7zdw l1Hmluqna423nPiGzzg/+K3wEo27X3Z76iyiB1EG21Q1Jk3T8vtymIG/pRWYOt5mrEGS PakHK7qigouk4eUbQc+2JmUB2qIPURsPBDJk8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KWW7/nxIPD2rpREnyUa/SyO03pzBFo0ElXK+TkdmG8M=; b=e6WEC9HnSKPw7SxwA902YtbIANgIEiFUM1pnGhAfIXksfhHpR6y0njG0S6K9VB+lcg GEfqm8EtRoAQ/0xjX6jSxjqQl+7hS9bJNg9TUMO3uWbzerdDLQoAVoRPNACOvKj/61et /HI9Y9+vp2x2Rp+4beVOQ4Sq+FOa9n52Nj2Lp9m0DAWR/8lfFpB9wqPWQLHMKtyzvqr8 8qGlE/wuOVr7ylaq0MvnSO8KJbzbUBeap3+fqZAhiA83tLUeNWJU3v6ZGxLEz16v+AT9 VR92aQ+keKgNLVwHG0GcScRV2jXZ9R/k7zkmf9ybainjUlU6YmL9hYBbxIbHJmBE6xvm nXhg== X-Gm-Message-State: ALoCoQl5hAJUMQcOs1tKKHmqFiOvtFzpGLCH1Of3QQaEpNyzmKZGzJ2Yd4vAvv0HlrVioqyjE9Uv X-Received: by 10.112.139.201 with SMTP id ra9mr3764159lbb.29.1443729550284; Thu, 01 Oct 2015 12:59:10 -0700 (PDT) Received: from spencer.imf.au.dk ([130.225.20.51]) by smtp.gmail.com with ESMTPSA id wj8sm878477lbb.44.2015.10.01.12.59.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 12:59:09 -0700 (PDT) From: Rasmus Villemoes To: Hiral Patel , Suma Ramars , Brian Uchino , "James E.J. Bottomley" Cc: Rasmus Villemoes , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [SCSI] fnic: use kzalloc in fnic_fcoe_process_vlan_resp Date: Thu, 1 Oct 2015 21:59:02 +0200 Message-Id: <1443729543-19362-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 This saves a little .text and avoids the sizeof(...) style inconsistency. Signed-off-by: Rasmus Villemoes Reviewed-by: Johannes Thumshirn --- drivers/scsi/fnic/fnic_fcs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index bf0bbd42efb5..2d013076bfba 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -415,15 +415,13 @@ static void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct sk_buff *skb) vid = ntohs(((struct fip_vlan_desc *)desc)->fd_vlan); shost_printk(KERN_INFO, fnic->lport->host, "process_vlan_resp: FIP VLAN %d\n", vid); - vlan = kmalloc(sizeof(*vlan), - GFP_ATOMIC); + vlan = kzalloc(sizeof(*vlan), GFP_ATOMIC); if (!vlan) { /* retry from timer */ spin_unlock_irqrestore(&fnic->vlans_lock, flags); goto out; } - memset(vlan, 0, sizeof(struct fcoe_vlan)); vlan->vid = vid & 0x0fff; vlan->state = FIP_VLAN_AVAIL; list_add_tail(&vlan->list, &fnic->vlans);