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

s390/scm: use inline dummy functions

Convert the defines for the !CONFIG_SCM* stuff to static inline
functions.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
58fece78 88e7616e

+29 -14
+28 -13
drivers/s390/block/scm_blk.h
··· 68 68 void scm_cluster_request_irq(struct scm_request *); 69 69 bool scm_test_cluster_request(struct scm_request *); 70 70 bool scm_cluster_size_valid(void); 71 - #else 72 - #define __scm_free_rq_cluster(scmrq) {} 73 - #define __scm_alloc_rq_cluster(scmrq) 0 74 - #define scm_request_cluster_init(scmrq) {} 75 - #define scm_reserve_cluster(scmrq) true 76 - #define scm_release_cluster(scmrq) {} 77 - #define scm_blk_dev_cluster_setup(bdev) {} 78 - #define scm_need_cluster_request(scmrq) false 79 - #define scm_initiate_cluster_request(scmrq) {} 80 - #define scm_cluster_request_irq(scmrq) {} 81 - #define scm_test_cluster_request(scmrq) false 82 - #define scm_cluster_size_valid() true 83 - #endif 71 + #else /* CONFIG_SCM_BLOCK_CLUSTER_WRITE */ 72 + static inline void __scm_free_rq_cluster(struct scm_request *scmrq) {} 73 + static inline int __scm_alloc_rq_cluster(struct scm_request *scmrq) 74 + { 75 + return 0; 76 + } 77 + static inline void scm_request_cluster_init(struct scm_request *scmrq) {} 78 + static inline bool scm_reserve_cluster(struct scm_request *scmrq) 79 + { 80 + return true; 81 + } 82 + static inline void scm_release_cluster(struct scm_request *scmrq) {} 83 + static inline void scm_blk_dev_cluster_setup(struct scm_blk_dev *bdev) {} 84 + static inline bool scm_need_cluster_request(struct scm_request *scmrq) 85 + { 86 + return false; 87 + } 88 + static inline void scm_initiate_cluster_request(struct scm_request *scmrq) {} 89 + static inline void scm_cluster_request_irq(struct scm_request *scmrq) {} 90 + static inline bool scm_test_cluster_request(struct scm_request *scmrq) 91 + { 92 + return false; 93 + } 94 + static inline bool scm_cluster_size_valid(void) 95 + { 96 + return true; 97 + } 98 + #endif /* CONFIG_SCM_BLOCK_CLUSTER_WRITE */ 84 99 85 100 extern debug_info_t *scm_debug; 86 101
+1 -1
drivers/s390/cio/chsc.h
··· 157 157 #ifdef CONFIG_SCM_BUS 158 158 int scm_update_information(void); 159 159 #else /* CONFIG_SCM_BUS */ 160 - #define scm_update_information() 0 160 + static inline int scm_update_information(void) { return 0; } 161 161 #endif /* CONFIG_SCM_BUS */ 162 162 163 163