From patchwork Mon Jan 8 23:11:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10150735 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 07E47601BE for ; Mon, 8 Jan 2018 23:11:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFD9D289F7 for ; Mon, 8 Jan 2018 23:11:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E496E28A01; Mon, 8 Jan 2018 23:11:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE76289F7 for ; Mon, 8 Jan 2018 23:11:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933356AbeAHXLj (ORCPT ); Mon, 8 Jan 2018 18:11:39 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32942 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933345AbeAHXLg (ORCPT ); Mon, 8 Jan 2018 18:11:36 -0500 Received: by mail-wm0-f66.google.com with SMTP id g130so17903619wme.0 for ; Mon, 08 Jan 2018 15:11:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id; bh=qS4an35+Uw8HQ4seFaYjKAXT9tAy4kZIFrLs3hIlcqw=; b=Z03iABfL0ygXbHUERKBDfCM8wbQ7K9oSfmGAC4CUIiWpwxrUTk1lGvuMf+1OR7bjmD jhcfzwFAYXeY6zcOs11FNJygfXTrtypd+P2sfD4nyAOWabPUoKCdHLg8avq6V/qGr/HE 3JXEFqm2YPjwqActW+tMlWuLBadPFVnKh49t0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qS4an35+Uw8HQ4seFaYjKAXT9tAy4kZIFrLs3hIlcqw=; b=fzMkLr4qf8AknFFIu5jjc6Fg9qcUrLtBbs9vKlyX269Tg8gqKA+QpUA1hDyakqpYxl inNSC05HqMRz48ZebLZr01kMXc7zEkvGzzJwNaIEJggnUIGJItwBVKBUTwXHDj9lyEEG s94NIsRF+U73sjw+E7VIOCqqjIGaeVff21zTstSs/SM3DlnKok1QkgblYYkFdPCgZMFd 5hMacllJdUmNLf78HB/K/Fe1lo+gXutZdUF/qHc3/ku7pVytZ8S5rziU7D6c8GsLDF27 1gefSZERjJBz0KRSBlOxJvujKVHxHD9+KUX9zeJv1f0aJu73n8ry7r0FQ6clLQaJNEbk mu2g== X-Gm-Message-State: AKGB3mIcPpd67bTT/y14mQQ9eSdmvZ0RL7dR/n8Lh9Q6XymFiWOLhXrV 9OSxDjiQLN/W9hAISNF6jHuacNvnBEw= X-Google-Smtp-Source: ACJfBouY+3Mi2SSKok2w2FcMVKA5q3SR22tFsYIpvqmQSGLkJwaQu0oLYzrDtgO+andPyz4EEyaxJA== X-Received: by 10.80.244.137 with SMTP id s9mr18624404edm.17.1515453094973; Mon, 08 Jan 2018 15:11:34 -0800 (PST) Received: from prevas-ravi.waoo.dk (dhcp-5-186-124-8.cgn.ip.fibianet.dk. [5.186.124.8]) by smtp.gmail.com with ESMTPSA id s7sm8166172edm.80.2018.01.08.15.11.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 15:11:34 -0800 (PST) From: Rasmus Villemoes To: Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , "James E.J. Bottomley" , "Martin K. Petersen" 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: Tue, 9 Jan 2018 00:11:15 +0100 Message-Id: <20180108231115.17459-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.15.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This saves a little .text and gets rid of the unmotivated line break and the sizeof(...) style inconsistency. Signed-off-by: Rasmus Villemoes --- 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 999fc7547560..c7bf316d8e83 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -442,15 +442,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);