]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
eth: fbnic: make fbnic_fw_log_write() parameter const
authorJakub Kicinski <kuba@kernel.org>
Tue, 16 Sep 2025 23:14:12 +0000 (16:14 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 18 Sep 2025 09:37:23 +0000 (11:37 +0200)
Make the log message parameter const, it's not modified
and this lets us pass in strings which are const for the caller.

Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250916231420.1693955-2-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/meta/fbnic/fbnic_fw_log.c
drivers/net/ethernet/meta/fbnic/fbnic_fw_log.h

index c1663f0422453e50ff6cfbfbed9e72528be3b431..85a883dba385fe9e371de5b90a2c6265d38b0a6c 100644 (file)
@@ -72,7 +72,7 @@ void fbnic_fw_log_free(struct fbnic_dev *fbd)
 }
 
 int fbnic_fw_log_write(struct fbnic_dev *fbd, u64 index, u32 timestamp,
-                      char *msg)
+                      const char *msg)
 {
        struct fbnic_fw_log_entry *entry, *head, *tail, *next;
        struct fbnic_fw_log *log = &fbd->fw_log;
index cb6555f40a24084a227e4cc3d602a0620984beff..50ec79003108ae2aba6040512c99fb29a7217337 100644 (file)
@@ -41,5 +41,5 @@ void fbnic_fw_log_disable(struct fbnic_dev *fbd);
 int fbnic_fw_log_init(struct fbnic_dev *fbd);
 void fbnic_fw_log_free(struct fbnic_dev *fbd);
 int fbnic_fw_log_write(struct fbnic_dev *fbd, u64 index, u32 timestamp,
-                      char *msg);
+                      const char *msg);
 #endif /* _FBNIC_FW_LOG_H_ */