Message ID | 1692875480-22494-1-git-send-email-xuyang2018.jy@fujitsu.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] hugeshmctl01: Mark struct tcase as static | expand |
Hi Xu, The Subject seems not exact. You marked struct struct tcase and several functions as static. Other than that, it looks good to me. Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com> Best Regards, Xiao Yang On 2023/8/24 19:11, Yang Xu wrote: > To follow LTP conventions. > > Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> > --- > testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c > index 11cd69050..8cacde7cd 100644 > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c > @@ -53,7 +53,7 @@ static void func_set(void); > static void func_rmid(void); > static void *set_shmat(void); > > -struct tcase { > +static struct tcase { > int cmd; > void (*func_test) (void); > void (*func_setup) (void); > @@ -90,7 +90,7 @@ static void test_hugeshmctl(unsigned int i) > /* > * set_shmat() - Attach the shared memory and return the pointer. > */ > -void *set_shmat(void) > +static void *set_shmat(void) > { > void *rval; > > @@ -279,7 +279,7 @@ static void func_rmid(void) > shm_id_1 = -1; > } > > -void setup(void) > +static void setup(void) > { > long hpage_size; > > @@ -293,7 +293,7 @@ void setup(void) > shmkey = getipckey(); > } > > -void cleanup(void) > +static void cleanup(void) > { > rm_shm(shm_id_1); > }
Hi, Xiao Yang > Hi Xu, > > The Subject seems not exact. You marked struct struct tcase and > several functions as static. > > Other than that, it looks good to me. > Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com> > > Best Regards, > Xiao Yang > ok.I'll correct the subject. Best Regards, Yang Xu > On 2023/8/24 19:11, Yang Xu wrote: >> To follow LTP conventions. >> >> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> >> --- >> testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c >> b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c >> index 11cd69050..8cacde7cd 100644 >> --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c >> +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c >> @@ -53,7 +53,7 @@ static void func_set(void); >> static void func_rmid(void); >> static void *set_shmat(void); >> -struct tcase { >> +static struct tcase { >> int cmd; >> void (*func_test) (void); >> void (*func_setup) (void); >> @@ -90,7 +90,7 @@ static void test_hugeshmctl(unsigned int i) >> /* >> * set_shmat() - Attach the shared memory and return the pointer. >> */ >> -void *set_shmat(void) >> +static void *set_shmat(void) >> { >> void *rval; >> @@ -279,7 +279,7 @@ static void func_rmid(void) >> shm_id_1 = -1; >> } >> -void setup(void) >> +static void setup(void) >> { >> long hpage_size; >> @@ -293,7 +293,7 @@ void setup(void) >> shmkey = getipckey(); >> } >> -void cleanup(void) >> +static void cleanup(void) >> { >> rm_shm(shm_id_1); >> }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c index 11cd69050..8cacde7cd 100644 --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c @@ -53,7 +53,7 @@ static void func_set(void); static void func_rmid(void); static void *set_shmat(void); -struct tcase { +static struct tcase { int cmd; void (*func_test) (void); void (*func_setup) (void); @@ -90,7 +90,7 @@ static void test_hugeshmctl(unsigned int i) /* * set_shmat() - Attach the shared memory and return the pointer. */ -void *set_shmat(void) +static void *set_shmat(void) { void *rval; @@ -279,7 +279,7 @@ static void func_rmid(void) shm_id_1 = -1; } -void setup(void) +static void setup(void) { long hpage_size; @@ -293,7 +293,7 @@ void setup(void) shmkey = getipckey(); } -void cleanup(void) +static void cleanup(void) { rm_shm(shm_id_1); }
To follow LTP conventions. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> --- testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)