Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1271647imd; Sat, 27 Oct 2018 05:53:08 -0700 (PDT) X-Google-Smtp-Source: AJdET5dQbHM9TDb3RicPyMo5Pt3VpW1wRTaBpWDuSQquXOIJQ+07Ky7/M9p3I6tLIeND3mQpixlX X-Received: by 2002:a63:9845:: with SMTP id l5mr7094761pgo.142.1540644788173; Sat, 27 Oct 2018 05:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540644788; cv=none; d=google.com; s=arc-20160816; b=qyc+DckDRND/T7dp8BFZQ8eKFlBBo+1DQPDV+Vq9YjnNRW57kCPHqg03hcvG411hJt vjk038o2pkTwmiLvMUC+C48nxtjLn01QjwA7O0UvkB8Mg1Ij31yKtKEzIpqA8pKxX7u2 tEdH5+/57cuhTAAGNXYt4DKKLGzZxGqp9S1K1wGF3Pm/JPCRZqHAbNP5scvzERmZI65B bBJHYSs/dFD4OGeDDKflGIAM5A3R55pJ8bmCqx4CClyeDisf2F+fpLsENzgiDFZwoV7w GeReIe9eSfZB/2yNwrnTZsoEJoAhfgyi1Kd1x1R8bW3fptPvygBgI6FB0MT3tBroIy/w f+2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=IkwRX6I+Fy/luCRjNaxX9Ld7NAmUNAW5ILZvCbQEr7M=; b=Lh7BOxKPZ+vnib2acS8DfTx/hktHmHFxXshZFJPWKnQPh5nzrzrHXXfV9i9IGkzReV 8YyTOj5PcQH4Xsyk82Y+yWAxfOpYvo4U70y0TJKE2DClzd8qNd5ZJ/yY6RTLu2H+UoWx 4mgke0LHUDQtlDY0yZ5J62ohfbDGEuPpF85qVnrkz/FEh4lx9OC2VujBXEq6ZPM5QUfn 3l19qIc+1PcsbP840BybES3u3ln5rt6odXMOQi6a1wQ5kE96JBpdIa5eAJ7JK64QQe92 ztSZEKi3LTlMpFN/R+AVNSEa0gjWOp+9eyZIuZrMSJEPCPjyhS1ntFJeDJXYEtoRvuwi gQ9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d131-v6si14959539pga.37.2018.10.27.05.52.52; Sat, 27 Oct 2018 05:53:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728631AbeJ0Vcx (ORCPT + 99 others); Sat, 27 Oct 2018 17:32:53 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:63977 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728608AbeJ0Vcw (ORCPT ); Sat, 27 Oct 2018 17:32:52 -0400 X-IronPort-AV: E=Sophos;i="5.54,432,1534802400"; d="scan'208";a="283509232" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 27 Oct 2018 14:51:56 +0200 From: Julia Lawall To: Hans Verkuil Cc: kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] media: vicodec: constify v4l2_ctrl_ops structure Date: Sat, 27 Oct 2018 14:16:39 +0200 Message-Id: <1540642600-25840-2-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1540642600-25840-1-git-send-email-Julia.Lawall@lip6.fr> References: <1540642600-25840-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The v4l2_ctrl_ops structure is only stored in the ops field of a v4l2_ctrl_config structure, and this field is const, or passed as the second argument of v4l2_ctrl_new_std, and the corresponding parameter is declared as const. Accordingly, the structure can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/platform/vicodec/vicodec-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -u -p a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c --- a/drivers/media/platform/vicodec/vicodec-core.c +++ b/drivers/media/platform/vicodec/vicodec-core.c @@ -1108,7 +1108,7 @@ static int vicodec_s_ctrl(struct v4l2_ct return -EINVAL; } -static struct v4l2_ctrl_ops vicodec_ctrl_ops = { +static const struct v4l2_ctrl_ops vicodec_ctrl_ops = { .s_ctrl = vicodec_s_ctrl, };