Received: by 2002:a05:7208:20d2:b0:82:bbfa:f723 with SMTP id z18csp40384rbz; Tue, 7 May 2024 09:58:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV/Y2LOO95U60eFwgQsOoMXvM9DWu5dcX9nFcnOnfStHiym4zbouxeX/4j9qlRD+KDzZU3M/GZpj6l87FQ2i4F5ELGgNvIY8KWv5h1XQ== X-Google-Smtp-Source: AGHT+IGZ9U+9LVE0XzNTKojK8dFfBdf3ORjMVike9VD2/hUj4jPwMKI7LGrQT5MfLTkoFRkzpgKM X-Received: by 2002:a05:6e02:b45:b0:36b:46b:1338 with SMTP id e9e14a558f8ab-36caece149fmr742015ab.9.1715101086641; Tue, 07 May 2024 09:58:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715101086; cv=pass; d=google.com; s=arc-20160816; b=gNcaBRvLjdX9vrYl6MHHUqhR2MvpRXt5RCszQ+m+7BxHFVn2UF1rx1eZi0yA4nU9Of UddN/ljYOlnMKZO33LNoch2ptfroQqxTgNWk3J6YvzO6SiwLV9eSBsM97tsnLjDqXfF8 fqrhY7U0zmPvN316d9+j4uzZdgwfWjgwVA5ywMFFPF1qfU23Hya7fZ1XG6GktTPIVvTc NEJGoIQ7Yrq4WiLVbyemuMFRvlMeUb5mf9dDqq7mWlACBB/XSo+mZtbvVLCBkGyvpL+t qfMtkWGLB9TTkpDRVenyF3NcBC5JrowBF0CIN2QIjV8DWftLHykEUEwqR9hZZ+uYxf4Y sDrQ== 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=2A/cdtQJ5ubVGGh9zBSnEjfvf8aW68DShS0IQqplaqg=; fh=oSWjc2qvpNSnqC/guQSY9Y/aqWCHHC2DHZlT3VZldcA=; b=Dqxt1mysyzdWHQo7cIydmhR1a4jiAQQhZgptR6ilMnEYcj3dZ/G/GFe7BvH+HxPmO2 +XXbY5CzncidPRZFvqTrLur9xzUpJraE8wwpKy9UcQAqXtFXYPHW7gYTsJUm0DqCuCSg 0keYvzqa14EaVvRSw6DXjjydPtSe04c6gvqQCO+EkAo8jkQred2Nyda9PKL2JjZcXlxs 4dnNI196oRnQ8FbTf2CRGwS0rjqWm7GP2y2cQLZvG9zIKrPc5+/snwidM0XodwB4QqfE Z0nLuBb1ObI68vaIcopq5EgNQT3nDJnhNTRVefzHH2JbA08nM47pZkPVgJwxu/rAI+Cl Cb5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aOZS1PuR; 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-171801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v191-20020a6389c8000000b0061c5be3e977si7101501pgd.733.2024.05.07.09.58.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:58:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aOZS1PuR; 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-171801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171801-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 28CE1B275A6 for ; Tue, 7 May 2024 16:28:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8B8416D33D; Tue, 7 May 2024 16:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="aOZS1PuR" Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (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 3109316C84E for ; Tue, 7 May 2024 16:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099234; cv=none; b=jYY99lmFateCPTTiR34JhA9Zh6fWvdyknc1TktEVOporg56XxpyE3nHEMSbrbkDGWqwwqALMPO4mnWp94B84Ey2sGlfAyfFJwffHWExHOhYatwSc4DdzEejMrxrU134sLgPS27+5DlMECJXv8NZNgdOpv9KQPLbbAYXVnD5Cxuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715099234; c=relaxed/simple; bh=8PUpSF0/4qPVDDDsamD0PWejHF9bSQacFjYzGSE/u/8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GrUghwBGRD8VQcFf8BTzolr3+WW0hXBzHSrS0d2F3v0/ou4tsYbAGdrST4GHCuyWbCITuPSRt+VPKfyV9ORQZppVFuQ1oA3dUaZsoDzs/bCC5SVXjlii5oXFm100Hsq5lMU3WGX7wJdNW6byz4coknNceYf57aDOOElsclKzKKo= 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=aOZS1PuR; arc=none smtp.client-ip=209.85.210.49 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-ot1-f49.google.com with SMTP id 46e09a7af769-6f09ed75e4cso398691a34.3 for ; Tue, 07 May 2024 09:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099232; x=1715704032; 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=2A/cdtQJ5ubVGGh9zBSnEjfvf8aW68DShS0IQqplaqg=; b=aOZS1PuRYowzcpnKFw93tyCjn1TMW/H+eUOMROQtGijkZWCUuVLHsSdHdOGAneU3Og H8nSJOW90VS7gDBO1PX54YohzD31tINvktPfYeCjwYaYx7b+DKwEAeJs9Rly3y+psNBK P4w1INioENzgvSHG4+EFsAdzH6Q3pttcEc+68= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099232; x=1715704032; 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=2A/cdtQJ5ubVGGh9zBSnEjfvf8aW68DShS0IQqplaqg=; b=VQPtNtT2A0b1UikXY5aSMDXDhd4lvNiQ/4P4vCxoGP2n8V1rf8cFHDfZVPaLb9U6p3 obDMY5YDtUU0N7kD9JUYerZkYXbKZwkQsQxydKv7Q/WNRCI04xKHHUXFKCPOeVJFxwhn hDy9HsqanBNgySj+0vRlC2IMehW+7UcY1qLNAvZolyLH9IlM1Y8f8/ZRfiPBsR90qxW/ tL2RPwqEXYcUnLlrz+CuxBHlkRVif63kz/pistkRJoyxW8YfTI9/RA9mq+s8fuY6q2Or tWXMVCP9fIMV7lFDLq/17DbNnxQ1oigXOBRBdWx/s+ErL5o2WsDnL2ccYXn+kyVvy3+t HZ5Q== X-Forwarded-Encrypted: i=1; AJvYcCVDYuCQeEQVvvRmFqjmZmYBCRJ+BuX19UL+WQ6IQSZPge0GCVwHFpsD64uN6+4HLHiisHnJve248HFFuo4U5aMEayZd6U12pbl90nxh X-Gm-Message-State: AOJu0YzMq9ouIBTadBV/TZpVdoEHvA5vsjWozkEgi8HOy26CFoObdIJh sTdoKKrfUOUTL1tznBnGdHfDV34nsXm2ATCQJE+wmzFyG9o0PML/4hbM3bY03Q== X-Received: by 2002:a05:6870:e998:b0:23e:b42a:499 with SMTP id 586e51a60fabf-24097bdf8camr109598fac.2.1715099232296; Tue, 07 May 2024 09:27:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:11 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:08 +0000 Subject: [PATCH v2 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: <20240507-cocci-flexarray-v2-3-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 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.0.rc1.225.g2a3ae87e7f-goog