All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <Claudiu.Beznea@microchip.com>, <Ludovic.Desroches@microchip.com>,
	<vkoul@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro
Date: Fri, 15 Oct 2021 07:50:54 +0000	[thread overview]
Message-ID: <f940d670-c149-dcc1-c07d-c2d4487c842f@microchip.com> (raw)
In-Reply-To: <20211007111230.2331837-3-claudiu.beznea@microchip.com>

On 10/7/21 2:12 PM, Claudiu Beznea wrote:
> AT_XDMAC_CC_PERID() should be used to setup bits 24..30 of XDMAC_CC
> register. Using it without parenthesis around 0x7f & (i) will lead to
> setting all the time zero for bits 24..30 of XDMAC_CC as the << operator
> has higher precedence over bitwise &. Thus, add paranthesis around
> 0x7f & (i).
> 
> Fixes: 15a03850ab8f ("dmaengine: at_xdmac: fix macro typo")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> ---
>  drivers/dma/at_xdmac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index c66ad5706cb5..e18abbd56fb5 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -155,7 +155,7 @@
>  #define		AT_XDMAC_CC_WRIP	(0x1 << 23)	/* Write in Progress (read only) */
>  #define			AT_XDMAC_CC_WRIP_DONE		(0x0 << 23)
>  #define			AT_XDMAC_CC_WRIP_IN_PROGRESS	(0x1 << 23)
> -#define		AT_XDMAC_CC_PERID(i)	(0x7f & (i) << 24)	/* Channel Peripheral Identifier */
> +#define		AT_XDMAC_CC_PERID(i)	((0x7f & (i)) << 24)	/* Channel Peripheral Identifier */
>  #define AT_XDMAC_CDS_MSP	0x2C	/* Channel Data Stride Memory Set Pattern */
>  #define AT_XDMAC_CSUS		0x30	/* Channel Source Microblock Stride */
>  #define AT_XDMAC_CDUS		0x34	/* Channel Destination Microblock Stride */
> 


WARNING: multiple messages have this Message-ID (diff)
From: <Tudor.Ambarus@microchip.com>
To: <Claudiu.Beznea@microchip.com>, <Ludovic.Desroches@microchip.com>,
	<vkoul@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro
Date: Fri, 15 Oct 2021 07:50:54 +0000	[thread overview]
Message-ID: <f940d670-c149-dcc1-c07d-c2d4487c842f@microchip.com> (raw)
In-Reply-To: <20211007111230.2331837-3-claudiu.beznea@microchip.com>

On 10/7/21 2:12 PM, Claudiu Beznea wrote:
> AT_XDMAC_CC_PERID() should be used to setup bits 24..30 of XDMAC_CC
> register. Using it without parenthesis around 0x7f & (i) will lead to
> setting all the time zero for bits 24..30 of XDMAC_CC as the << operator
> has higher precedence over bitwise &. Thus, add paranthesis around
> 0x7f & (i).
> 
> Fixes: 15a03850ab8f ("dmaengine: at_xdmac: fix macro typo")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> ---
>  drivers/dma/at_xdmac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index c66ad5706cb5..e18abbd56fb5 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -155,7 +155,7 @@
>  #define		AT_XDMAC_CC_WRIP	(0x1 << 23)	/* Write in Progress (read only) */
>  #define			AT_XDMAC_CC_WRIP_DONE		(0x0 << 23)
>  #define			AT_XDMAC_CC_WRIP_IN_PROGRESS	(0x1 << 23)
> -#define		AT_XDMAC_CC_PERID(i)	(0x7f & (i) << 24)	/* Channel Peripheral Identifier */
> +#define		AT_XDMAC_CC_PERID(i)	((0x7f & (i)) << 24)	/* Channel Peripheral Identifier */
>  #define AT_XDMAC_CDS_MSP	0x2C	/* Channel Data Stride Memory Set Pattern */
>  #define AT_XDMAC_CSUS		0x30	/* Channel Source Microblock Stride */
>  #define AT_XDMAC_CDUS		0x34	/* Channel Destination Microblock Stride */
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-10-15  7:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 11:12 [PATCH 0/4] dmaengine: at_xdmac: fixes and code enhancements Claudiu Beznea
2021-10-07 11:12 ` Claudiu Beznea
2021-10-07 11:12 ` [PATCH 1/4] dmaengine: at_xdmac: call at_xdmac_axi_config() on resume path Claudiu Beznea
2021-10-07 11:12   ` Claudiu Beznea
2021-10-15  7:49   ` Tudor.Ambarus
2021-10-15  7:49     ` Tudor.Ambarus
2021-10-07 11:12 ` [PATCH 2/4] dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro Claudiu Beznea
2021-10-07 11:12   ` Claudiu Beznea
2021-10-15  7:50   ` Tudor.Ambarus [this message]
2021-10-15  7:50     ` Tudor.Ambarus
2021-10-07 11:12 ` [PATCH 3/4] dmaengine: at_xdmac: use __maybe_unused for pm functions Claudiu Beznea
2021-10-07 11:12   ` Claudiu Beznea
2021-10-15  8:01   ` Tudor.Ambarus
2021-10-15  8:01     ` Tudor.Ambarus
2021-10-07 11:12 ` [PATCH 4/4] dmaengine: at_xdmac: use pm_ptr() Claudiu Beznea
2021-10-07 11:12   ` Claudiu Beznea
2021-10-15  8:03   ` Tudor.Ambarus
2021-10-15  8:03     ` Tudor.Ambarus
2021-10-18  6:12 ` [PATCH 0/4] dmaengine: at_xdmac: fixes and code enhancements Vinod Koul
2021-10-18  6:12   ` Vinod Koul

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=f940d670-c149-dcc1-c07d-c2d4487c842f@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=Ludovic.Desroches@microchip.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.