Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1975863ybi; Thu, 18 Jul 2019 01:20:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWNfxSPa0UKUwjWfGSS1MQK1M40bu6EPLGJjBuyktUU9Jyn2LdnZd8G86sMJ4HxmoVVI/9 X-Received: by 2002:a17:90a:9b8a:: with SMTP id g10mr48439327pjp.66.1563438058344; Thu, 18 Jul 2019 01:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563438058; cv=none; d=google.com; s=arc-20160816; b=Yx6vSwHxG6vG1Jp80apbZxOl4/MUcAIDvII1y98HlBw/9tmAHrGKZqrbb9XKHGDLHP m4RUcE8klUQVIuHyGfT8SnN8pyQrJr65px/6P5k/HY7jByKiIqcKyE4SaAZzzpVs4FHi uw3LOXNuO+Xqq4k4DJRz1eTTjGBwxcVhb+EgYzL/ikpJUS5lKBzyk8JkWLI5IJwXn1q3 T+zLqfelyzM0jEDuWOZmrT+itaFWH5zeKJiGz6nleA7JrHdU/+3UlCz+WwtnfO39cQZt GNzXimExOVieNyusvNEwNSrC1CfVp+vRvRT7o76UmM56vuI/1F6ZcrAbkw6gTv9oceXV pt8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature; bh=11mjxUgmlKpFT65Qn2eRET8NgzSw6D9B85VQzs3KMfo=; b=bOTtph0sNzyQH5oiMbaOV7mTM0G9eKUgdnxn1P+5BM7sMSQGA97QUoSSH/SIU+GK7D wg7LB3KyTYF8cQ6HRBuFde8jojyAo0yaTRf0i/qFFlb7YWXDYlBm12JBgqvVs9D0rQSP /Fae1+GgEDPWhtpP7iN544Nu8tE/OTow74/LKXIPiuLxlno3xnqOtnTBHKyu+BkgCbjL pgvz4BHJAKsOPhGeeoN3r5fUgwEyeIB2AtHoDQn6UpnLYzb3wrOR4ri4Jc+YJGpcUh0z E3+xeiFM5GMUDkXRxtFIdUcvMXdBxI2zex52o2W0ID6QaW8NDlTpjC5eRKO87JdZrhuP yQAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HtvtQx53; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si1899937pgs.520.2019.07.18.01.20.41; Thu, 18 Jul 2019 01:20:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HtvtQx53; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389350AbfGRISu (ORCPT + 99 others); Thu, 18 Jul 2019 04:18:50 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34872 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbfGRISu (ORCPT ); Thu, 18 Jul 2019 04:18:50 -0400 Received: by mail-pl1-f193.google.com with SMTP id w24so13481060plp.2; Thu, 18 Jul 2019 01:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=11mjxUgmlKpFT65Qn2eRET8NgzSw6D9B85VQzs3KMfo=; b=HtvtQx53myfqvYkQHosyY0m2p2GWHSgJJFqxDjRNT3U1hCs+p/fPZ89zb5atB9tEHk upOI07pZfj0LpeDY79dNU+aDhdiMhF2PuuZ9ecJHPFs7P6E3BGj5WWeYyuZM0Csf/Npd wTJq85Ysb2fGCQNjrp+6WDjrjbBonUxrMZnAdQeklgBldQHRe5jppXfpjvKKeHcB0bSt PkzVzGTgWBcF0I44iDTR/dLI13Iz77Iav2txppTF+8e34wwtKdz0Cea78dER1cWCLjiL zBrTPRwFNYIIIW0NYoH2gqsIxMjf1SbqEF1cSUJKRVh5IhW9GDveHDWeGEvcBHfQMm5z KvyA== 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=11mjxUgmlKpFT65Qn2eRET8NgzSw6D9B85VQzs3KMfo=; b=Bak/pQjPa5hXCqo9oUSkLnNVoHCDyNip7QbC5pluWbryevJ4gMsbdhllCl8Fs2irnw jvK6jy9fWVMQYQnyfoWbZ30ub+4TndOke7JlbA/Wmv+eBvF9ySk8HYTDvCxNYe5Ua5rw vlYcAAm6cycGYtRulP1whbz++zv5K0e7sClovEvUlUXPCSI98onB/M5huKyW5tbYHWQu qa2kF/XJCC6YWhdVtOjLvOiGfw9j8b9s75O79EaTmLG5fmV++gqcioDoW6BkN37KVSYF EA7vOTKkQM10ALZTH5elAwmR6i4hc35xGXUzJ5045skXO9hCQQypHgeH6If7jArEtwG/ 9LuA== X-Gm-Message-State: APjAAAVz9mIptoM5z6QW9zyO/Vtg/yY/KYgmzvODe7FT/gmR4dF0UPZd 0nGALvFqPvFa4FyA2P8TLrY= X-Received: by 2002:a17:902:9a42:: with SMTP id x2mr49146527plv.106.1563437929386; Thu, 18 Jul 2019 01:18:49 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id l4sm26669847pff.50.2019.07.18.01.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2019 01:18:48 -0700 (PDT) From: Chuhong Yuan Cc: QLogic-Storage-Upstream@cavium.com, "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH 3/3] scsi: qedf: Replace vmalloc + memset with vzalloc Date: Thu, 18 Jul 2019 16:18:32 +0800 Message-Id: <20190718081832.28808-1-hslester96@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use vzalloc instead of using vmalloc to allocate memory and then zeroing it with memset 0. This simplifies the code. Signed-off-by: Chuhong Yuan --- drivers/scsi/qedf/qedf_dbg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c index e0387e495261..0d2aed82882a 100644 --- a/drivers/scsi/qedf/qedf_dbg.c +++ b/drivers/scsi/qedf/qedf_dbg.c @@ -106,11 +106,10 @@ qedf_dbg_info(struct qedf_dbg_ctx *qedf, const char *func, u32 line, int qedf_alloc_grc_dump_buf(u8 **buf, uint32_t len) { - *buf = vmalloc(len); + *buf = vzalloc(len); if (!(*buf)) return -ENOMEM; - memset(*buf, 0, len); return 0; } -- 2.20.1