Re: [PATCH v1 2/2] usb: typec: tcpm: Add module parameter to wrap around logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 17, 2021 at 04:36:09PM -0700, Badhri Jagan Sridharan wrote:
> When the buffer is full, TCPM stops logging into the buffer.
> This change adds log_wraparound module parameter which when set
> flushes out the oldest log entries (FIFO) to make way for the
> newer ones.
> 
> Signed-off-by: Badhri Jagan Sridharan <badhri@xxxxxxxxxx>
> ---
>  drivers/usb/typec/tcpm/tcpm.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index b79194919b27..a369decade60 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -38,6 +38,10 @@ static bool modparam_log_misc_dev;
>  module_param_named(log_misc_dev, modparam_log_misc_dev, bool, 0444);
>  MODULE_PARM_DESC(log_misc_dev, "Expose tcpm logs through misc device");
>  
> +static bool modparam_log_wraparound;
> +module_param_named(log_wraparound, modparam_log_wraparound, bool, 0444);
> +MODULE_PARM_DESC(log_wraparound, "Wrap around logs");

Again, no, this we know better than to add new module parameters, this
is not ok.

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux