From patchwork Tue May 7 16:27:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657468 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 9EB05C25B5F for ; Tue, 7 May 2024 16:28:05 +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=if9IDgnbGyYFXw 2GLsQBWVBX2BlcgKCEZJKycOMBxe+UTfvgXsWIu7wz7wQ0Uf7A4oAFkettZcs41WipfmaFkGVLsCT apyC0lVjjImVFqMLvJXGVCcSVQAtQaHIJ79MvjdBczphCgoeadZqc35zcuw/B09QsSrjU8bE61OPq o+44+uz/b2l9FkuJhzj1xZPnPj7+yiOKKWF6xcPaIkp45mPz0Tf/16nAMd8pmksQ79g+mZ32pMBJv yEJ8uffcYMMXN4itQM65bKY4aFSSMAMmT6xLH/CFaz++frOz+ergdQXMMNYxS/3rtDdZP3ErPIHqv MonWNEvItjfFVUGX0yJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4NfR-0000000By1P-0hki; Tue, 07 May 2024 16:27:49 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nez-0000000Bxa5-02xc for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 16:27:26 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-43692353718so23891561cf.0 for ; Tue, 07 May 2024 09:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099238; x=1715704038; 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=AbaA8ryjWlC1z+x8qPGMMY8j0yX4BKFRo7+hN+XcXAxqxR5e4gcWefenuA0d7xxrJY zHzR4bZyQkbIrfxKl1fbisVYnBtbwgqBzmiQ4bsqop3Bya3ia1qLK5M09qXBvAzh3vIw tmyOxMFfFbBLDYspfjRGYSC0awEulf3WG2mo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099238; x=1715704038; 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=A4p0aiPjumPUIgm2G0JPAflPps6C8ZAwvHB9fr7ISub4RbtKmEt015CTKLjUNrx7BX APoQxv7iEhTCuCg4RvnHDgzJy8M0Aeh7m5BjgrwU99Vx/6oZXq9AIeCPYVJ85dqpdCEL OhcnX5NSeT1UM6Fjg4yNPT94GECdWq6VZcehRWfrlnmxYHoUoi1OQehBT533MRazHkw+ ZNYQaWckZpbAFthRUdc6tVGefwpvVk7nyMO/2kXsDo4MsUe081VOXv8fJMVzdT/o1+QW ApUnGcCX4/hB2/b4bs1GKBwRTcC7Owk2oFhi8ehqq6bEC7gWLqUeaX6wy+gEEDfDCrrO Id/Q== X-Forwarded-Encrypted: i=1; AJvYcCXN8he29FGPqJQXJIsRYCdGYwPZ3kDxKMB3IN7/4gz5+MuV4M8va1VMoUhr5hlOtq6NCOhF4F3y/ETLJCtTsS5EdgBtjKRM9LkjBvJpA78IoyGJQvg= X-Gm-Message-State: AOJu0YzyGADZccinHxRWthCCMtAuJJeOoTn3ymJBy0qMQUzt/cFxJLTW U1+zZMHQ+pLTPpangKVOgXXvwitUsVC+lotdDN3K3VEfJjg0o7kUd1SSmI+wAg== X-Google-Smtp-Source: AGHT+IGBjH3AdmiLQTQFeu7s9S83R8vO1MeeESLv5H1A9n7OSdIiA2Y0rCHZA8aZ7JmFdPuh3j3q+g== X-Received: by 2002:a05:622a:1aa9:b0:43a:dade:7ad2 with SMTP id d75a77b69052e-43dbf51448dmr2415871cf.18.1715099238350; Tue, 07 May 2024 09:27:18 -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 hf23-20020a05622a609700b0043d1fc9b7d9sm4160597qtb.48.2024.05.07.09.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:17 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:15 +0000 Subject: [PATCH v2 10/18] media: venus: Use flex array for hfi_session_release_buffer_pkt MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v2-10-7aea262cf065@chromium.org> References: <20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org> In-Reply-To: <20240507-cocci-flexarray-v2-0-7aea262cf065@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_092721_911677_677A2443 X-CRM114-Status: GOOD ( 13.61 ) 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 Reviewed-by: Bryan O'Donoghue --- 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 {