Re: [PATCH 13/23] md: namespace private helper names

From: Andy Shevchenko
Date: Mon May 22 2017 - 14:52:41 EST


On Thu, 2017-05-18 at 08:26 +0200, Christoph Hellwig wrote:
> From: Amir Goldstein <amir73il@xxxxxxxxx>
>
> The md private helper uuid_equal() collides with a generic helper
> of the same name.
>
> Rename the md private helper to md_uuid_equal() and do the same for
> md_sb_equal().
>

While patch is good, shouldn't it go before we introduce those helpers?

> Cc: Shaohua Li <shli@xxxxxxxxxx>
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
> Âdrivers/md/md.c | 8 ++++----
> Â1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 82f798be964f..65795cc4cb7d 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -825,7 +825,7 @@ static int read_disk_sb(struct md_rdev *rdev, int
> size)
> Â return -EINVAL;
> Â}
> Â
> -static int uuid_equal(mdp_super_t *sb1, mdp_super_t *sb2)
> +static int md_uuid_equal(mdp_super_t *sb1, mdp_super_t *sb2)
> Â{
> Â return sb1->set_uuid0 == sb2->set_uuid0 &&
> Â sb1->set_uuid1 == sb2->set_uuid1 &&
> @@ -833,7 +833,7 @@ static int uuid_equal(mdp_super_t *sb1,
> mdp_super_t *sb2)
> Â sb1->set_uuid3 == sb2->set_uuid3;
> Â}
> Â
> -static int sb_equal(mdp_super_t *sb1, mdp_super_t *sb2)
> +static int md_sb_equal(mdp_super_t *sb1, mdp_super_t *sb2)
> Â{
> Â int ret;
> Â mdp_super_t *tmp1, *tmp2;
> @@ -1025,12 +1025,12 @@ static int super_90_load(struct md_rdev *rdev,
> struct md_rdev *refdev, int minor
> Â } else {
> Â __u64 ev1, ev2;
> Â mdp_super_t *refsb = page_address(refdev->sb_page);
> - if (!uuid_equal(refsb, sb)) {
> + if (!md_uuid_equal(refsb, sb)) {
> Â pr_warn("md: %s has different UUID to %s\n",
> Â b, bdevname(refdev->bdev,b2));
> Â goto abort;
> Â }
> - if (!sb_equal(refsb, sb)) {
> + if (!md_sb_equal(refsb, sb)) {
> Â pr_warn("md: %s has same UUID but different
> superblock to %s\n",
> Â b, bdevname(refdev->bdev, b2));
> Â goto abort;

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy