Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp4132543imc; Thu, 14 Mar 2019 13:07:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyST3OOV+kvZyyYLMyE6tYmD7Gwr2ySHEYZA9D5f0toVi+WF7SzkBiD8YX/xRXytwtzVWp0 X-Received: by 2002:a17:902:ab82:: with SMTP id f2mr148283plr.93.1552594062940; Thu, 14 Mar 2019 13:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552594062; cv=none; d=google.com; s=arc-20160816; b=NEPmYNqEFYlONMVALBJwZCE09azOacDMHhbRYn/o5Eet4omo9LtfrzDMAWaJCqU8Jc tUXkFdCx+xSv5QZrWhienm9zeriW1TO9PJnoulWqG8SR1q/nq2Zr/dYQlaes1qyOUB+W RU0bohI47se1d8FK8rMFbObZ5+gk08b6MqENCrNjV2qLLF96gUWik+K1NFqoyJAMYL7s 60TY/a7Dt86Rlw13z0n/yf3AkkkdCmVWLlTVOuOR+HnaZ7lFS8h88BVH5WQA6DhdfuES 4Iu57U3JH4XOCnAgX1X7egDoKFyWZn8tcVXZJ1mxaD6BrBDCq9+O6LvJYMCAbenMImmI SWHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YzEHB5aWwddSacdYRHdX6XA8+uBycjteGJ3ShNLj/h8=; b=CReMdqxXu/VhQADjWhoBwnU5U7YMdkIu1sgdXXXCugay+krh35HPypHE/3Fg/2msYs rSJ4wlOpRhtm9huf2k5ufspvU4N/wEcAtg57UY3MdatpLke3CQd+mLxi2AriKB/m1ueP pdNBwpqvJtde1S7s4mj8M/P+4VgkTKbTG0UtSFqVchw/FtuqC0S9d6Sd8eQm85t6upO8 IdBzHZAwA0qIcslVhyCY6m8VSZqyGIUq3Z8W4nzfipTa0VFlayL18U7VClJ5SZXuQba5 JciJVl7+DesemRB/JySHsIdu1jVJzHINANZLyDzxH2Pnf6GxgNEXLjS78d+yr2xiI9Hl Wy2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fYuDqEDq; 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=pass (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 k13si1438057pgl.237.2019.03.14.13.07.27; Thu, 14 Mar 2019 13:07:42 -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=pass header.i=@gmail.com header.s=20161025 header.b=fYuDqEDq; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727774AbfCNUFM (ORCPT + 99 others); Thu, 14 Mar 2019 16:05:12 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:54628 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbfCNUFM (ORCPT ); Thu, 14 Mar 2019 16:05:12 -0400 Received: by mail-it1-f193.google.com with SMTP id w18so6731005itj.4; Thu, 14 Mar 2019 13:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YzEHB5aWwddSacdYRHdX6XA8+uBycjteGJ3ShNLj/h8=; b=fYuDqEDqaFllJimzzH4XOIal12h3MYLDQXRZKYam6QylBveXFnAvrk1Pfcoj68ZHu2 k/AGlZIwkpfbd86H0bflsFlKjur3mKbk20q5k5t8nEvnGhoMDABxN4VFgITnFCtd8aCj OCMjty2gI7V+0l98YQQazQS3PY2TSrqo83CklENE6lU/LeHMbctb/kGGhEDFw1wQY6J3 Q3vGOOXflQ01Dn8amDviUvY1Bs3TmF2vX8PEZ1udKCyqAsuhWxQvbmcgn+OI79l5o5bN wOd91zUv7lklO3NEaPUIpuSeG8kPUkb9Rp3cSlrHOsC0BIzUmLJv1pfq95lThTqtVc+v T/vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YzEHB5aWwddSacdYRHdX6XA8+uBycjteGJ3ShNLj/h8=; b=dv610K7biAKXJ56Ypz2LOorHuSW9YWtxsZG4eGz7DPw0gt9Ezor1h4P2tzFioGWXI1 qA42xgNFKZGQQWKZPXJ9DG9euMbi1Y4yRWxdCPBDXDJQCBZqgVmpU/Dn8aiy26thWixT 3fcxAcV91XqCliUqV4jwWH/srcD9EuVQgKTgJwWP6vpQ4o24fU4atUTEw45pQl+gvo8C pg5JmB2aw8lol6AVpNvXxOQM0EMd8vV9E1Je8G7ZR6oy6w+n2emSy9qmHjjETDp9f1ND KLrNfvJH5QnqWHUWcP9zGAxhcYrEO21YiFcg79exhtke6XiS7Xu4Zt2BST91vPf+xAs/ kapg== X-Gm-Message-State: APjAAAU5JrDgBgwvRVSgS82PGXQxI/QywawPLf+KeHfU018Gc948p9wC GBkkX5m2yfn2v4enlRIhbHw= X-Received: by 2002:a24:9491:: with SMTP id j139mr189689ite.9.1552593910743; Thu, 14 Mar 2019 13:05:10 -0700 (PDT) Received: from ubu-Virtual-Machine (66-188-57-61.dhcp.bycy.mi.charter.com. [66.188.57.61]) by smtp.gmail.com with ESMTPSA id k133sm1719566itk.9.2019.03.14.13.05.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 13:05:10 -0700 (PDT) Date: Thu, 14 Mar 2019 16:05:07 -0400 From: Kimberly Brown To: Michael Kelley , Long Li , Sasha Levin , Stephen Hemminger , Dexuan Cui Cc: "K. Y. Srinivasan" , Haiyang Zhang , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] Drivers: hv: vmbus: Set ring_info field to 0 and remove memset Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set "ring_info->priv_read_index" to 0. Now, all of ring_info's fields are explicitly set in this function. The memset() call is no longer necessary, so remove it. Signed-off-by: Kimberly Brown --- drivers/hv/ring_buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c index 9e8b31ccc142..0386ff48c5ea 100644 --- a/drivers/hv/ring_buffer.c +++ b/drivers/hv/ring_buffer.c @@ -197,8 +197,6 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, BUILD_BUG_ON((sizeof(struct hv_ring_buffer) != PAGE_SIZE)); - memset(ring_info, 0, sizeof(struct hv_ring_buffer_info)); - /* * First page holds struct hv_ring_buffer, do wraparound mapping for * the rest. @@ -232,6 +230,7 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, reciprocal_value(ring_info->ring_size / 10); ring_info->ring_datasize = ring_info->ring_size - sizeof(struct hv_ring_buffer); + ring_info->priv_read_index = 0; spin_lock_init(&ring_info->ring_lock); -- 2.17.1