Skip to content

Commit 42e38df

Browse files
Shawnshhwenlingz
authored andcommitted
hv: fix "No prototype for non-static function"
The function not used in extern c file, must add static. Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 48b3cd9 commit 42e38df

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

hypervisor/arch/x86/guest/vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ int prepare_vm(uint16_t pcpu_id)
387387
#else
388388

389389
/* Create vm/vcpu for vm0 */
390-
int prepare_vm0(void)
390+
static int prepare_vm0(void)
391391
{
392392
int err;
393393
uint16_t i;

hypervisor/arch/x86/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ emulate_pio_post(struct acrn_vcpu *vcpu, const struct io_request *io_req)
4545
* @remark This function must be called after the VHM request corresponding to
4646
* \p vcpu being transferred to the COMPLETE state.
4747
*/
48-
void dm_emulate_pio_post(struct acrn_vcpu *vcpu)
48+
static void dm_emulate_pio_post(struct acrn_vcpu *vcpu)
4949
{
5050
uint16_t cur = vcpu->vcpu_id;
5151
union vhm_request_buffer *req_buf = NULL;
@@ -188,7 +188,7 @@ void emulate_io_post(struct acrn_vcpu *vcpu)
188188
* @retval -ENODEV No proper handler found.
189189
* @retval -EIO The request spans multiple devices and cannot be emulated.
190190
*/
191-
int32_t
191+
static int32_t
192192
hv_emulate_pio(const struct acrn_vcpu *vcpu, struct io_request *io_req)
193193
{
194194
int32_t status = -ENODEV;

hypervisor/arch/x86/irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ uint32_t alloc_irq_num(uint32_t req_irq)
6464
* @pre: irq is not in irq_static_mappings
6565
* free irq num allocated via alloc_irq_num()
6666
*/
67-
void free_irq_num(uint32_t irq)
67+
static void free_irq_num(uint32_t irq)
6868
{
6969
uint64_t rflags;
7070

@@ -130,7 +130,7 @@ uint32_t alloc_irq_vector(uint32_t irq)
130130
}
131131

132132
/* free the vector allocated via alloc_irq_vector() */
133-
void free_irq_vector(uint32_t irq)
133+
static void free_irq_vector(uint32_t irq)
134134
{
135135
struct irq_desc *desc;
136136
uint32_t vr;

hypervisor/arch/x86/virq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int vcpu_do_pending_extint(const struct acrn_vcpu *vcpu)
180180
* 2. native LAPIC interrupt pending/EOI status
181181
* 3. CPU stuck or not
182182
*/
183-
void dump_lapic(void)
183+
static void dump_lapic(void)
184184
{
185185
dev_dbg(ACRN_DBG_INTR,
186186
"LAPIC: TIME %08x, init=0x%x cur=0x%x ISR=0x%x IRR=0x%x",

hypervisor/debug/profiling.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static void profiling_pmi_handler(unsigned int irq, __unused void *data)
710710
/*
711711
* Initialize sep state and enable PMU counters
712712
*/
713-
void profiling_start_pmu(void)
713+
static void profiling_start_pmu(void)
714714
{
715715
uint16_t i;
716716

@@ -751,7 +751,7 @@ void profiling_start_pmu(void)
751751
/*
752752
* Reset sep state and Disable all the PMU counters
753753
*/
754-
void profiling_stop_pmu(void)
754+
static void profiling_stop_pmu(void)
755755
{
756756
uint16_t i;
757757

0 commit comments

Comments
 (0)