From patchwork Sun Dec 24 15:44:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13504317 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 72276C46CD3 for ; Sun, 24 Dec 2023 15:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/Sq20ypyVUgK3zCY7puXnOwjcQZiBdFSeXa43fIha6s=; b=lbpikP6liGJbj2 RKcYf97mhk6vGZzfcppOSPaVOzgDL9CZI+924qz06VXQO/1HGkTBNV6ws6WLQM5E8fqkwsLbTtioY rcEZOu7cYOkApHYen4YjOKC+TNzi/7ovppe2f14algGZi76MBvzHwTk57vgf0VfEwvYyetoCdtREE Nk2Eg6ALz6hJuNYRmBgUoqwc/kmra6oTBvXrpDk9/bHWPztkcpeNqMo/8jWsGzy/pB75tHn5wl33M SufpTpxPtjaptpWtZULJvYl+6eN2yfZ97tNd1MFFnwGhUerJYjRhJ1S83ZQW1iti+Dt/lWOZ853aH zWVLiMwEy1gmT8j8dReg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rHQff-009Ywg-2q; Sun, 24 Dec 2023 15:45:43 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rHQei-009YIb-15 for linux-arm-kernel@lists.infradead.org; Sun, 24 Dec 2023 15:44:45 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-554dd0c95a4so100867a12.2 for ; Sun, 24 Dec 2023 07:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703432682; x=1704037482; darn=lists.infradead.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=uPtI8bSt3Ez5hLHZMbq8TpWSSmR71jwLZo0bXfxiX3Q=; b=nraJWMSe3x5LvMpy5QVPAh9Amjx7hu3LxWCr3RAXBqpdAqyrPMhctJvjY/STEIpTjZ KCS/Qp9W1aput6ctO2ftyzDV7yJQ/dkebp5dwf3SAVtNehxVXkI+nJ1asIhAJfjR3qyu Acd94lEDaF6I7uiWie+FLm72IBWfOLrO1LvaN10WPz+msjk/cons0ALGnRQ0HftK/ZtL NoK81nV/mimRftEKaBfBsl6JFkK7/j9Lj7s2o/5nRg36wWBIPeBGqzCxVquIvv0EcKc0 gTooVtAjsg4uizb/9CfAn+tY9Rz5pZyvVdCIH41PfUXG7Ir7Q/N8pyNk3+G+vLeB6dr8 Wshg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703432682; x=1704037482; 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=uPtI8bSt3Ez5hLHZMbq8TpWSSmR71jwLZo0bXfxiX3Q=; b=FlAn112L7TMrju61Efnw1LZVhOTr0izN+dqd8yhe4Vo+q8Pm89ngaUVNVI/6WRFhRK BwjqK7HCZo8wf5ZgMQ1GfDRR42fBWyRV5T6M71o7QjxbhEC/VyiMcPDALp6iemn2O/qr STAA+Jx70sK8tQTmJ1WHSmGAdt7lREngtf4r6S1Dc6DtjrjrF9aY62+VpvQQq8/mbDbG KmIEQtvBF+FKiEDeVJ89yA26k+r2cTC4+cGhuoxUYhqRAWVOGXVtHMFpHnJVwysO3Bi3 jca6aLcByBB1bxbcmrQsWAoKta+OBMtCP76VSICEmyDKkoH9Bf0aMOfNXEt8A/6N00lT vOcQ== X-Gm-Message-State: AOJu0YxIwZ1a/xmV9v24e8qEnzuq1fqOuvMc+AkAQwIlkpAAX3BdDzNY jXcoj5V9+YRay73SJUgs/I6VqKgSA5ZBow== X-Google-Smtp-Source: AGHT+IFQ+879cPB96mB+qRdtO8ch3WDmQE2+Mg1lSxV1xg5CK21rYIIEy3ZAMMkigKWapWPYLD8hwA== X-Received: by 2002:a50:a40f:0:b0:553:ffea:d0a7 with SMTP id u15-20020a50a40f000000b00553ffead0a7mr2818729edb.32.1703432682196; Sun, 24 Dec 2023 07:44:42 -0800 (PST) Received: from [127.0.1.1] ([78.10.206.178]) by smtp.gmail.com with ESMTPSA id ge12-20020a170907908c00b00a26ac403032sm3325901ejb.65.2023.12.24.07.44.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 07:44:41 -0800 (PST) From: Krzysztof Kozlowski Date: Sun, 24 Dec 2023 16:44:09 +0100 Subject: [PATCH 10/15] media: s5p-mfc: constify struct structures MIME-Version: 1.0 Message-Id: <20231224-n-s5p-mfc-const-v1-10-a3b246470fe4@linaro.org> References: <20231224-n-s5p-mfc-const-v1-0-a3b246470fe4@linaro.org> In-Reply-To: <20231224-n-s5p-mfc-const-v1-0-a3b246470fe4@linaro.org> To: Marek Szyprowski , Andrzej Hajda , Mauro Carvalho Chehab Cc: Aakarsh Jain , linux-fsd@tesla.coma, linux-samsung-soc@vger.kernel.org, Smitha T Murthy , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3562; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=7eLA73/Lxy5Yo9MdLmPuVAn1gTKGvPSmfN1gvCYYUnY=; b=owEBfgKB/ZANAwAKAcE3ZuaGi4PXAcsmYgBliFHW4EG4R+SMVxMqgocTB7ioHMGzVI6kRjC2A uLDE5DR6naJAkQEAAEKAC4WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZYhR1hAca3J6a0BrZXJu ZWwub3JnAAoJEME3ZuaGi4PXOlQP/jKjDthPJX0wo8OYeoBSWUosWomRncDBw+86aGCEFofZ1uv 1o4QQyQxQDNhXp82RVFP+6Bebq92iZx1GWeBGrmSLM4j772K4qn68mcVUBDlO25PqggkuoH0Zem gLu6laqCpqTNqD66qzkwOEmk4MrnAwgD29uSun+qznKrLyijwBfTywZ7ikTqjkb0aIZ4KbbtgRL MiZgm7Vk1FqxutaINdUs/16wyHY+GaoXId0udkhxPioi/8rpoW8yvWdCS1klvubi+EXQQs0QfsF nnKKqfjotnW0bkHMHpocTpaYzPVEBYYP4LozUGW7xgxhbqHtCLlQf4T4z7E9X+qs+ePOy6UhScX /S6temNSp7roQXy2nfQKV4NLf3sWaJcA1NBIxvQdWDsD+GmCeLqTDFHRgsvxNKBfKeDVZaswMRZ +mj9Qr9vOf04wy01lhYzN8mKuo0fGRSiH5PEMcRHc1jRyKb8v78QgAiaOtSnA7KvYZbiE2VuzZh 4tDVKkPugU8AHrsqRuTzANXgzq0PORzQQtVs3R3+r74xjPabAzC77RhEfJD+x2KAp+0vm3of4sS e4bZtLNe5HQYg6fKxoX1mFjk8kJTuzpWX+h3qHxyxJGK4a+LWcTPzM0j2t2BwXkrarjsnTXRoc9 Yji5Ay6x7yReo2GZTm9ZQsiK0vc+1JdNTvq4m X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231224_074444_440533_6F076B97 X-CRM114-Status: GOOD ( 11.93 ) 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 Static "struct" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski --- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c | 4 ++-- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.h | 2 +- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 4 ++-- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c index 2f664c7e9e4c..eef26d4e02cf 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c @@ -1117,7 +1117,7 @@ static void s5p_mfc_buf_queue(struct vb2_buffer *vb) s5p_mfc_hw_call(dev->mfc_ops, try_run, dev); } -static struct vb2_ops s5p_mfc_dec_qops = { +static const struct vb2_ops s5p_mfc_dec_qops = { .queue_setup = s5p_mfc_queue_setup, .wait_prepare = vb2_ops_wait_prepare, .wait_finish = vb2_ops_wait_finish, @@ -1132,7 +1132,7 @@ const struct s5p_mfc_codec_ops *get_dec_codec_ops(void) return &decoder_codec_ops; } -struct vb2_ops *get_dec_queue_ops(void) +const struct vb2_ops *get_dec_queue_ops(void) { return &s5p_mfc_dec_qops; } diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.h b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.h index d4310966a0c2..47a6eb9a8fc0 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.h +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.h @@ -10,7 +10,7 @@ #define S5P_MFC_DEC_H_ const struct s5p_mfc_codec_ops *get_dec_codec_ops(void); -struct vb2_ops *get_dec_queue_ops(void); +const struct vb2_ops *get_dec_queue_ops(void); const struct v4l2_ioctl_ops *get_dec_v4l2_ioctl_ops(void); int s5p_mfc_dec_ctrls_setup(struct s5p_mfc_ctx *ctx); void s5p_mfc_dec_ctrls_delete(struct s5p_mfc_ctx *ctx); diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c index d6a4b9c701eb..537c6e603cd5 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c @@ -2594,7 +2594,7 @@ static void s5p_mfc_buf_queue(struct vb2_buffer *vb) s5p_mfc_hw_call(dev->mfc_ops, try_run, dev); } -static struct vb2_ops s5p_mfc_enc_qops = { +static const struct vb2_ops s5p_mfc_enc_qops = { .queue_setup = s5p_mfc_queue_setup, .wait_prepare = vb2_ops_wait_prepare, .wait_finish = vb2_ops_wait_finish, @@ -2610,7 +2610,7 @@ const struct s5p_mfc_codec_ops *get_enc_codec_ops(void) return &encoder_codec_ops; } -struct vb2_ops *get_enc_queue_ops(void) +const struct vb2_ops *get_enc_queue_ops(void) { return &s5p_mfc_enc_qops; } diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.h b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.h index 0cf08b8d40ff..62d6db67fd91 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.h +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.h @@ -10,7 +10,7 @@ #define S5P_MFC_ENC_H_ const struct s5p_mfc_codec_ops *get_enc_codec_ops(void); -struct vb2_ops *get_enc_queue_ops(void); +const struct vb2_ops *get_enc_queue_ops(void); const struct v4l2_ioctl_ops *get_enc_v4l2_ioctl_ops(void); int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx); void s5p_mfc_enc_ctrls_delete(struct s5p_mfc_ctx *ctx);