Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2276928lqb; Mon, 27 May 2024 14:09:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRR7tPS6UZJzTpO2PWIDEX2gevWU0a1euVI0eh+oOmc4cBAviqrKWw+9hPhWkjAqsP8T0sIpTjqk4cOmJWdJ7hv72iVm5j800oC37SFA== X-Google-Smtp-Source: AGHT+IGxGnS5j9ZsclyOEf7kjk7EkaA25TQbfVl2cmFb2iGYvNHhPCjLPlMyPRmllMpxSfwQttbD X-Received: by 2002:a50:d5d2:0:b0:572:719f:b430 with SMTP id 4fb4d7f45d1cf-578519aa424mr10124700a12.32.1716844175875; Mon, 27 May 2024 14:09:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716844175; cv=pass; d=google.com; s=arc-20160816; b=duhk1oyMtqRGe3Jq6W4p8vgMQLFp8/Iy1hxylWW/oxEgskckV61Jt2f2Sq/U1tjUox +tq9TNhh4o23y89+v3Ey36PR7HxShkGBTl19p3RGOjx4DF3P8KPxxmJEEOjwsSgkb/o3 qHmveiaePGFmHbRBizUHtqhxk//qOUoxS/aFZcCJ3XA91YT0uijifZLdiYGYAX8RJ5Wo 9Jb/e+1AfzqQmqBXn3VDA3P74Cp3JekatAj99vqT0eGCyLahsCmy0B/pAev/ZfpcfqHn Ln0HVgnVhnrNFEwMtKHzbqY5b7lnVgFIs/5XXU46Dc0nCuWRtEw3Iy5iAZ0ivNX46MmB ghWA== 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=fNIsU+/qEYhURt556sfo4PlTlUVRyNCactQuGIIVr1E=; fh=K8iimrvjiQWnl/77eLSLB13RvLpcXLCTywmCsLZmqIE=; b=A30YwHxENMKZiBVHMsBofhT0XOmQ14wwPxNv/PjJA79kY5Wuo0eNCeN0rRohzIHwxJ rwh7RkMS2lYfrZbkYOvM9idg5LhxOmloVp3PJOTspk5FQgkB3q1K5SQTuiH83pUbcyGA M/Q0fkXiy8qMmiyV5Qy3QYmrq735BjJ0WupoveDdDotG0ZP2z5RZ9HssQcAzLmUuCCEk uFKe581tF1yrICHz4WMXgJZ3o1Kw/wfagd2LcYGL8dSS2AJbcU2nYMhCm3/pfYtI1gzj 29zUC/Vihmlbxb+saT2AvHVJaea8HufU4+r2uFjrpIObKxEy9p7KB3uYYL05IG+oDm4X CSrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="cg/+MpnY"; 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-191426-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191426-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57869c05d34si3090057a12.348.2024.05.27.14.09.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191426-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="cg/+MpnY"; 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-191426-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191426-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9D2BA1F219C1 for ; Mon, 27 May 2024 21:09:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 797E0167D81; Mon, 27 May 2024 21:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="cg/+MpnY" Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 00C80161330 for ; Mon, 27 May 2024 21:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716844139; cv=none; b=GcofLXS3brJ6bNOl1X8rsBHhcHrxgpYitsLgqS+saNd6b5VVkfZO1CpmcjGMSyzIJCFQ9ZDGRnSc6C33SlM8TXU5lqOs+m1CjUBnLL9CT+QYHWJ1zdMnhdmH3/HFLVezS3AAml1IGO5g1GDHwtTpAuzqO98jj+15ebiO/eyAkno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716844139; c=relaxed/simple; bh=z13zyxqEexMyebGHgKu+yI97Ps1x4zxNfwmfII/1oPg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X7NyUoYkPb3N4fgGNlbY1e68Moy2401lW/dhc/30jEeKyCH7Y5yBJp7QcuDyXllXlnCqbPecEevoQsaG/qkFLANfk0a6Sd4AV0A9qvykyUcbanB8wG8S0hj/T2rEyMSB4D8J2pjplyjqUlR5ZyVcp3Nzn7wh003l8Eov2fkHcjg= 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=cg/+MpnY; arc=none smtp.client-ip=209.85.219.53 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-qv1-f53.google.com with SMTP id 6a1803df08f44-6ad8344825cso395616d6.0 for ; Mon, 27 May 2024 14:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716844137; x=1717448937; 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=fNIsU+/qEYhURt556sfo4PlTlUVRyNCactQuGIIVr1E=; b=cg/+MpnYLjY26r7OLdNggcPKZCMQLc+lm5KVy0NLWBX/gDQAgUs/IdSfAAQFB24RCe L+kneearIqwg9Ch+OH/FTCCvbrit1HWDMj5bpE1kQPhieF48EXO4+i5MXhYgUNtZoXdS 8dlFmLdSjiOLZ32a6IPmvOwWwm4WgM03rt0Xo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844137; x=1717448937; 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=fNIsU+/qEYhURt556sfo4PlTlUVRyNCactQuGIIVr1E=; b=RqZzArRXtefNWorT8MTBTTHNY50eaw2WIlTP/oM9jM1qH8vmPGM7Wc/UxVeGliB6ZO JLC/5LKNg1zq5a55/2s8RpB/VLYm0A3X4ICo+LqcBW/8SEwG9F0Rb1JQHOCPW7seCQyS X7pPK8y1YZ4E1agYsYuyTOh9Wc1LUMTIMCi4DZbIwSrK1ykK5NFmB9+xR17O1tePR+C0 YTn/PY3siZiigThgV4OZhIdGCGuBVsheVO2JIywGhXct2UVdWffy8jES5vGdfBERzxjP caHL6NIkL4e8wvnxeWmeMTAQlWnTzc3uVEcNyspazqyKPNJAifDcnk0+vB/DcHCE+P9K xc8w== X-Forwarded-Encrypted: i=1; AJvYcCV53xqGl1nWKH0f2bxglfo36oNO1ugkzGE/a1/nr/f8MAi8f5O2de+LHtM/ejWccQ+fhy6ussRGjWXpustjakXIoXe6UDkH2rn7f09g X-Gm-Message-State: AOJu0YyFSv+N7k06RIhTBq1kOnIDRDrVRxz6WpI3gJbGTTlfnfI1raxV twngEEql/tBl2phcLPspDjjztN8YRyQ2YF7b0AnKlKKlhqNmSU10EkM7LA78aw== X-Received: by 2002:a05:6214:4a85:b0:6ab:9428:385f with SMTP id 6a1803df08f44-6abcd0dc953mr122329976d6.31.1716844136868; Mon, 27 May 2024 14:08:56 -0700 (PDT) Received: from denia.c.googlers.com (125.135.86.34.bc.googleusercontent.com. [34.86.135.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6ad850a6dc7sm9511866d6.93.2024.05.27.14.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:08:56 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 21:08:53 +0000 Subject: [PATCH v3 03/18] media: dvb-frontend/mxl5xx: Refactor struct MBIN_FILE_T 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: <20240527-cocci-flexarray-v3-3-cda09c535816@chromium.org> References: <20240527-cocci-flexarray-v3-0-cda09c535816@chromium.org> In-Reply-To: <20240527-cocci-flexarray-v3-0-cda09c535816@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 a single element array, with a single element field. The following cocci warning is fixed: drivers/media/dvb-frontends/mxl5xx_defs.h:171:4-8: 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/dvb-frontends/mxl5xx.c | 2 +- drivers/media/dvb-frontends/mxl5xx_defs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/mxl5xx.c b/drivers/media/dvb-frontends/mxl5xx.c index 91e9c378397c..a15c0438b07a 100644 --- a/drivers/media/dvb-frontends/mxl5xx.c +++ b/drivers/media/dvb-frontends/mxl5xx.c @@ -893,7 +893,7 @@ static int do_firmware_download(struct mxl *state, u8 *mbin_buffer_ptr, status = write_register(state, FW_DL_SIGN_ADDR, 0); if (status) return status; - segment_ptr = (struct MBIN_SEGMENT_T *) (&mbin_ptr->data[0]); + segment_ptr = (struct MBIN_SEGMENT_T *)(&mbin_ptr->data); for (index = 0; index < mbin_ptr->header.num_segments; index++) { if (segment_ptr->header.id != MBIN_SEGMENT_HEADER_ID) { dev_err(state->i2cdev, "%s: Invalid segment header ID (%c)\n", diff --git a/drivers/media/dvb-frontends/mxl5xx_defs.h b/drivers/media/dvb-frontends/mxl5xx_defs.h index 097271f73740..3c5d75ed8fea 100644 --- a/drivers/media/dvb-frontends/mxl5xx_defs.h +++ b/drivers/media/dvb-frontends/mxl5xx_defs.h @@ -168,7 +168,7 @@ struct MBIN_FILE_HEADER_T { struct MBIN_FILE_T { struct MBIN_FILE_HEADER_T header; - u8 data[1]; + u8 data; }; struct MBIN_SEGMENT_HEADER_T { -- 2.45.1.288.g0e0cd299f1-goog