diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp
index c9668bf8a8f..f0797d65381 100644
--- a/Marlin/src/sd/cardreader.cpp
+++ b/Marlin/src/sd/cardreader.cpp
@@ -722,10 +722,10 @@ void CardReader::report_status() {
     SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
 }
 
-void CardReader::write_command(const char * const buf) {
-  char *begin = buf;
-  char *npos = nullptr;
-  char *end = buf + strlen(buf) - 1;
+void CardReader::write_command(char * const buf) {
+  char *begin = buf,
+       *npos = nullptr,
+       *end = buf + strlen(buf) - 1;
 
   file.writeError = false;
   if ((npos = strchr(buf, 'N'))) {
diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h
index cf876ce9c77..482fb1c5ccf 100644
--- a/Marlin/src/sd/cardreader.h
+++ b/Marlin/src/sd/cardreader.h
@@ -92,7 +92,7 @@ public:
 
   // SD Card Logging
   static void openLogFile(const char * const path);
-  static void write_command(const char * const buf);
+  static void write_command(char * const buf);
 
   #if DISABLED(NO_SD_AUTOSTART)     // Auto-Start auto#.g file handling
     static uint8_t autofile_index;  // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.