fastboot: Use const qualifier for char *part_name
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 13 Jun 2019 18:11:07 +0000 (21:11 +0300)
committerMarek Vasut <marex@denx.de>
Fri, 14 Jun 2019 10:39:54 +0000 (12:39 +0200)
In fastboot_*_get_part_info() functions we can use stronger typing by
expecting const strings.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
drivers/fastboot/fb_mmc.c
drivers/fastboot/fb_nand.c
include/fb_mmc.h
include/fb_nand.h

index 90ca81da9b5f338f09a27873fb142d142a07933e..0a335db3a6152b5b7a764ba4820a4b3d4ff26379 100644 (file)
@@ -298,7 +298,8 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
  * @part_info: Pointer to returned disk_partition_t
  * @response: Pointer to fastboot response buffer
  */
-int fastboot_mmc_get_part_info(char *part_name, struct blk_desc **dev_desc,
+int fastboot_mmc_get_part_info(const char *part_name,
+                              struct blk_desc **dev_desc,
                               disk_partition_t *part_info, char *response)
 {
        int r;
index 526bc12307f8a071b9a66ad8b28b008dcda2d29e..6756ea769f3532e80e924b4ddf07d2beee5a319c 100644 (file)
@@ -152,8 +152,8 @@ static lbaint_t fb_nand_sparse_reserve(struct sparse_storage *info,
  * @part_info: Pointer to returned part_info pointer
  * @response: Pointer to fastboot response buffer
  */
-int fastboot_nand_get_part_info(char *part_name, struct part_info **part_info,
-                               char *response)
+int fastboot_nand_get_part_info(const char *part_name,
+                               struct part_info **part_info, char *response)
 {
        struct mtd_info *mtd = NULL;
 
index fd5db9eac8753b8e526036a65bb610d162ea4780..95db001beee4afdf0e63bfdb5d20fab6ba9cd604 100644 (file)
@@ -14,7 +14,8 @@
  * @part_info: Pointer to returned disk_partition_t
  * @response: Pointer to fastboot response buffer
  */
-int fastboot_mmc_get_part_info(char *part_name, struct blk_desc **dev_desc,
+int fastboot_mmc_get_part_info(const char *part_name,
+                              struct blk_desc **dev_desc,
                               disk_partition_t *part_info, char *response);
 
 /**
index 08ab0e28a6545ed1df6d1eaca87a3534a0a57356..6d7999f262f523901c79beb3bf59a92401a6e589 100644 (file)
@@ -16,8 +16,8 @@
  * @part_info: Pointer to returned part_info pointer
  * @response: Pointer to fastboot response buffer
  */
-int fastboot_nand_get_part_info(char *part_name, struct part_info **part_info,
-                               char *response);
+int fastboot_nand_get_part_info(const char *part_name,
+                               struct part_info **part_info, char *response);
 
 /**
  * fastboot_nand_flash_write() - Write image to NAND for fastboot