This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new ec8573f1a Revert "shell: Fix LINK_TABLE start pointer alignment in 
shell module tables"
ec8573f1a is described below

commit ec8573f1aff0ee1939492878772e69d3772acab9
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Mon Aug 10 19:45:02 2026 +0200

    Revert "shell: Fix LINK_TABLE start pointer alignment in shell module 
tables"
    
    This reverts commit:
    1431593f7a2c46c71edd9d3b4e4d11db7ee037bb.
---
 sys/shell/src/shell.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/sys/shell/src/shell.c b/sys/shell/src/shell.c
index 21db74baa..476b58669 100644
--- a/sys/shell/src/shell.c
+++ b/sys/shell/src/shell.c
@@ -31,30 +31,19 @@
 
 #define SHELL_PROMPT "shell"
 
-static const struct shell_cmd *
-shell_mod_std_commands(const struct shell_mod_std *std_mod)
-{
-    uintptr_t addr = (uintptr_t)std_mod->commands;
-    uintptr_t aligned = (addr + sizeof(struct shell_cmd) - 1) &
-                        ~(uintptr_t)(sizeof(struct shell_cmd) - 1);
-
-    return (const struct shell_cmd *)aligned;
-}
-
 static size_t
 shell_mod_std_count(shell_mod_t mod)
 {
     const struct shell_mod_std *std_mod = (const struct shell_mod_std *)mod;
-    return std_mod->commands_end - shell_mod_std_commands(std_mod);
+    return std_mod->commands_end - std_mod->commands;
 }
 
 static shell_cmd_t
 shell_mod_std_get(shell_mod_t mod, size_t ix)
 {
     const struct shell_mod_std *std_mod = (const struct shell_mod_std *)mod;
-    const struct shell_cmd *commands = shell_mod_std_commands(std_mod);
-    size_t limit = std_mod->commands_end - commands;
-    return ix < limit ? &commands[ix] : NULL;
+    size_t limit = std_mod->commands_end - std_mod->commands;
+    return ix < limit ? &std_mod->commands[ix] : NULL;
 }
 
 const struct shell_mod_ops shell_mod_std_ops = {

Reply via email to