All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shravan Kumar Ramani <shravankr@nvidia.com>
To: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
	Vadim Pasternak <vadimp@nvidia.com>,
	David Thompson <davthompson@nvidia.com>
Cc: Shravan Kumar Ramani <shravankr@nvidia.com>,
	<platform-driver-x86@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH v4 0/2] Fixes to mlxbf-pmc
Date: Wed, 2 Jul 2025 06:09:00 -0400	[thread overview]
Message-ID: <cover.1751380187.git.shravankr@nvidia.com> (raw)

This submission contains 2 patches:

Patch 1 fixes an issue with matching an input event_name string with the
list of supported events in the event_list due to the trailing newline char.

Patch 2 adds checks to validate the input for event and enable fields, and
prevents the user from writing invalid values to these fields.

v1 -> v2
Split single patch into 2 patches addressing each fix separately

v2 -> v3
Patch 1: Remove the trailing newline character before comparing strings
Patch 2: Use kstrtobool() instead of kstrtouint() which would validate the input

v3 -> v4
Patch 1: Use kstrdup_and_replace() to remove the newline char.

Shravan Kumar Ramani (2):
  platform/mellanox: mlxbf-pmc: Remove newline char from event name
    input
  platform/mellanox: mlxbf-pmc: Validate event/enable input

 drivers/platform/mellanox/mlxbf-pmc.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

-- 
2.43.2


             reply	other threads:[~2025-07-02 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 10:09 Shravan Kumar Ramani [this message]
2025-07-02 10:09 ` [PATCH v4 1/2] platform/mellanox: mlxbf-pmc: Remove newline char from event name input Shravan Kumar Ramani
2025-07-02 10:09 ` [PATCH v4 2/2] platform/mellanox: mlxbf-pmc: Validate event/enable input Shravan Kumar Ramani
2025-07-07 12:59   ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1751380187.git.shravankr@nvidia.com \
    --to=shravankr@nvidia.com \
    --cc=davthompson@nvidia.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=vadimp@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.