Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: lpddr: Mark functions as static and remove unused function

This patch marks the functions do_write_buffer() and do_erase_oneblock()
as static because because they are not used outside this file. It also
removes the unused function word_program() in lpddr/lpddr_cmds.c.

Thus, it also removes the following warnings in lpddr/lpddr_cmds.c:
drivers/mtd/lpddr/lpddr_cmds.c:391:5: warning: no previous prototype for ‘do_write_buffer’ [-Wmissing-prototypes]
drivers/mtd/lpddr/lpddr_cmds.c:472:5: warning: no previous prototype for ‘do_erase_oneblock’ [-Wmissing-prototypes]
drivers/mtd/lpddr/lpddr_cmds.c:751:5: warning: no previous prototype for ‘word_program’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Rashika Kheria and committed by
Brian Norris
176e4a23 5e41d0a7

+2 -30
+2 -30
drivers/mtd/lpddr/lpddr_cmds.c
··· 388 388 wake_up(&chip->wq); 389 389 } 390 390 391 - int do_write_buffer(struct map_info *map, struct flchip *chip, 391 + static int do_write_buffer(struct map_info *map, struct flchip *chip, 392 392 unsigned long adr, const struct kvec **pvec, 393 393 unsigned long *pvec_seek, int len) 394 394 { ··· 469 469 return ret; 470 470 } 471 471 472 - int do_erase_oneblock(struct mtd_info *mtd, loff_t adr) 472 + static int do_erase_oneblock(struct mtd_info *mtd, loff_t adr) 473 473 { 474 474 struct map_info *map = mtd->priv; 475 475 struct lpddr_private *lpddr = map->fldrv_priv; ··· 746 746 static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) 747 747 { 748 748 return do_xxlock(mtd, ofs, len, DO_XXLOCK_UNLOCK); 749 - } 750 - 751 - int word_program(struct map_info *map, loff_t adr, uint32_t curval) 752 - { 753 - int ret; 754 - struct lpddr_private *lpddr = map->fldrv_priv; 755 - int chipnum = adr >> lpddr->chipshift; 756 - struct flchip *chip = &lpddr->chips[chipnum]; 757 - 758 - mutex_lock(&chip->mutex); 759 - ret = get_chip(map, chip, FL_WRITING); 760 - if (ret) { 761 - mutex_unlock(&chip->mutex); 762 - return ret; 763 - } 764 - 765 - send_pfow_command(map, LPDDR_WORD_PROGRAM, adr, 0x00, (map_word *)&curval); 766 - 767 - ret = wait_for_ready(map, chip, (1<<lpddr->qinfo->SingleWordProgTime)); 768 - if (ret) { 769 - printk(KERN_WARNING"%s word_program error at: %llx; val: %x\n", 770 - map->name, adr, curval); 771 - goto out; 772 - } 773 - 774 - out: put_chip(map, chip); 775 - mutex_unlock(&chip->mutex); 776 - return ret; 777 749 } 778 750 779 751 MODULE_LICENSE("GPL");