From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BED5812DD92; Tue, 18 Jun 2024 12:28:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718713710; cv=none; b=J9oQ49XkYxrzVQPfR6SlRrQ3Myf8EifN4E/TXPhmLEZHEiXnkJdAvUVy3xOXNBMTruOuMfAud82bvxtst6if0hMamB3Q3NSNcfPlepxx2ZabS9WxXx6RC0BvFyLdjYV5IciiA6FTRhkSTZEJObrDJr/lXqR98b56zHHZwtSskcI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718713710; c=relaxed/simple; bh=vOP/2k+M/WIvhi0Beq+Nc9phojX4msFZhUIKmYnxTw4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=fxmlAboLNu69gvjXFcy7GSdiFBVSPvTSCXUrjfPzroxlKjnDRQIM5+iGpaXuXSKziEGKdBqX0BY/7Xs7lj/RUDQUSHeUxr3DRYHNF2aJOaMuveNBYhSd7TB4vjxqtY3r7U7/RIobYsp0CAnKtbjmSXWahsa1Me5QpTGbdHvXuBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=gOoG4HIU; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gOoG4HIU" 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 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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-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 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