Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp952800ybi; Fri, 12 Jul 2019 07:16:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvqEW6zFsuMIyHsRU7EygAzZZQAGELZlhQ8xc03Fl3ouB50MF/+vSMhC/QxCX3bim0I57U X-Received: by 2002:a17:902:ac85:: with SMTP id h5mr11914081plr.198.1562940986424; Fri, 12 Jul 2019 07:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562940986; cv=none; d=google.com; s=arc-20160816; b=jwAZeKd5KiVpaZVUssxMV4CCEB4zicu6JAqr52PreL8SrEjQYsecjUbyiJiKu8T6Ao np5dV3xodtv2alY6OY1eE/YCZWKj5gEBT6AfObQZ67tegzRiQ00ALWzYoDqUn8M4sAxH Zun+IBga8z+MxuUKLzPL4BC7M8KS2/CQpfMyPO3Y5WH4p7rt2MsWSnETVti8T+7nL/Zb s0W69F1wgkh4nb55oAM18GjFB/CevIEbQ3hBiMxgpvthTGWQclc3MNj5F0bYOLYC1gKn FZ2jmBNDYzUr9ShJrGY4hzrdyYiakxE7BD8piNES3tx9YTVSLSJh+TwUxentiMEKuUpS SAXA== 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; bh=2B3QRy0TUzXJCD13y+4B8Pk+xxr914PmCGUK/QaRkmY=; b=nDWZ7hQJlMEkdNKcC+wuvTmSIa2cUx/pwhdwu+JHw3rE/wnl3IoyyrFPVHwolpkxt2 TAEoXeZ9qTLnMSgHMfPTluLIDEw2TwsQ9tBu75zI/IudI0/kooeNxNmrnysZ1HDU8bvf hlj8Gyh90t34pfwh1pneq05sTs4EHzwWLb+nOACPvJtbSV3Cb20udBUOyNWde1l1Ek+B aNnjbSZkXEYwS6fWaZjsIDZNvq0G8LGZl5vX6OHKbnfi/Z50DlPJsokiQ4TRuQhKnOsd AGsIPNoHwEWTX/W+mR95/zv5lFLmVmoeZAFKQLQa9aFoSQZQ/kgCFJNAZK/dVSuo4rhA boXQ== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v63si8257367pgd.111.2019.07.12.07.16.10; Fri, 12 Jul 2019 07:16:26 -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; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727438AbfGLOOa (ORCPT + 99 others); Fri, 12 Jul 2019 10:14:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58730 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbfGLOOa (ORCPT ); Fri, 12 Jul 2019 10:14:30 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E21B3086202; Fri, 12 Jul 2019 14:14:30 +0000 (UTC) Received: from redhat.com (ovpn-116-209.ams2.redhat.com [10.36.116.209]) by smtp.corp.redhat.com (Postfix) with SMTP id 0577960C66; Fri, 12 Jul 2019 14:14:24 +0000 (UTC) Date: Fri, 12 Jul 2019 10:14:23 -0400 From: "Michael S. Tsirkin" To: "Martin K. Petersen" Cc: "Gustavo A. R. Silva" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , "James E.J. Bottomley" , virtualization@lists.linux-foundation.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: virtio_scsi: Use struct_size() helper Message-ID: <20190712101408-mutt-send-email-mst@kernel.org> References: <20190619192833.GA825@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 12 Jul 2019 14:14:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 11, 2019 at 08:18:54PM -0400, Martin K. Petersen wrote: > > Gustavo, > > > One of the more common cases of allocation size calculations is finding > > the size of a structure that has a zero-sized array at the end, along > > with memory for some number of elements for that array. For example: > > Applied to 5.4/scsi-queue, thanks! Oh I put it in the virtio tree already. Can't hurt I guess :) > -- > Martin K. Petersen Oracle Linux Engineering