From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id D31524201D7 for ; Tue, 16 Apr 2024 15:42:20 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-346359c8785so3402119f8f.0 for ; Tue, 16 Apr 2024 06:42:20 -0700 (PDT) Date: Tue, 16 Apr 2024 15:42:17 +0200 From: Lars Ellenberg To: I-HSIN CHENG Subject: Re: [PATCH] lru_cache: Initialize hlist_head in lc_create Message-ID: References: <20240311030735.233470-1-richard120310@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240311030735.233470-1-richard120310@gmail.com> Cc: philipp.reisner@linbit.com, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Mar 11, 2024 at 11:07:35AM +0800, I-HSIN CHENG wrote: > Use INIT_HLIST_HEAD to perform the initialization for each pointer to > struct list_head in the variable "slot" to provide more safety and > prevent possible bugs from uninitialized behavior. Completely pointless. It is kcalloc'd. Why explicitly zero-out something that was already explicitly zeroed out to begin with. Lars