From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id F09BE4203E2 for ; Thu, 30 Jan 2020 05:10:29 +0100 (CET) Received: by mail-pf1-f193.google.com with SMTP id 185so801581pfv.3 for ; Wed, 29 Jan 2020 20:10:29 -0800 (PST) To: Stephen Kitt , Philipp Reisner , Lars Ellenberg , drbd-dev@lists.linbit.com References: <20200124200307.1808593-1-steve@sk2.org> From: Jens Axboe Message-ID: Date: Wed, 29 Jan 2020 21:04:09 -0700 MIME-Version: 1.0 In-Reply-To: <20200124200307.1808593-1-steve@sk2.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Drbd-dev] [PATCH] drbd fifo_alloc: use struct_size 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 1/24/20 1:03 PM, Stephen Kitt wrote: > Switching to struct_size for the allocation in fifo_alloc avoids > hard-coding the type of fifo_buffer.values in fifo_alloc. It also > provides overflow protection; to avoid pessimistic code being > generated by the compiler as a result, this patch also switches > fifo_size to unsigned, propagating the change as appropriate. Applied, thanks. -- Jens Axboe