From mboxrd@z Thu Jan 1 00:00:00 1970 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 22D5FC27C4F for ; Tue, 18 Jun 2024 12:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bcIHBlUJ9ghm6+ultn/tcx88HblfpazEpA0l0zEQ0FE=; b=F6b/SqtvP14uJ21cJB/u2UJ85j aTtJjYuYKa8Kuo973VEux+VoC8Mqw5OUmHfCBbqQfqfb0INx63dmVIuLncKZgunMKoYUyXNsPNdI6 HvL7fTHU5Jp3LuSUuhVGG1duXv0ZwMrjttG1nZJDhPYj6Xuza6g1Gz+cP6N4nhzqJE1v5ei9KlICj r8X7nRSEAXGC2WnHNhR3OnZM920BwHQVI8GmzYIxyc3FBoitsiYkjeMqMFupkyLHS+aSNoRUXPJDX C0QDUI7asKh6NJNlUQbNzolR8mHfE5TrzG3tadoA1dNqdn++A1jkFRGvT9boRn/Q1Fxwgo1llrbn1 DqXEHowg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJXwo-0000000EsfO-17rY; Tue, 18 Jun 2024 12:28:26 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJXwl-0000000EseC-0X77 for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 12:28:24 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45IBCjNF005249; Tue, 18 Jun 2024 12:28:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= bcIHBlUJ9ghm6+ultn/tcx88HblfpazEpA0l0zEQ0FE=; b=gOoG4HIU+QXl1C0G zyskWokoKxjF/iFGcM/XOXQ9sJW6BYcZ1beniDap7CMHiMSAX0rrZFsF7n3OyJFu SjaHkSBsW0W0y01OMlidJ/G6vWNeeVa4PFgMnWq1VT5OqdBi2HNEkwH9KWjmzndv q0Ke54+f/7nfWJfSCtt7Kkbc8IdqWNyeJ48Ww5iMlP324r3pGKFB5f6G3xPgtFuO bi4s0FYSO/EWF3skn+Xd/+8tDtbHtNS3I9PAyZwgFb66KNHg9SkXvl1FHmwu1NS1 DnyEQJMqxz2x/6BOCcgNs4C1300Ow/uvBYlMjl6f/91eo3PEaejqaDHjxckOnpn9 2ntgJw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yu95rg793-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jun 2024 12:28:16 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45ICSFYo023594 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jun 2024 12:28:15 GMT Received: from [10.216.29.175] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 18 Jun 2024 05:28:10 -0700 Message-ID: <7e50f0fc-60ee-d1fb-3449-bc5051ce23d7@quicinc.com> Date: Tue, 18 Jun 2024 17:58:07 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 17/18] media: venus: Refactor hfi_session_fill_buffer_pkt Content-Language: en-US To: Ricardo Ribalda , Michael Tretter , Pengutronix Kernel Team , Mauro Carvalho Chehab , Laurent Pinchart , Michal Simek , Andy Walls , Stanimir Varbanov , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio CC: , , , , Hans Verkuil References: <20240527-cocci-flexarray-v3-0-cda09c535816@chromium.org> <20240527-cocci-flexarray-v3-17-cda09c535816@chromium.org> From: Vikash Garodia In-Reply-To: <20240527-cocci-flexarray-v3-17-cda09c535816@chromium.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: zHXLCXfmlx72w7M2B2IY9JXN1XxIxelP X-Proofpoint-ORIG-GUID: zHXLCXfmlx72w7M2B2IY9JXN1XxIxelP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-18_02,2024-06-17_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 adultscore=0 clxscore=1015 priorityscore=1501 spamscore=0 phishscore=0 mlxlogscore=968 suspectscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406180092 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_052823_319031_01CCFEEF X-CRM114-Status: GOOD ( 16.37 ) 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 On 5/28/2024 2:39 AM, Ricardo Ribalda wrote: > 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) > > Reviewed-by: Bryan O'Donoghue > Signed-off-by: Ricardo Ribalda > --- > 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(-) > > diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c > index 0a4de8ca1df5..3ae063094e3e 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->data = 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 f91bc9087643..daba45720ddc 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 data; > }; > > struct hfi_session_flush_pkt { > Acked-by: Vikash Garodia