mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Dejin Zheng <zhengdejin5@gmail.com>, broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v1] reset: intel: fix a compile warning about REG_OFFSET redefined
Date: Fri, 26 Jun 2020 12:38:13 +0200	[thread overview]
Message-ID: <69be7e39936ced4501107aeff6a93ca930e62f49.camel@pengutronix.de> (raw)
In-Reply-To: <20200604153039.22957-1-zhengdejin5@gmail.com>

Hi Dejin,

On Thu, 2020-06-04 at 23:30 +0800, Dejin Zheng wrote:
> kernel test robot reports a compile warning about REG_OFFSET redefined
> in the reset-intel-gw.c after merging commit e44ab4e14d6f4 ("regmap:
> Simplify implementation of the regmap_read_poll_timeout() macro"). the
> warning is like that:
> 
> drivers/reset/reset-intel-gw.c:18:0: warning: "REG_OFFSET" redefined
>  #define REG_OFFSET GENMASK(31, 16)
> 
> In file included from ./arch/arm/mach-ixp4xx/include/mach/hardware.h:30:0,
>                  from ./arch/arm/mach-ixp4xx/include/mach/io.h:15,
>                  from ./arch/arm/include/asm/io.h:198,
>                  from ./include/linux/io.h:13,
>                  from ./include/linux/iopoll.h:14,
>                  from ./include/linux/regmap.h:20,
>                  from drivers/reset/reset-intel-gw.c:12:
> ./arch/arm/mach-ixp4xx/include/mach/platform.h:25:0: note: this is the location of the previous definition
>  #define REG_OFFSET 3
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: e44ab4e14d6f4 ("regmap: Simplify implementation of the regmap_read_poll_timeout() macro")

Hm, shouldn't this rather be:

Fixes: c9aef213e38c ("reset: intel: Add system reset controller driver")

even though e44ab4e14d6f4 triggered the issue by including iopoll.h?

> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> ---
>  drivers/reset/reset-intel-gw.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/reset/reset-intel-gw.c b/drivers/reset/reset-intel-gw.c
> index 854238444616..5cfb4892b399 100644
> --- a/drivers/reset/reset-intel-gw.c
> +++ b/drivers/reset/reset-intel-gw.c
> @@ -15,7 +15,7 @@
>  #define RCU_RST_STAT	0x0024
>  #define RCU_RST_REQ	0x0048
>  
> -#define REG_OFFSET	GENMASK(31, 16)
> +#define REG_OFFSET_MASK	GENMASK(31, 16)
>  #define BIT_OFFSET	GENMASK(15, 8)
>  #define STAT_BIT_OFFSET	GENMASK(7, 0)

Could you add the _MASK suffix to BIT_OFFSET and STAT_BIT_OFFSET as
well, for consistency?

regards
Philipp

  reply	other threads:[~2020-06-26 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 15:30 Dejin Zheng
2020-06-26 10:38 ` Philipp Zabel [this message]
2020-06-26 12:33   ` Dejin Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69be7e39936ced4501107aeff6a93ca930e62f49.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=zhengdejin5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®