Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp858431rdb; Wed, 6 Dec 2023 01:46:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPK4h2IpnGN95VQyHmYHmjN2XxuXIAUHv/TuDGVLD2gc1P1ZBqUFuVxC4GSW/uG5VwKJfE X-Received: by 2002:a05:6808:1924:b0:3b8:b063:6ba0 with SMTP id bf36-20020a056808192400b003b8b0636ba0mr730525oib.79.1701855970339; Wed, 06 Dec 2023 01:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701855970; cv=none; d=google.com; s=arc-20160816; b=ZHRMZyc5L/21yWgdPBEda+AM6xqBZ3GFtc1H5VuTu/xjQaAACfOKLuLN89W8YvEuyd ir6Mfdj3p4ZNqqpE9T8D3ZljtUt3ocHuKrZd/o/qI2fSyhza4XSHd3G8C1xXKCHv/WWn YJMtxU3ZHZxJJ4FFCWj7NIpW746jVV0VjOhTP+cpSO0deUEjWdoPXvjsh0b/OM42LC4L DHlTVaDtpbLZP+p1zFf719VTo4JVEIGUm8GkS+GVAa/Fn9h9zPFKknKzTVyzyg6CuJ1G I/DSyMZWTBi8rv/klXaKIpVO4bQSUlyK6vEZ3TC3gd241VhVuiOP4mELuf3xgoPW2jY2 N11w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id; bh=bvk7OXVf5lc1NriDVxt5a0Bd7Mj24c76cxJDMgfzHIM=; fh=4bfq4JupAy3BlGL5GlAltfFW84hsq+1ayPo2NPz78Tc=; b=SCa49+0bP5mZ2ZFMTaJO79ust0aaU4x4AKs3ctxGEQqU4l2Z+kfed4A1+xcxfxTmN4 7md11zdawFk5mvpPHjUv9+UHqrWm6NDOLbiSavMLKjeIcpxNv/h8iaazLgcJTUdLyPNG ZwQczFZ0LlAZLewVTAFIQ6+sanTOkY6eJLSh8vW88vGh6Hxd5+JOTKsYCugoSnNVD6vO QF2I16YSo6MMKqN0YE+dfT+/s6CvrmTMZVleEhxl5CtEXNw9Pl9sqkS5hoo4UmCWvRtb 9HLwv99KiZtIWVFCs6bJSI+EhN8mL2zc6uPRYmNZnlZZ1pCVlK872jTIGLog2M3++Nzq zlRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id h20-20020a056a00231400b006cbf1bb0b34si389572pfh.323.2023.12.06.01.46.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 01:46:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F0D508083AD9; Wed, 6 Dec 2023 01:46:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377252AbjLFJpn (ORCPT + 99 others); Wed, 6 Dec 2023 04:45:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377256AbjLFJpi (ORCPT ); Wed, 6 Dec 2023 04:45:38 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4069DD1 for ; Wed, 6 Dec 2023 01:45:44 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8F1FC433C8; Wed, 6 Dec 2023 09:45:42 +0000 (UTC) Message-ID: <8b293736-972c-48ce-9b13-6b003dafb62e@xs4all.nl> Date: Wed, 6 Dec 2023 10:45:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/4] media: visl,vidtv: Set parameters permissions to 0444 Content-Language: en-US, nl To: Detlev Casanova , linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org, Daniel Almeida , Mauro Carvalho Chehab References: <20231123200451.148097-1-detlev.casanova@collabora.com> <20231123200451.148097-2-detlev.casanova@collabora.com> From: Hans Verkuil Autocrypt: addr=hverkuil@xs4all.nl; keydata= xsFNBFQ84W0BEAC7EF1iL4s3tY8cRTVkJT/297h0Hz0ypA+ByVM4CdU9sN6ua/YoFlr9k0K4 BFUlg7JzJoUuRbKxkYb8mmqOe722j7N3HO8+ofnio5cAP5W0WwDpM0kM84BeHU0aPSTsWiGR yw55SOK2JBSq7hueotWLfJLobMWhQii0Zd83hGT9SIt9uHaHjgwmtTH7MSTIiaY6N14nw2Ud C6Uykc1va0Wqqc2ov5ihgk/2k2SKa02ookQI3e79laOrbZl5BOXNKR9LguuOZdX4XYR3Zi6/ BsJ7pVCK9xkiVf8svlEl94IHb+sa1KrlgGv3fn5xgzDw8Z222TfFceDL/2EzUyTdWc4GaPMC E/c1B4UOle6ZHg02+I8tZicjzj5+yffv1lB5A1btG+AmoZrgf0X2O1B96fqgHx8w9PIpVERN YsmkfxvhfP3MO3oHh8UY1OLKdlKamMneCLk2up1Zlli347KMjHAVjBAiy8qOguKF9k7HOjif JCLYTkggrRiEiE1xg4tblBNj8WGyKH+u/hwwwBqCd/Px2HvhAsJQ7DwuuB3vBAp845BJYUU3 06kR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YkAuCBqaF7Zgfw8xkad KEiQTexRbM1sc/I8ACpla3N26SfQwrfg6V7TIoweP0RwDrcf5PVvwSWsRQp2LxFCkwnCXOra gYmkrmv0duG1FStpY+IIQn1TOkuXrciTVfZY1cZD0aVxwlxXBnUNZZNslldvXFtndxR0SFat sflovhDxKyhFwXOP0Rv8H378/+14TaykknRBIKEc0+lcr+EMOSUR5eg4aURb8Gc3Uc7fgQ6q UssTXzHPyj1hAyDpfu8DzAwlh4kKFTodxSsKAjI45SLjadSc94/5Gy8645Y1KgBzBPTH7Q== In-Reply-To: <20231123200451.148097-2-detlev.casanova@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 01:46:05 -0800 (PST) On 23/11/2023 20:57, Detlev Casanova wrote: > 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. You missed a few more: $ git grep "module_param.*, 0)" drivers/media/test-drivers/ drivers/media/test-drivers/vidtv/vidtv_bridge.c:module_param_array(vidtv_valid_dvb_t_freqs, uint, NULL, 0); drivers/media/test-drivers/vidtv/vidtv_bridge.c:module_param_array(vidtv_valid_dvb_c_freqs, uint, NULL, 0); drivers/media/test-drivers/vidtv/vidtv_bridge.c:module_param_array(vidtv_valid_dvb_s_freqs, uint, NULL, 0); Regards, Hans > > Reviewed-by: Daniel Almeida > Signed-off-by: Detlev Casanova > --- > .../media/test-drivers/vidtv/vidtv_bridge.c | 20 +++++++++---------- > drivers/media/test-drivers/visl/visl-core.c | 10 +++++----- > 2 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c > index 8b04e12af286..5dd7b1b4f7f1 100644 > --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c > +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c > @@ -45,21 +45,21 @@ > #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] = { > @@ -86,7 +86,7 @@ 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 9970dc739ca5..ef89eead6671 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"); >