]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
Replace env_strncmp() wisth strncmp()
authorWendy Liang <jliang@xilinx.com>
Wed, 1 Jun 2016 00:19:41 +0000 (17:19 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:42 +0000 (22:01 -0700)
Replace env_strncmp() with standard C function strncmp().

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/common/firmware.c
lib/remoteproc/elf_loader.c
lib/rpmsg/remote_device.c

index 0c0fb21cc88d1a3ffd6109cc240f3754a4ccd98e..d296992a63546b47c95209ca76aaa5652e4a5204 100644 (file)
@@ -41,6 +41,7 @@
  *
  **************************************************************************/
 
+#include <string.h>
 #include "openamp/firmware.h"
 
 /* Start and end addresses of firmware image for remotes. These are defined in the
@@ -88,8 +89,7 @@ int config_get_firmware(char *fw_name, unsigned int *start_addr,
        unsigned int idx;
        for (idx = 0; idx < sizeof(fw_table) / (sizeof(struct firmware_info));
             idx++) {
-               if (!env_strncmp((char *)fw_table[idx].name, fw_name,
-                                sizeof(fw_table[idx].name))) {
+               if (!strncmp((char *)fw_table[idx].name, fw_name, sizeof(fw_table[idx].name))) {
                        *start_addr = fw_table[idx].start_addr;
                        *size =
                            fw_table[idx].end_addr - fw_table[idx].start_addr +
index 7d74475354455850c531f7c038dba911195fa2c5..6d2de10bc7b679766cd6521105e8aac8ae3477ba 100644 (file)
@@ -298,16 +298,13 @@ static int elf_loader_get_needed_sections(struct elf_decode_info *elf_info)
                                        current_name++;
 
                                        /* Check for '.dynsym'. */
-                                       if (env_strncmp
-                                           (current_name, "ynsym", 5) == 0) {
+                                       if (strncmp(current_name, "ynsym", 5) == 0) {
                                                elf_info->dynsym = current;
                                                sections_to_find--;
                                        }
 
                                        /* Check for '.dynstr'. */
-                                       else if (env_strncmp
-                                                (current_name, "ynstr",
-                                                 5) == 0) {
+                                       else if (strncmp(current_name, "ynstr", 5) == 0) {
                                                elf_info->dynstr = current;
                                                sections_to_find--;
                                        }
@@ -318,24 +315,19 @@ static int elf_loader_get_needed_sections(struct elf_decode_info *elf_info)
                                        current_name++;
 
                                        /* Check for '.rel.plt'. */
-                                       if (env_strncmp
-                                           (current_name, "el.plt", 6) == 0) {
+                                       if (strncmp(current_name, "el.plt", 6) == 0) {
                                                elf_info->rel_plt = current;
                                                sections_to_find--;
                                        }
 
                                        /* Check for '.rel.dyn'. */
-                                       else if (env_strncmp
-                                                (current_name, "el.dyn",
-                                                 6) == 0) {
+                                       else if (strncmp(current_name, "el.dyn", 6) == 0) {
                                                elf_info->rel_dyn = current;
                                                sections_to_find--;
                                        }
 
                                        /* Check for '.resource_table'. */
-                                       else if (env_strncmp
-                                                (current_name, "esource_table",
-                                                 13)
+                                       else if (strncmp(current_name, "esource_table", 13)
                                                 == 0) {
                                                elf_info->rsc = current;
                                                sections_to_find--;
index 5d27df731c4ecdd6b8d4b30299a3fbc10cf05fdb..5152b19a97c4de6b70fd8899fe887c919225beab 100644 (file)
@@ -249,8 +249,7 @@ struct llist *rpmsg_rdev_get_chnl_node_from_id(struct remote_device *rdev,
 
        while (rp_chnl_head) {
                rp_chnl = (struct rpmsg_channel *)rp_chnl_head->data;
-               if (env_strncmp
-                   (rp_chnl->name, rp_chnl_id, sizeof(rp_chnl->name))
+               if (strncmp(rp_chnl->name, rp_chnl_id, sizeof(rp_chnl->name))
                    == 0) {
                        return rp_chnl_head;
                }