mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fixes to mlxbf-pmc
@ 2025-06-30 13:26 Shravan Kumar Ramani
  2025-06-30 13:26 ` [PATCH v3 1/2] platform/mellanox: mlxbf-pmc: Remove newline char from event name input Shravan Kumar Ramani
  2025-06-30 13:26 ` [PATCH v3 2/2] platform/mellanox: mlxbf-pmc: Validate event/enable input Shravan Kumar Ramani
  0 siblings, 2 replies; 4+ messages in thread
From: Shravan Kumar Ramani @ 2025-06-30 13:26 UTC (permalink / raw)
  To: Ilpo Jarvinen, Vadim Pasternak, David Thompson
  Cc: Shravan Kumar Ramani, platform-driver-x86, linux-kernel

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

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 | 28 ++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-30 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-30 13:26 [PATCH v3 0/2] Fixes to mlxbf-pmc Shravan Kumar Ramani
2025-06-30 13:26 ` [PATCH v3 1/2] platform/mellanox: mlxbf-pmc: Remove newline char from event name input Shravan Kumar Ramani
2025-06-30 13:44   ` Ilpo Järvinen
2025-06-30 13:26 ` [PATCH v3 2/2] platform/mellanox: mlxbf-pmc: Validate event/enable input Shravan Kumar Ramani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®