Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp322112lqp; Wed, 22 May 2024 05:55:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtGXscnOy4MViIpVcsCrBK8zOeEVfXC6Ar5qx8NMVVngfRlWdEQHI+2+ZEFGgo9BsS7QxpQUb8FxSWXxG6/8emGd33X4p92TEzzBgZ3Q== X-Google-Smtp-Source: AGHT+IF0gx9XLWCzjh+Wu/+HBqRSryPgzblzUFRAOQWDKzbPLPuoZJSVlT7CroJsEh05tGN608Qo X-Received: by 2002:a05:6102:510c:b0:485:9a12:cb6 with SMTP id ada2fe7eead31-4890a151a9emr1778652137.26.1716382515277; Wed, 22 May 2024 05:55:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716382515; cv=pass; d=google.com; s=arc-20160816; b=CyJgglwZlZB+B2b/895jdl1SLjpJ4C8DIekRPfj5lVupVkGoPmMM7lEg2kJSZ1hkTz QKSA9uPbRMdSN/2crkDlBDwMJjb/Ny1ROHrIo2PR28k5zlLjGJl8ouRbqaxDx2T5kBVD KBz+iwI2FIkV7I/SJa0JXk/fA3JuggQwx54w34omfXt+VFOwf98vyCjQESzqToZCp0EY KEYjWPnNDsBFKd8x6KG1VtTBEwGsmu7l/0JbfScWwNUQsEHIhq6X1DHJnU7bCoaqeGln HQN4Ec+WbbTrJ+obZMHc3gBBIJxuV+0THOZMOCR95kV3OGhCdx2PuaP5xQFeHkXi1S0Z QcPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=qRSyPLhJtHsuvnS9t5bdddtQaBryY+zRRpKLYbkoicI=; fh=7760cOW1v3adFrvQgdqLwBbygtE32hGdIlp0O5a55B0=; b=mAfqaDP0nVxbWkhw1CAu20M+xHAl8hfwmF4lXFOVlAXivsSRWeVhvSzD7s/HLCfPb1 l+XCqYwVke/yJVPFwkLR9yeuNwQ4jmTbeqDw9hND8zUksSi2B6+o0SMMHmG0pT0GZ4BR QNm0mHzUmYKb2OZ0H3/ZCzONiwIDUn8qN5OWYvaNa/1UFszteHUimAiPDdmhPJHN+q4F v7AWxyXWffp/XEgWLBmxSAH5rExhiJltaN0Iu1Rto3VwkzBvXtcaGdjrjpbTzJev8PTs DO6/hvIoi9bboMOb4Xt70xgiHXpIfBrIB09P1x9twCmXi6q8xtugHwX3MUS40lgWPlim 8F7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V3SDMK7H; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-186244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df56d5a6csi301520451cf.702.2024.05.22.05.55.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 05:55:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V3SDMK7H; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-186244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 066BE1C21D5D for ; Wed, 22 May 2024 12:55:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C8F013D618; Wed, 22 May 2024 12:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="V3SDMK7H" Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E608D17C9 for ; Wed, 22 May 2024 12:55:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716382506; cv=none; b=e/bB3NDxiOGpZktf7Fpn3bcsdt49cc8YGcTA2ZQwT9JO2R/7KOTzAyrWd3Q+GM4czlrorNi/cH+dKlkDIWvLJ1fnqz40Q7MublZMOYRgt9EdtEb1axJ29UPwlzqsEeXK5MpHCa+f3agoUIfHxbmR5+LlrhbC1SGyFhlJo4teL+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716382506; c=relaxed/simple; bh=BinNhgcEH42gS3lWUSSUP7U6VJyoBPjo0uHCGJBaX60=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CVmlWxc7EqEu1/UNP8qvGEBprWihhEPnMrHbbdgm/QCj1VvOUqGpsBfdrHjdyCEwtKM7qU+HM1NMpIp0fhn8tMQtibm5cfSEOg2+D6eOpAIq8W/8JQsvhYSqMpxvbaNFUsPk2qaX/eBNckg6QOoid+OpMC7gCHsqkRHhXYZ3+zM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=V3SDMK7H; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-43e06d21a06so7318181cf.3 for ; Wed, 22 May 2024 05:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716382504; x=1716987304; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qRSyPLhJtHsuvnS9t5bdddtQaBryY+zRRpKLYbkoicI=; b=V3SDMK7H0HgZdCRNVCpyafoAuNcPjYq42TfE+SiPJg+xx7XM+ol+uvVY+3Vsk0pfGG F4u8mZaXBePzVrFzYmx4FSUiE8l1iQsaPtT8SBblOAyyqpl0iXRzmDorl1Fze7GG34WX 6QIjYKkgaarbi5UWlmFdqfl8ZyuIRHuSis8Qw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716382504; x=1716987304; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qRSyPLhJtHsuvnS9t5bdddtQaBryY+zRRpKLYbkoicI=; b=cE8mCETioryKOvT4Oe8GqBqXitzIGwMbpj9qrwdq8MpHqlpLkS8eInRziFTEOFm5Ae 5v2FPyjZYesRvNvHkurNuksVCTpS703h9VNXUKcuuDKk47S8F4Z74Fuen4lhNDSuus19 sap3UP6grXEQRPs6OIaiEpNxf9c42SYDPCzaj99coCOm5F/ShSKS8kVB4mN1VSEy3B9+ V0k95kd9DqqEnNsqpbiJRoT7dqszB5fnQPt9aYKKdGl9xCKRI4ZImqINdEyvAry75Z5t Qdit0p+vBcY+Us3a1UuCTaqJo7CbYn2Hq8FNCMWtyDxHE0McJMTPaVhah0Sc6vxv+KVN 4q0w== X-Forwarded-Encrypted: i=1; AJvYcCXZfxmu4+/+96g9asQuOyO98NOC9Eq4KJ7jNyjdZc86djFGD0kSbpUaKCfLg2HR0/ntt+WAMM5TzFfCxtl5f2q7ndlelVjPEpPKl41e X-Gm-Message-State: AOJu0YxK8YHK/fkSsAlAFz1Ka0iJrKhyLhZf4dfkTWt4PY0PayJaFrDS 9hHX7wj9tDA2AoP3jogoDVZhoGKprjA6i6LiiXkteu++RnIp7C7xwG2VTK7XEon4R78ihOOEYyx x/A== X-Received: by 2002:a05:622a:2d5:b0:43a:a4e9:6ca8 with SMTP id d75a77b69052e-43f9e1b4c66mr20291131cf.60.1716382503628; Wed, 22 May 2024 05:55:03 -0700 (PDT) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com. [209.85.219.46]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43e166e3755sm131233241cf.40.2024.05.22.05.55.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 05:55:02 -0700 (PDT) Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-6a8691d724eso7788556d6.0 for ; Wed, 22 May 2024 05:55:02 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVrsP5qn9M2TKk40cG5BEUNWLdTds3MiYKgZHZeHO6x/Tk0SSq+WiZX68DVCS4iDmZkQ3D+ktBXEhjEgGTyHGwsM+UFn74yGdhSmpxt X-Received: by 2002:a05:6214:3903:b0:6ab:6c2e:e425 with SMTP id 6a1803df08f44-6ab7f356954mr17023246d6.24.1716382501399; Wed, 22 May 2024 05:55:01 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org> <20240507-cocci-flexarray-v2-10-7aea262cf065@chromium.org> <284a3096-cc2d-45bf-9075-fcd1bc60a599@linaro.org> <96593105-0ca3-43c7-86da-7a059cad287f@linaro.org> In-Reply-To: <96593105-0ca3-43c7-86da-7a059cad287f@linaro.org> From: Ricardo Ribalda Date: Wed, 22 May 2024 14:54:43 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 10/18] media: venus: Use flex array for hfi_session_release_buffer_pkt To: "Bryan O'Donoghue" Cc: Michael Tretter , Pengutronix Kernel Team , Mauro Carvalho Chehab , Laurent Pinchart , Michal Simek , Andy Walls , Stanimir Varbanov , Vikash Garodia , Bjorn Andersson , Konrad Dybcio , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Hans Verkuil Content-Type: text/plain; charset="UTF-8" Hi Bryan On Fri, 10 May 2024 at 02:10, Bryan O'Donoghue wrote: > > On 10/05/2024 00:37, Bryan O'Donoghue wrote: > >> - u32 buffer_info[1]; > >> + u32 buffer_info[]; > >> }; > >> struct hfi_session_release_resources_pkt { > >> > > Reviewed-by: Bryan O'Donoghue > > Oops no. > > Please don't change the size of the structure. In this case buffer_info[] is a real flexible array, so there is not much we can do. The driver seems to only uses the structure to address memory. It is not allocating the structure or doing any calculations based on its size, so it should be fine (famous last words). If anyone has access to the hardware it would be great if they tested it :) > > u32 buffer_info; > > --- > bod -- Ricardo Ribalda