Received: by 2002:ab2:7104:0:b0:1f7:f6c3:9cb1 with SMTP id z4csp55048lql; Tue, 7 May 2024 09:33:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtAgZCGK7QcO5pmxj22jdqa66XWQoXHJWusnBYB2A/MaH8UHgYjzDCnQIdenKHLjLS2E5HddTRTyXt47VOtiKlfmLaWH6rSkVsam3aaQ== X-Google-Smtp-Source: AGHT+IH0baiOvI+HiJeUNe1uHzkB8ZBSTeQ8qS/u755pThgfKxhkZFHMM6/x1SMENZjo9x4qsLtz X-Received: by 2002:a05:622a:188e:b0:43a:b2c9:60de with SMTP id d75a77b69052e-43dbf8664bcmr2601931cf.56.1715099597374; Tue, 07 May 2024 09:33:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715099597; cv=pass; d=google.com; s=arc-20160816; b=rrgZqBPg2aYnxavYcwTCnomlBVWpn42S1U4eAPJuMsERiRTJpOkh/g+49cXoOJBgpL AHs1+S534UnZfQ5/QqnaZlnbVNCcN7uH9dXqrCRSf46bGLZ3N5zko1g3I/adBnYYB6ju eokgHOE+2yx3FBrfT2MRYNYfmv/xC2WzGV7ybTiwMs459MGzYQ0GUxRV59GAA7rMcYr2 XZ/R5g3sEri8IBjzDIvgk7PPTSLHKYUfeGJKTTCc+9iRJbJxeoacAd8RXJqTgSAg2ANd fARyZz9Kurlnz+ePaMOFg01H/ehllS+9lNqLx/LX+oibWH369Yux9d++0ZG0/CB1WBQr HItg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=24yjDTHuOCF+C8SbX9O7bVVIA87jnk99ezK2b/3Gma4=; fh=8zg/b6wJero/igQJAQfFtsRXWrpANMaYssD48QLmAFM=; b=EY9yUCz0+s41za9CEsRlzblUiZD0ceobIeNI7b6a0TvHzbcKfWK9tWf9vDjDBQ/D8X fLTX0q6Qeph7aIgysllF2erqR+aYNi87rDiVpnrSAjtlxO5hxpkeVGPHiVRribgrY9yd NnZt0DevJi7yeMd9eRO2n0HOlAYTyC9TqIbJ7WO1l51nOXc03SDqfkRhbvDL1auwTCE9 AQwa0FbJQFdDXO+LDbJ4iFgHkGoN56RMsObbg8BOuC7OsAu/hnw19LPmQfo/KWkF3XwU TiYtzaEkm/lUM8Sb/wWtYzmV0ybV1imI6cvAO3tjT0x6SY0qLmKlNwpF41JxrKsi6scH NrdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kijo11kH; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-171816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q11-20020a05622a030b00b0043af8ab9f4csi12311143qtw.24.2024.05.07.09.33.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:33:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kijo11kH; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-171816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3EA641C24033 for ; Tue, 7 May 2024 16:32:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4DFEA1802AA; Tue, 7 May 2024 16:27:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="kijo11kH" Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7F9A171085 for ; Tue, 7 May 2024 16:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099247; cv=none; b=KYOgIk86xSGMw/oKhjsEqB90Ql8vYZfoeoTXjSfPcFSq21icAPyTyG8XAm8hrDw/3qseHm9a2AQJOY4GtjKYKPQEPwgb4EEcXgWyS6CVjEH2TriRzFEdoA+p204A6Hl/yxCdB0xUqbrvDJfJxgYx7gXfmnczOWKqGEA2HcPU9d0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099247; c=relaxed/simple; bh=xx+wxFNs3ZuqK7Hxds/mLdbM5HIFghI8UQG5DaBamLQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D6FwvxWYF61XDaeKAVP1Exwq+Ha0RKEVflZXGUQahvhZ9COncD7cYNKorkiSP3oYcsgUlR+uV7XGref/RWJGPUDXDtWCm0qsfx1D6e2DWLnF4OvWf/H76map7h/UDMIufeTlqW3FeXjdW9s/G1z13vkR2vHhSSDm8M575yRXOoc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=kijo11kH; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-43d4a2d0a0bso16204511cf.3 for ; Tue, 07 May 2024 09:27:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099245; x=1715704045; darn=vger.kernel.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=24yjDTHuOCF+C8SbX9O7bVVIA87jnk99ezK2b/3Gma4=; b=kijo11kHp2VAvCMSD4iUw/+pq4P4CA+f7MIsCw0/FUSb+XujX+hkKeCu264OA5aDBA 5wdUM8cO+wONlCxMUKFSKDh721ktw7XSngbs7+Rd90021jKDJMZvbRBUegNR6CIVvnz2 Rkgqrs9ZYugnUb5sh1vbaYj7t8FOMVc1EvYRk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099245; x=1715704045; 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=24yjDTHuOCF+C8SbX9O7bVVIA87jnk99ezK2b/3Gma4=; b=eF5sWtqtq/ByPc8Bs0k7EAJsdmB7/6EDtWgfPUDQX8lahjpzZ4U0/oHLXhIdTdvdmK hu6b1Z4UKOboFsM1D/gvsLYEZdSG5WXPgu7dCMszrtHGP2OOovBN57gl7whfGSg9glQF RIeb/QqfblJ2jjLMx7I13wsIpneGHfCX1I6tMZFDkwcwaDyMmNSIRReOpqEoDuJTwNFQ NK8wAWf3NZ5pobHpvuofiaKxYExToo/TiwrsjjEZ0/oBVPaMGrmRTOV5ZL9NZumw2/8n BNGcrU8P+6uw/tCHsHwupUQxOoKqKCWZdk4YnJ0DRreGSXQJT18VvNIyWJsOfxUsPwur y6Dw== X-Forwarded-Encrypted: i=1; AJvYcCWGnP36hHimAfZuL5E0PgMeaV4VbJqVSfob+gygiKpwlJTUHp0CaiMcsYUdI0VmkZGbqEtlKQRVRZH/9uUSgjy1wR5ZQPIPBNGeIFub X-Gm-Message-State: AOJu0Yx+b9r1TTpvKJw4KIrsX1v9+JJA6u9AXERvRilI4SUpmPp4aOkd 5tugbJknfyXC31mhZthTrIfATBIaNPyYCTYYQ2DxJqdiuDALTWDoAqcIXdyr3g== X-Received: by 2002:ac8:7e8b:0:b0:439:dfc7:aca4 with SMTP id d75a77b69052e-43dbf868fd7mr1746031cf.63.1715099244908; Tue, 07 May 2024 09:27:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:24 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:23 +0000 Subject: [PATCH v2 18/18] media: venus: Refactor hfi_buffer_alloc_mode_supported Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240507-cocci-flexarray-v2-18-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 Replace the old style single element array at the end of the struct with a flex array. The code does not allocate this structure, so the size change should not be a problem. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_helper.h:1233: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 --- drivers/media/platform/qcom/venus/hfi_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index dee439ea4d2e..9545c964a428 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -1230,7 +1230,7 @@ struct hfi_interlace_format_supported { struct hfi_buffer_alloc_mode_supported { u32 buffer_type; u32 num_entries; - u32 data[1]; + u32 data[]; }; struct hfi_metadata_pass_through { -- 2.45.0.rc1.225.g2a3ae87e7f-goog