From patchwork Tue May 7 13:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657034 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5D67C25B4F for ; Tue, 7 May 2024 13:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sXQiJjTM84JxC0wfuVBr5hJf9W/E/s5ZFdsaAZRhT34=; b=Oww0Xxsj+sN02y CMOcUe98iaYwUeurXF9Ljs7huuu7U9M10lOKLN+XZpeJIjPrrqstkZsZs9CRw/CzzxLkxnGiudTGj 8/LSAefYzRx9cO3OtrS1qfCsOiWZtDuhAi5DY32JNil0eBXn851JGh1LBoE/mT0GF6OdyxTsRvwJR Or9TfG7bckXEs8e85pKpAfxeNjPipg/LWIYA8oE+/aao8WSQrvZdJN9c6e/tVDaqGr2/A7gaMFF6a KY8Gr4tGK/Gzyjuh7cDyyGVIWaJA8btpDsmWvOxLWpNzObUClSBt89FDa4CFcQlYgwfLUCzukqmZM A4bA8Xo1PvZjaR61nJUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kk3-0000000BBB8-3dRQ; Tue, 07 May 2024 13:20:23 +0000 Received: from mail-qk1-f171.google.com ([209.85.222.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4KiP-0000000B9qr-3pqp for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 13:18:48 +0000 Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-79291d441fbso286959585a.0 for ; Tue, 07 May 2024 06:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715087920; x=1715692720; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WR87o59ttHnNvNigBqZHzwph/s3gT6BLw9Ga86sRtPA=; b=CCBEAUCmVQCV4HgUb7ikTuzL+/REumiSDhlefIq4y0RuGg9V1ef3alMUMvmKRn4ocz Ivc0tWd/kCSelrHvCwJLXsZ3P0LFvoc0wSBm5h/wdrPeC2v/dvLpJc0nPjX4WH11/+c6 z+EUgZLe/Q8aiyBKNB0IkcEHElGU34R89Gvzg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715087920; x=1715692720; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WR87o59ttHnNvNigBqZHzwph/s3gT6BLw9Ga86sRtPA=; b=GabedgyKK7vMGgtAuBuFvbK2YlKfxiG0WcttUv2hnWmzjr0IU9ENIXwYGwmJIahhSb Xw0DaKK1cX7m0CK6vno09g+gWWz+AYfOya+c58WO/hImRADiI0/2k8eATfqUjauh2H8+ ZmHunVyH3ibhdZXEsZHN5niDxzwcTdkMWli2xLFbPm6z60TpVEEJk2t+jPopZchelL/A Ej9QsWL0ZmAGZKv7fxyrqvs5Sej+gjU9QTq80p3lRP1OPZMpnt/oNs8gdk2F90F79sWa Gi5iHg3rBYyzD7AgV6OxXO/yQsZvbrn0yvHh+oXooGA3dtdEEyuUnnnPe8+MhR5l2i1c 16Rw== X-Forwarded-Encrypted: i=1; AJvYcCV+ARqLV77703JtStmaJaOXNarLgukbed+csh7Gs4X8gAw3aogU1CpI+I1mQWeg7wU3bVP6MrJuQNC7JArt2E4WS5zODqfj5lsll87t0OSptOt3ZAE= X-Gm-Message-State: AOJu0YyM9B9Scy0Zp1aRLfU7Rg2O80to+iN/2HQ63VKDGdLAlfxBCXkC uyqvOaW6rWENM4VqMZJ2bpDxfdqP+x/y68ZwB2xmxuedyGEECRd91qBw9zA25A== X-Google-Smtp-Source: AGHT+IGatpIQRwE9h01tY7yyLZRrAcLmql6eJb+YKcxD2Wq6gpUB9pyNvjqWHkivGZUb+9PKsnvIcg== X-Received: by 2002:a05:6214:c4b:b0:6a0:def6:6c8f with SMTP id r11-20020a0562140c4b00b006a0def66c8fmr15390917qvj.47.1715087919625; Tue, 07 May 2024 06:18:39 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id t15-20020a05621405cf00b006a0d19c3139sm4655105qvz.118.2024.05.07.06.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:18:38 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 13:18:36 +0000 Subject: [PATCH 10/18] media: venus: Use flex array for hfi_session_release_buffer_pkt MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v1-10-4a421c21fd06@chromium.org> References: <20240507-cocci-flexarray-v1-0-4a421c21fd06@chromium.org> In-Reply-To: <20240507-cocci-flexarray-v1-0-4a421c21fd06@chromium.org> To: 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 , Ricardo Ribalda X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_061842_296208_C0161F32 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace the old style single element array with a flex array. We do not allocate this structure, so the size change should not be an issue. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:204:5-16: 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 41f765eac4d9..6dff949c4402 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -201,7 +201,7 @@ struct hfi_session_release_buffer_pkt { u32 extradata_size; u32 response_req; u32 num_buffers; - u32 buffer_info[1]; + u32 buffer_info[]; }; struct hfi_session_release_resources_pkt {