* [PATCH -next] dm verity: make some functions static
@ 2018-03-28 11:11 Wei Yongjun
2018-03-28 11:57 ` yael.chemla
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2018-03-28 11:11 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer, yaeceh01
Cc: Wei Yongjun, dm-devel, linux-kernel, kernel-janitors
Fixes the following sparse warnings:
drivers/md/dm-verity-target.c:375:6: warning:
symbol 'verity_for_io_block' was not declared. Should it be static?
drivers/md/dm-verity-target.c:403:14: warning:
symbol 'verity_calc_buffs_for_bv' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/md/dm-verity-target.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index da35f0e..e70d4d2 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -372,9 +372,9 @@ int verity_hash_for_block(struct dm_verity *v, struct dm_verity_io *io,
/*
* Calculates the digest for the given bio
*/
-void verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
- struct bvec_iter *iter, struct scatterlist *sg,
- unsigned int *nents, unsigned int *total_len)
+static void verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
+ struct bvec_iter *iter, struct scatterlist *sg,
+ unsigned int *nents, unsigned int *total_len)
{
unsigned int todo = 1 << v->data_dev_block_bits;
struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);
@@ -400,8 +400,9 @@ void verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
* Calculate how many buffers are required to accommodate
* bio_vec starting from iter.
*/
-unsigned int verity_calc_buffs_for_bv(struct dm_verity *v, struct dm_verity_io *io,
- struct bvec_iter *iter)
+static unsigned int verity_calc_buffs_for_bv(struct dm_verity *v,
+ struct dm_verity_io *io,
+ struct bvec_iter *iter)
{
unsigned int todo = 1 << v->data_dev_block_bits;
struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH -next] dm verity: make some functions static
2018-03-28 11:11 [PATCH -next] dm verity: make some functions static Wei Yongjun
@ 2018-03-28 11:57 ` yael.chemla
0 siblings, 0 replies; 2+ messages in thread
From: yael.chemla @ 2018-03-28 11:57 UTC (permalink / raw)
To: 'Wei Yongjun', 'Alasdair Kergon', 'Mike Snitzer'
Cc: dm-devel, linux-kernel, kernel-janitors
Hi Wei,
i'll add this fix, got this also from the kbuild test robot.
Thank you,
Yael
> -----Original Message-----
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, 28 March 2018 14:12
> To: Alasdair Kergon <agk@redhat.com>; Mike Snitzer <snitzer@redhat.com>;
> yaeceh01 <yael.chemla@foss.arm.com>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; dm-devel@redhat.com; linux-
> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH -next] dm verity: make some functions static
>
> Fixes the following sparse warnings:
>
> drivers/md/dm-verity-target.c:375:6: warning:
> symbol 'verity_for_io_block' was not declared. Should it be static?
> drivers/md/dm-verity-target.c:403:14: warning:
> symbol 'verity_calc_buffs_for_bv' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/md/dm-verity-target.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
> index da35f0e..e70d4d2 100644
> --- a/drivers/md/dm-verity-target.c
> +++ b/drivers/md/dm-verity-target.c
> @@ -372,9 +372,9 @@ int verity_hash_for_block(struct dm_verity *v, struct
> dm_verity_io *io,
> /*
> * Calculates the digest for the given bio
> */
> -void verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
> - struct bvec_iter *iter, struct scatterlist *sg,
> - unsigned int *nents, unsigned int *total_len)
> +static void verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
> + struct bvec_iter *iter, struct scatterlist *sg,
> + unsigned int *nents, unsigned int *total_len)
> {
> unsigned int todo = 1 << v->data_dev_block_bits;
> struct bio *bio = dm_bio_from_per_bio_data(io, v->ti-
> >per_io_data_size); @@ -400,8 +400,9 @@ void verity_for_io_block(struct
> dm_verity *v, struct dm_verity_io *io,
> * Calculate how many buffers are required to accommodate
> * bio_vec starting from iter.
> */
> -unsigned int verity_calc_buffs_for_bv(struct dm_verity *v, struct
> dm_verity_io *io,
> - struct bvec_iter *iter)
> +static unsigned int verity_calc_buffs_for_bv(struct dm_verity *v,
> + struct dm_verity_io *io,
> + struct bvec_iter *iter)
> {
> unsigned int todo = 1 << v->data_dev_block_bits;
> struct bio *bio = dm_bio_from_per_bio_data(io, v->ti-
> >per_io_data_size);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-28 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28 11:11 [PATCH -next] dm verity: make some functions static Wei Yongjun
2018-03-28 11:57 ` yael.chemla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).