Message ID | 20240507-cocci-flexarray-v1-17-4a421c21fd06@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 F37B0C25B75 for <linux-arm-kernel@archiver.kernel.org>; Tue, 7 May 2024 13:21:20 +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=PgS0DtdRe4cXNtmNJKJcPLwOal8073jJHJmev6VcxvU=; b=qIRBciXu290Yal ckbPMrTdx+JVhLo+i6biX7Tt5Ipq8FdmT6RcxLYBQFkvo6QXybT37TxF6lqMqapal42Zj5tkbfDtB WM0kZr4mbfxzjPNweUb7l4lzgh9AEU2jGmC3ow19T9LZua5B8ftEHPGGtmMq1/sXfG24lWqo4ivCV gUgDIC1EQmX/V948GD9Ewjp6FCL0fZfCHuu+9qkfqku80yQtfFExd5xotoMAp+x2uvfSzY9SWOnpl 2YSxIn+bLO4i8oL/YWCfZ3an+51Etzsai3RSvIjt0rVlVpE0pXavCmv63ssnGj829Qp4F+MCjvQe8 hhxz5K6wv9AORPUNNWoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kkj-0000000BBdA-3fD6; Tue, 07 May 2024 13:21:05 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kib-0000000BA1u-3n9t for linux-arm-kernel@bombadil.infradead.org; Tue, 07 May 2024 13:18:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Cc:To:In-Reply-To:References:Message-Id :Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender :Reply-To:Content-ID:Content-Description; bh=LytlgeivFEVadVFPCSFVFsEkz0aZMS5bY0SwfM06VYA=; b=iUOreH8rGR39hdkoZrMdRopPgy e2tozUCfM2D7upZiTKgadAjdReIodsIfukSD6u8FhSu8cYcE3LwanurxiD+DK92+x1HgMrVzhcGnn 4IJWgDsdyXSXohG4i8F6UD1VAC4drqhhpAqA7NGMEA/aM2fODAno55UKqX0P/aNlFwQw0kSY3Dmq1 YrtCZm4G89iziTfbYnXS32wEK3TdvcSOTALbcVCKOSSp1sY/9kO1lFAE8Y7Q2eSY8R/2fpTIzx9pI bhEtDpf+25cjc1HpA0C50OqPc5KbGIgLd4WhSdVkMCdE2KeOmwkx2k1m05ccN4OftH6qTZ6SMsB62 x8/Mltkg==; Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4KiX-0000000DIVI-3XPt for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 13:18:52 +0000 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3c86f066256so1750306b6e.2 for <linux-arm-kernel@lists.infradead.org>; Tue, 07 May 2024 06:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715087926; x=1715692726; 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=LytlgeivFEVadVFPCSFVFsEkz0aZMS5bY0SwfM06VYA=; b=QCWng/0kjWT/0y028pNfkm/r6MIjyruVMVGjYKtdGkyqu8u3jPnx0dxU4qUEcYrfEP xrX8LpaXE/o8xKX+ynFT1EqmR3m4S244leboObUC96cmKZLqrzhZKraGY86EgtvA/hZy zOdcjgSzKDDE31C/TC05kxuwaY0Vjt+5nDfyk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715087926; x=1715692726; 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=LytlgeivFEVadVFPCSFVFsEkz0aZMS5bY0SwfM06VYA=; b=r90PkGou9H0VT45HHpQhT7c420inhBk4lloeDiiAlt14gnAjbhSE1V7N3xsAi5PxRk tL63FM6vQv3mpBCqCh9mbXmCpa4igt99HwhSIJUNzpolI4HifpPeUjj+NYrKDL7M8Z6Z taCDRgepZt7sfU/0k5DI2qV3psXz5QesRT5mD4E7q+pdLFUQhnVk8G2ig3IMGFy1XsKr FrGN3rigBw6wlnoFCMIc9Twxo8OUYoEtYL8EkkHskIR1rchSylz29ldTopybS/8IpPj2 usdHtn/c2fT2KGoQ4qjE0SIhxXMJLJa4nf8F7O6SNfrDteisR3SPgJL3i/f6KgPA5IMq BhSA== X-Forwarded-Encrypted: i=1; AJvYcCVtQjTCGzRb3mb1d459Yok2lIMjDLepS10bp/aGIZ9z9DruSyEdMNaiXcLlBcZW+NpUHUgPXeEj9sD6250Td96XDw9nmlC0MglF11QVaToGjteUtag= X-Gm-Message-State: AOJu0Ywzw41IrlZhMkjeCjgwzazdXR8e2xHfn8Spcwwoz6UzKrmVG3t8 iwkrzEbg5HFKCs3o+lLuFG8/tDifYfHZYYpInIh0dl0XRWtdJlJPIa/JOKUMa1dWf1my7MCsl6x YOQ== X-Google-Smtp-Source: AGHT+IGZMw5Pha/VROCdriiOpH8uUYadLoc23B2z0lYFRFwtANajXpC+2XNhKb0eZC6xMtAWx6sdeA== X-Received: by 2002:a05:6808:4d3:b0:3c9:70eb:151b with SMTP id a19-20020a05680804d300b003c970eb151bmr4342969oie.59.1715087925910; Tue, 07 May 2024 06:18:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:18:45 -0700 (PDT) From: Ricardo Ribalda <ribalda@chromium.org> Date: Tue, 07 May 2024 13:18:43 +0000 Subject: [PATCH 17/18] media: venus: Refactor hfi_session_fill_buffer_pkt MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v1-17-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 <m.tretter@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Mauro Carvalho Chehab <mchehab@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Michal Simek <michal.simek@amd.com>, Andy Walls <awalls@md.metrocast.net>, Stanimir Varbanov <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org> 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 <hverkuil-cisco@xs4all.nl>, Ricardo Ribalda <ribalda@chromium.org> X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_141849_977039_92CA6517 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
media: Fix the last set of coccinelle warnings
|
expand
|
diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index c5123f2e76fe..35423e211ddd 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -331,7 +331,7 @@ int pkt_session_ftb(struct hfi_session_fill_buffer_pkt *pkt, void *cookie, pkt->alloc_len = out_frame->alloc_len; pkt->filled_len = out_frame->filled_len; pkt->offset = out_frame->offset; - pkt->data[0] = out_frame->extradata_size; + pkt->extradata_size = out_frame->extradata_size; return 0; } diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index cd7902743f62..0ccc4102ac3d 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -172,7 +172,7 @@ struct hfi_session_fill_buffer_pkt { u32 output_tag; u32 packet_buffer; u32 extradata_buffer; - u32 data[1]; + u32 extradata_size; }; struct hfi_session_flush_pkt {
The single data array data[1] is only used to save the extradata_size. Replace it with a single element field. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:175: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 <ribalda@chromium.org> --- drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +- drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)