Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6671464ybv; Wed, 12 Feb 2020 17:14:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzpYZzHMM8PMa518aKemNAVuQVrXGB8/V0wJegnqyXOBLWkiuMsWpaUqQbCv7oV6kC+DXa5 X-Received: by 2002:a05:6830:16d8:: with SMTP id l24mr11634008otr.268.1581556474260; Wed, 12 Feb 2020 17:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581556474; cv=none; d=google.com; s=arc-20160816; b=Z1xQO0sKg23y64EUVs3KB7S48vdjlyQvhw1MrTFLJRLRkM6+2/vZnJOeVUGERQaZiy 8agwwZ9eoYf7pyXdRF4zBhZCpHe7bfQUcWyuAJdmjCbW1Co9M61x7pCE0RLgZFG1NiNE FPsnk2yG4H/S1DB9kYfWoLtwwPG5Y9hRJ9K7fJeAns3SnoJR6wC7DuRdcOEVhhuQLJFZ 0O/iKAtW7qdiFaVTtgAro5zfR6q5TKxpDFnPRUfMgriLcbYOeDLKoZpnRaZZWFnmQb57 RjDA3nGuA7YlMoOyAF0L/V4GQTcTldT1haywJgw6jXL3xMvbmkVvgN6Xbp71hrBLOH1h prpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=40jqweQ0+u8pWGs2sdI8o9uT1jQxm85/IXkuAtgtunw=; b=omrFQswaY9tXDudB/kkMKEKeHrFWZC13GWspoSibn6UTsMh/IedcG3xM+/nd06e7Ft Ab0/jvFg3fxaVcd8qQSf04oTFJyHAmTalCKTeEW2DNIbqp4ZECE42ZBwYEoVnuzUZPVA O1u66rxXjRpXQ3TMeW6jYIlXGximiSJlam2NkqNcBYybKEerOo9fxJNLvvPhlDriDvEE 6X2Oid+wwAxTgB/J5QWq2axeVeEAjerXGjNzJT/3nuBBwZwYih+TiXjeItktJ9Fnvddh FEQ26NRK2CHTkcWdayaqekFHxz/jqEEkU83tMuzfJ9f354rLfbFKDSdRHjgREeLIfpf9 UoPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QjvWVM1q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si397318oir.71.2020.02.12.17.14.21; Wed, 12 Feb 2020 17:14:34 -0800 (PST) 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=@infradead.org header.s=bombadil.20170209 header.b=QjvWVM1q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729359AbgBMBOS (ORCPT + 99 others); Wed, 12 Feb 2020 20:14:18 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60294 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729185AbgBMBOS (ORCPT ); Wed, 12 Feb 2020 20:14:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=40jqweQ0+u8pWGs2sdI8o9uT1jQxm85/IXkuAtgtunw=; b=QjvWVM1qZ/x/JEEUG2pL57qNTo Vm16OcSWQFsgTWE7GZBtv6918KJGUZHTrodCRERy0oJbPGMbJLt0YdVl3+39ECVz84fVeM9dizjPD wFGUZuU2fGGhcbsmaJ1ZdTW3/25sCg+C+TwNlqitZ6NZvrtBT+Rxow4+q2EJ1u92X87umBI6VxfKO K3uF34Otz32Swt+xQUX9n58RV6hrpeSAshymyz8XvNSN4d9d/z5l5mnA3syylQsVMAs/HympjxQoU tzX43QmNP/UlaSz7UU2g/O7yhI64SFPd9YNC1F9DT1Df3D4W7mkC7dlF7zSGxFUp9UyYXBcJoyNQl RmyGooZw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j234w-0004vu-8o; Thu, 13 Feb 2020 01:14:06 +0000 Date: Wed, 12 Feb 2020 17:14:06 -0800 From: Matthew Wilcox To: "Gustavo A. R. Silva" Cc: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: advansys: Replace zero-length array with flexible-array member Message-ID: <20200213011406.GI7778@bombadil.infradead.org> References: <20200213000211.GA23171@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200213000211.GA23171@embeddedor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 06:02:11PM -0600, Gustavo A. R. Silva wrote: > Also, notice that, dynamic memory allocations won't be affected by > this change: Shouldn't you also convert this: asc_sg_head = kzalloc(sizeof(asc_scsi_q->sg_head) + use_sg * sizeof(struct asc_sg_list), GFP_ATOMIC); to use struct_size()?