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

drivers/misc/ti-st: remove sparse warnings

remove sparse warnings by assigning right storage specifiers to functions and
also clean-up the declarations in the include/linux/ti_wilink_st.h

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Pavan Savoy and committed by
Greg Kroah-Hartman
27712b39 eccf2979

+15 -12
+7 -5
drivers/misc/ti-st/st_core.c
··· 30 30 31 31 #include <linux/ti_wilink_st.h> 32 32 33 + extern void st_kim_recv(void *, const unsigned char *, long); 34 + void st_int_recv(void *, const unsigned char *, long); 33 35 /* function pointer pointing to either, 34 36 * st_kim_recv during registration to receive fw download responses 35 37 * st_int_recv after registration to receive proto stack responses 36 38 */ 37 - void (*st_recv) (void*, const unsigned char*, long); 39 + static void (*st_recv) (void *, const unsigned char *, long); 38 40 39 41 /********************************************************************/ 40 42 static void add_channel_to_table(struct st_data_s *st_gdata, ··· 102 100 * push the skb received to relevant 103 101 * protocol stacks 104 102 */ 105 - void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata) 103 + static void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata) 106 104 { 107 105 pr_debug(" %s(prot:%d) ", __func__, chnl_id); 108 106 ··· 142 140 * This function is being called with spin lock held, protocol drivers are 143 141 * only expected to complete their waits and do nothing more than that. 144 142 */ 145 - void st_reg_complete(struct st_data_s *st_gdata, char err) 143 + static void st_reg_complete(struct st_data_s *st_gdata, char err) 146 144 { 147 145 unsigned char i = 0; 148 146 pr_info(" %s ", __func__); ··· 381 379 * completely, return that skb which has the pending data. 382 380 * In normal cases, return top of txq. 383 381 */ 384 - struct sk_buff *st_int_dequeue(struct st_data_s *st_gdata) 382 + static struct sk_buff *st_int_dequeue(struct st_data_s *st_gdata) 385 383 { 386 384 struct sk_buff *returning_skb; 387 385 ··· 403 401 * txq and waitq needs protection since the other contexts 404 402 * may be sending data, waking up chip. 405 403 */ 406 - void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb) 404 + static void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb) 407 405 { 408 406 unsigned long flags = 0; 409 407
+6 -6
drivers/misc/ti-st/st_kim.c
··· 63 63 * in case of error don't complete so that waiting for proper 64 64 * response times out 65 65 */ 66 - void validate_firmware_response(struct kim_data_s *kim_gdata) 66 + static void validate_firmware_response(struct kim_data_s *kim_gdata) 67 67 { 68 68 struct sk_buff *skb = kim_gdata->rx_skb; 69 69 if (unlikely(skb->data[5] != 0)) { ··· 119 119 * have been observed to come in bursts of different 120 120 * tty_receive and hence the logic 121 121 */ 122 - void kim_int_recv(struct kim_data_s *kim_gdata, 122 + static void kim_int_recv(struct kim_data_s *kim_gdata, 123 123 const unsigned char *data, long count) 124 124 { 125 125 const unsigned char *ptr; ··· 236 236 return 0; 237 237 } 238 238 239 - void skip_change_remote_baud(unsigned char **ptr, long *len) 239 + static void skip_change_remote_baud(unsigned char **ptr, long *len) 240 240 { 241 241 unsigned char *nxt_action, *cur_action; 242 242 cur_action = *ptr; ··· 688 688 * board-*.c file 689 689 */ 690 690 691 - struct dentry *kim_debugfs_dir; 691 + static struct dentry *kim_debugfs_dir; 692 692 static int kim_probe(struct platform_device *pdev) 693 693 { 694 694 long status; ··· 769 769 return 0; 770 770 } 771 771 772 - int kim_suspend(struct platform_device *pdev, pm_message_t state) 772 + static int kim_suspend(struct platform_device *pdev, pm_message_t state) 773 773 { 774 774 struct ti_st_plat_data *pdata = pdev->dev.platform_data; 775 775 ··· 779 779 return -EOPNOTSUPP; 780 780 } 781 781 782 - int kim_resume(struct platform_device *pdev) 782 + static int kim_resume(struct platform_device *pdev) 783 783 { 784 784 struct ti_st_plat_data *pdata = pdev->dev.platform_data; 785 785