Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6805980rdb; Fri, 15 Dec 2023 08:46:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqcD2HvolvMSEg2JYrIrmwtO6Ta+LMmfed/3Cvge57q1zNbQbU0wPQCSUk8P/t0BgEoE4J X-Received: by 2002:a17:906:c3:b0:a1f:830a:b621 with SMTP id 3-20020a17090600c300b00a1f830ab621mr5965697eji.109.1702658779732; Fri, 15 Dec 2023 08:46:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702658779; cv=none; d=google.com; s=arc-20160816; b=AQee0Z/SJCkKcpWWMdX6RxvSfuFkLIdTxUJ2hJh+0zyqfX4XisgXOTiFfS9Mbh6X0E dAqCitbax3adXHc5+QNgfcYiGn4r28J9XLmQZTCGvQ79zzqRWtwagNBGcMlvn2iyBsGm lUMM04a0uUNUD0a4jytOBvK3ON5M32KYJOjSj1LsWuFgdALm2SXWvnBZc1pBJdWPSvQ0 wLFeRO5aP79sS7XGF5+1mFLruUFpcqDy5c1eJldukkDIq7+LJscfCeugKkAD5eJ1HNdD ow1BjxPt5V8nVtj9/vgcJPVxUbNs3kNPF1sgmKrXTqma5VggY9IJUWskVYp2X7VkIWKy YLjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LFqACS0dULw5mELBRW8t+DiGvN8LCJ2LNH84NwVfKXQ=; fh=bEUUkxCtcWAoM+0QUmhtNDixjAfHmPTjnsrsFCDjYhU=; b=rU+zIMWq8Vvs1ue955i44CJGpI9xCDshNc9aHSvbRiCHNQmQAT7FGKQG3K+NQgATCD 4KbvoScdfSYqJZ5RMEKv0QDcNwRovGxh1q9Yx73aif0Sb3POeXHlDWWroRG7wEtMd7Tt Qp/ujbm5OCRg+SgY0BARRclkJVTkSka2HDR1dnPZdg9RKVQn62glkQwjFvoltiwtwPAc w32HTX48KxvE2JTNyB3m07wcZkPQpCrQ63R00XqTsri4Gwp8LJsWsCmXdxo0Y1X1jnyq UbrgmpynKSaYAZRwnQkbI6GtKdSMt4dkspjKP7qJ2gC4lBzM2uZ7JjCvfPnDvOOQ3ZRt kmjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=5OVSVWmE; spf=pass (google.com: domain of linux-kernel+bounces-1324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id xa10-20020a170907b9ca00b00a1e1a1dd316si7517685ejc.570.2023.12.15.08.46.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 08:46:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1324-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=@collabora.com header.s=mail header.b=5OVSVWmE; spf=pass (google.com: domain of linux-kernel+bounces-1324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 56E411F23D45 for ; Fri, 15 Dec 2023 16:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D14041862; Fri, 15 Dec 2023 16:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="5OVSVWmE" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EF513FB10; Fri, 15 Dec 2023 16:44:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702658691; bh=cD6t1rxsgYGFHEkBDR2c5LoiqA0V064keU5mnwqyNG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=5OVSVWmErwG68J8XGHhC8ce9nUwI3D7oeThtnEafA4vf92gH/zYZNspuTtLISmpe1 GYYeu6DlJMnDQ3RSHB5MX6H8OdEbS48Nv9NdxUaHkN0NeKr0ok2ls2SI/NZSyn2zK4 G+WCDOkHMk35bkzkGgtOVjE4kmNVIjENiWMJid9bJ3h5VYgSN+D5SEPae5cNkRvGks N2+bFjwwaFNX7d0vrc+zZP1r3f7E+qBNIATnJDBXJ4gTGSyWtc6eNQXJoptlk1vZTi 2tAyiz0JnI/aTm6Ux4tvEFavqOngpy2BAXmFGQZSV2XQclyLF/NKx37qvIdFJ/GlU0 3a8Xtx+KfZU3A== Received: from arisu.mtl.collabora.ca (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 531FB3781FE3; Fri, 15 Dec 2023 16:44:50 +0000 (UTC) From: Detlev Casanova To: linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org, Daniel Almeida , Mauro Carvalho Chehab , Hans Verkuil , Detlev Casanova Subject: [PATCH v4 1/4] media: visl,vidtv: Set parameters permissions to 0444 Date: Fri, 15 Dec 2023 11:42:55 -0500 Message-ID: <20231215164447.743787-2-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231215164447.743787-1-detlev.casanova@collabora.com> References: <20231215164447.743787-1-detlev.casanova@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This avoids confusion with default values and lets userspace programs get the modules parameters values at run time. This can be useful when setting up a test suite. Reviewed-by: Daniel Almeida Signed-off-by: Detlev Casanova --- .../media/test-drivers/vidtv/vidtv_bridge.c | 26 +++++++++---------- drivers/media/test-drivers/visl/visl-core.c | 10 +++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index 8b04e12af286..613949df897d 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -45,28 +45,28 @@ #define LNB_HIGH_FREQ 10600000 /* transition frequency */ static unsigned int drop_tslock_prob_on_low_snr; -module_param(drop_tslock_prob_on_low_snr, uint, 0); +module_param(drop_tslock_prob_on_low_snr, uint, 0444); MODULE_PARM_DESC(drop_tslock_prob_on_low_snr, "Probability of losing the TS lock if the signal quality is bad"); static unsigned int recover_tslock_prob_on_good_snr; -module_param(recover_tslock_prob_on_good_snr, uint, 0); +module_param(recover_tslock_prob_on_good_snr, uint, 0444); MODULE_PARM_DESC(recover_tslock_prob_on_good_snr, "Probability recovering the TS lock when the signal improves"); static unsigned int mock_power_up_delay_msec; -module_param(mock_power_up_delay_msec, uint, 0); +module_param(mock_power_up_delay_msec, uint, 0444); MODULE_PARM_DESC(mock_power_up_delay_msec, "Simulate a power up delay"); static unsigned int mock_tune_delay_msec; -module_param(mock_tune_delay_msec, uint, 0); +module_param(mock_tune_delay_msec, uint, 0444); MODULE_PARM_DESC(mock_tune_delay_msec, "Simulate a tune delay"); static unsigned int vidtv_valid_dvb_t_freqs[NUM_VALID_TUNER_FREQS] = { 474000000 }; -module_param_array(vidtv_valid_dvb_t_freqs, uint, NULL, 0); +module_param_array(vidtv_valid_dvb_t_freqs, uint, NULL, 0444); MODULE_PARM_DESC(vidtv_valid_dvb_t_freqs, "Valid DVB-T frequencies to simulate, in Hz"); @@ -74,19 +74,19 @@ static unsigned int vidtv_valid_dvb_c_freqs[NUM_VALID_TUNER_FREQS] = { 474000000 }; -module_param_array(vidtv_valid_dvb_c_freqs, uint, NULL, 0); +module_param_array(vidtv_valid_dvb_c_freqs, uint, NULL, 0444); MODULE_PARM_DESC(vidtv_valid_dvb_c_freqs, "Valid DVB-C frequencies to simulate, in Hz"); static unsigned int vidtv_valid_dvb_s_freqs[NUM_VALID_TUNER_FREQS] = { 11362000 }; -module_param_array(vidtv_valid_dvb_s_freqs, uint, NULL, 0); +module_param_array(vidtv_valid_dvb_s_freqs, uint, NULL, 0444); MODULE_PARM_DESC(vidtv_valid_dvb_s_freqs, "Valid DVB-S/S2 frequencies to simulate at Ku-Band, in kHz"); static unsigned int max_frequency_shift_hz; -module_param(max_frequency_shift_hz, uint, 0); +module_param(max_frequency_shift_hz, uint, 0444); MODULE_PARM_DESC(max_frequency_shift_hz, "Maximum shift in HZ allowed when tuning in a channel"); @@ -96,24 +96,24 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nums); * Influences the signal acquisition time. See ISO/IEC 13818-1 : 2000. p. 113. */ static unsigned int si_period_msec = 40; -module_param(si_period_msec, uint, 0); +module_param(si_period_msec, uint, 0444); MODULE_PARM_DESC(si_period_msec, "How often to send SI packets. Default: 40ms"); static unsigned int pcr_period_msec = 40; -module_param(pcr_period_msec, uint, 0); +module_param(pcr_period_msec, uint, 0444); MODULE_PARM_DESC(pcr_period_msec, "How often to send PCR packets. Default: 40ms"); static unsigned int mux_rate_kbytes_sec = 4096; -module_param(mux_rate_kbytes_sec, uint, 0); +module_param(mux_rate_kbytes_sec, uint, 0444); MODULE_PARM_DESC(mux_rate_kbytes_sec, "Mux rate: will pad stream if below"); static unsigned int pcr_pid = 0x200; -module_param(pcr_pid, uint, 0); +module_param(pcr_pid, uint, 0444); MODULE_PARM_DESC(pcr_pid, "PCR PID for all channels: defaults to 0x200"); static unsigned int mux_buf_sz_pkts; -module_param(mux_buf_sz_pkts, uint, 0); +module_param(mux_buf_sz_pkts, uint, 0444); MODULE_PARM_DESC(mux_buf_sz_pkts, "Size for the internal mux buffer in multiples of 188 bytes"); diff --git a/drivers/media/test-drivers/visl/visl-core.c b/drivers/media/test-drivers/visl/visl-core.c index 68dac896277b..12e93a7798d1 100644 --- a/drivers/media/test-drivers/visl/visl-core.c +++ b/drivers/media/test-drivers/visl/visl-core.c @@ -64,27 +64,27 @@ MODULE_PARM_DESC(visl_transtime_ms, " simulated process time in milliseconds."); * particular number of frames */ int visl_dprintk_frame_start = -1; -module_param(visl_dprintk_frame_start, int, 0); +module_param(visl_dprintk_frame_start, int, 0444); MODULE_PARM_DESC(visl_dprintk_frame_start, " a frame number to start tracing with dprintk"); unsigned int visl_dprintk_nframes; -module_param(visl_dprintk_nframes, uint, 0); +module_param(visl_dprintk_nframes, uint, 0444); MODULE_PARM_DESC(visl_dprintk_nframes, " the number of frames to trace with dprintk"); bool keep_bitstream_buffers; -module_param(keep_bitstream_buffers, bool, false); +module_param(keep_bitstream_buffers, bool, 0444); MODULE_PARM_DESC(keep_bitstream_buffers, " keep bitstream buffers in debugfs after streaming is stopped"); int bitstream_trace_frame_start = -1; -module_param(bitstream_trace_frame_start, int, 0); +module_param(bitstream_trace_frame_start, int, 0444); MODULE_PARM_DESC(bitstream_trace_frame_start, " a frame number to start dumping the bitstream through debugfs"); unsigned int bitstream_trace_nframes; -module_param(bitstream_trace_nframes, uint, 0); +module_param(bitstream_trace_nframes, uint, 0444); MODULE_PARM_DESC(bitstream_trace_nframes, " the number of frames to dump the bitstream through debugfs"); -- 2.41.0