Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp174801lqo; Thu, 9 May 2024 16:58:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWUI6D5eQJMiRU+hFoGUWe3wiV7JJaFLvHhBkcvHW//SK/R5iR5CBgKBDTwtxvtWEQmA1mTwcxeOJhPuCR3+tp2TpQ/fX0wiCyQMoD8Q== X-Google-Smtp-Source: AGHT+IHJw7+DAT4kFw6CEk9SNHUybMGdA0Wfn0aWSG659CJ/APhM5LSE67izb2/SzKKmssS2Bspu X-Received: by 2002:a17:902:b205:b0:1e4:4887:74f0 with SMTP id d9443c01a7336-1ef43e29da8mr10082695ad.36.1715299124643; Thu, 09 May 2024 16:58:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715299124; cv=pass; d=google.com; s=arc-20160816; b=IKPN7MKdwstYrAR/J0hvp1tGt0XlgiFWEXUwbPLJdwa68t+PzAUV9F6mEzN0xD3qlV Q1hx9beeSeWCHSnrSz63ncgkXH0azttFhVxZ+0ethguVa+dH6PWOs12IflrYmxfkddVh suhxgphNuN0L2rsBJr5pmd/60tyGGpkzDzakZHaeEuPXjeUG/Z0w9xjgyCFNgYYI+onC cXDHs5bqsA5gGZNI8FrwFqGbFqoN3xJ7Dp5CN2+x3MTC0/FwXF66FduPGqR8cqUFv8Aq sZ8PrYsvSWPGzn8H0IUCOCirwu/fQc5FJTftHw/SugIdcRVkQGb6GnRW+zaTYFPRGMYh vCYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=SmADRC8neGnr2C7Jsqx/otJ850xdxIBcAhILuBFUDCg=; fh=iqx3ed+gs42B871sv+//bIL0F7AUQjvxKvtP1eeo2Po=; b=KA/4onlRS6V+uHSYPncg106XrTmZ+X5AJpiW9uTHnijYdn6YvyxzbAKSXoe/QD7UHj ji/PpekXCBBcQxJDtQ8QQh18uDRyWdKo8dlgiEy1nxI0enLQVn2FVP6e74Z5UyBl2mwa rzCJ6IFs4TG1tK95oIaZg+zMDVraNx7zeY4YIGk+tOt2dsJi1wV7Ub+4GJ9NGov6wJWB uAN71RRkcdCg9fS8WyDLWLUTB/WG/N7o30Mr5h7Xcj742HUDBKAo7YLuyQ/sTqK44XyS JRM27yt83+ovup4soMCJfkGGgJCRW0u+p/LyraNxAJfXVDzJs2YRi2s6RsH59LQEmT8w 56sA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dWBW+k/T"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-175085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c039428si22660725ad.384.2024.05.09.16.58.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 16:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dWBW+k/T"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-175085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E7DD2B215D6 for ; Thu, 9 May 2024 23:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD9AA1311A1; Thu, 9 May 2024 23:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dWBW+k/T" Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (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 4A7BA12EBE7 for ; Thu, 9 May 2024 23:58:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715299107; cv=none; b=pXaDWzzWQbSHzYY6DUw6mQ8eXqAUgpPT9cyXgyUgjUWO0qhfhV6kQIdhxbi91S8BQAwUQjp6ko5WJKw240jaLL06I2BItUQ+QqWb54AOQvU6BPvZuDAMfWi4lnllRN95atnRNmdpM5OLnhiwo7ltwnKvJDf5SgaJwDT+xWbn8IU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715299107; c=relaxed/simple; bh=kb91QkRvN9QrSwYzW62IYyuQVgedafRInEn1oWI0YLI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fTYi25pLEfnVRDycYhSHChsfupmF8e84vLlfAkwq9oW1Ddce+wK4jBR0C1OHmt2ZsHvLp4/7vT+tC6kyepPdhNlB96AhsUpqS48PPQR3uj0Je961HDIXYKlvjy+ZK3v9Q7TJSqKi45k++PYTFC0lTGYn4h0BisfeIVS4sXwd4wE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dWBW+k/T; arc=none smtp.client-ip=209.85.221.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f65.google.com with SMTP id ffacd0b85a97d-34f0e55787aso1003339f8f.2 for ; Thu, 09 May 2024 16:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715299104; x=1715903904; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SmADRC8neGnr2C7Jsqx/otJ850xdxIBcAhILuBFUDCg=; b=dWBW+k/TNwo8LuuHkQxU5wYLXOLt/5I72lVxDis3RHBb8LU2XwZIe6eSKmdRGakFAD KjH6AZ19LbPFfqIGmwLRnRZA4i2pJHOE4+P7gN7mNxu2V326gtpthnf1Exkee14+WZkd EEMm1R3qYacfRb8FiT2i7tpRIUzVyyJK+zAMkpXzxRZRZedpwAUAVNlmKNQVdQqNrNBx nVF03+1R7bsvUn2B2bQvmochC6FdiV2/usvxv/JCR9Xcpp+Bp5jCXE0Nhi5FpaUzaCW+ 5RMakz90XvOuSDhSzIkIvSKHTz1bVISoEgkrmXwWje+OX3hhpXgW66t2CysX6gG0Wueo 3dkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715299104; x=1715903904; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SmADRC8neGnr2C7Jsqx/otJ850xdxIBcAhILuBFUDCg=; b=H+bPwqtaH0mJouJu5UZ7nKL52EpoyT334lZZraAn+MMTB57LEG7zQcDJOeSHIBk6kd ouD0r+s7oYzXxvDbk5ai9Q7Kxwd5nJcjJ2GJh1DrwlId/RhCzpxzhyI+1l0+7TIIr80P NeWgDbk7zRycvdtgLxaKqtatW81VPxLnobRgCWQ4o7JB6uYPaTREkR6n1z0V2BF9+fz7 /nyo39ATjRKLDdZXcA78gCf8O/sQbB44jjMCktsFfJnkrSwigwnfEapVUdndCXw4+Ipv Qw4derTnka6ebrUnS4l/BvRlOU/mxrrYifWInDaO8lyZ8kfQfYOMqXsrm8ndUhyQ8a7D lYhw== X-Forwarded-Encrypted: i=1; AJvYcCXzlXWjT378xGtBoY1fGpHBAInUfJGwg6btGBFkYCo+s4+6lcEgE6mjZRCFgR/5HtcNCJqhmCTqUQ14j55mTeOuSa5CqvuUgODvHZ1I X-Gm-Message-State: AOJu0Yy09a/+sQ7i9lX084nPcLHXGe9LAw95J9W7z9pvWqUShTWu1DJP kxgoOILm2C+HS9Zm31vL2jU+s95Rc3/X9Udx4F5TTDxJRKn77zO0Zbtp+yb1Up0= X-Received: by 2002:adf:ec01:0:b0:34c:5f6e:1720 with SMTP id ffacd0b85a97d-3504aa62d00mr589668f8f.60.1715299104660; Thu, 09 May 2024 16:58:24 -0700 (PDT) Received: from [192.168.0.3] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baacf7esm2945702f8f.77.2024.05.09.16.58.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 May 2024 16:58:24 -0700 (PDT) Message-ID: <6ddd92f2-5ba5-4832-b4a1-12c9918c091a@linaro.org> Date: Fri, 10 May 2024 00:58:22 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 14/18] media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt To: Ricardo Ribalda , Michael Tretter , Pengutronix Kernel Team , Mauro Carvalho Chehab , Laurent Pinchart , Michal Simek , Andy Walls , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Hans Verkuil References: <20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org> <20240507-cocci-flexarray-v2-14-7aea262cf065@chromium.org> Content-Language: en-US From: Bryan O'Donoghue In-Reply-To: <20240507-cocci-flexarray-v2-14-7aea262cf065@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 07/05/2024 17:27, Ricardo Ribalda wrote: > The single element array data[1] is never used. Replace it whit a > padding field of the same size. > > This fixes the following cocci error: > drivers/media/platform/qcom/venus/hfi_cmds.h:163:5-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) > > Signed-off-by: Ricardo Ribalda > --- > drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h > index e1dd0ea2be1a..15271b3f2b49 100644 > --- a/drivers/media/platform/qcom/venus/hfi_cmds.h > +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h > @@ -160,7 +160,7 @@ struct hfi_session_empty_buffer_uncompressed_plane0_pkt { > u32 input_tag; > u32 packet_buffer; > u32 extradata_buffer; > - u32 data[1]; > + u32 padding; > }; > > struct hfi_session_fill_buffer_pkt { > Its not padding - which is what we mean when we want to align something to a boundary - its data that we don't currently use. Please retain the namespace and do data[1] -> data. Once done. Reviewed-by: Bryan O'Donoghue