Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1675530pxj; Wed, 19 May 2021 11:12:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzwdjIkJLYkH0tD2UwVvTdC1ya5Owh1H1+hgD1XLFLO73pvNlay6EPzRMzACd7ko28ABUV X-Received: by 2002:a17:906:36d1:: with SMTP id b17mr416227ejc.235.1621447925574; Wed, 19 May 2021 11:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621447925; cv=none; d=google.com; s=arc-20160816; b=SH/mTgImzeLbTr6kPQB3ZfD6QNG90XuHwmvWtn+zag2FsqZcc+j75CcmD78JsoEu3x JgFbZGNgpR24EhCobtvu+mFYav0UNRypfvnp8P7bh0S6z8CaRxypeVDWmwG6nfwyFRuR Jsgaolx8SrYNT6kt6auo+gm37aY1aynFAQzNXXj6BqZH3lqpYmiWgh0Hc7Me9tJX49bQ pRuB8Hrz9Ip2M2cg5tmxEFLSbC2fYzvKLbOWDd0Rm//OMq3uEu2ZubT99jg8dAavxnkw 0KXEgdcbFFARihxbSfNXJMpQCQ/H7P2yypuEDZiNWTtyGveqMPVcmeAIjZ+QVh1cDoO2 gqoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Vc8xk1pk8K/m1kpO3U2SjcOnY/BRPPkT9Uu+PAXUsAo=; b=rY3RiaUBBGg5/83bn5UQWAap/2foLQsq/hpLYwG58XMj0QeLJ2YDdU9s/de1AlAUpS 3LZsd07HoIYUZqGiqw3RnjD/ZhJEZoeBGPQJtUpXdoBp2MSqXMkDdp0OAkQ6ZbsehO/3 vvJUlr/n6nGuuPDaf+4AUisbYkdwhP1k+UVfWdbZjtgSXLTPmnnHSsTt/67mG+EyBAKc MZQRQ32sAnTYBS5KM3dKrQr/XaAJdsmKM9Jj36PbVkMNnpmGRoYhqrYqeMynrbpLixDn awVvzJijPvKTZ1kbsHxKl8rNJJMg9eB9HBFTLpmdEy0a2sPWAyyVZwBC34p+TO+qWCQD N6JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="r24mnIC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si22575826edn.564.2021.05.19.11.11.41; Wed, 19 May 2021 11:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="r24mnIC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349643AbhERNcs (ORCPT + 99 others); Tue, 18 May 2021 09:32:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:41450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238635AbhERNcs (ORCPT ); Tue, 18 May 2021 09:32:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94B75610A1; Tue, 18 May 2021 13:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621344690; bh=AQcXbOCQe8U95i8kgKYGNsDmCjZ26eRzhWl2krTizEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r24mnIC/fCRj3RU/MduMgLjB0Yy1ABWNeBIb/VrlLClFsaLRsnICuExoYNB9/mabC rt6gM1h4Ipx6ozOM6DRNvFwyntmU2iOe4NU7eQk862vNnE+frpsTOl+vowMnjDCqt8 lU4aKmeYmXQNF4u5Gb9lquLxCW0NgnoDgJTYIwhY= Date: Tue, 18 May 2021 15:31:28 +0200 From: Greg Kroah-Hartman To: Badhri Jagan Sridharan Cc: Guenter Roeck , Heikki Krogerus , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kyle Tso Subject: Re: [PATCH v1 2/2] usb: typec: tcpm: Add module parameter to wrap around logs Message-ID: References: <20210517233609.610248-1-badhri@google.com> <20210517233609.610248-2-badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210517233609.610248-2-badhri@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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