linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll
@ 2018-10-25 18:05 Nathan Chancellor
  2018-10-25 18:11 ` Nick Desaulniers
  2018-11-24 13:41 ` Vinod Koul
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2018-10-25 18:05 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Dan Williams, Michal Simek, dmaengine, linux-arm-kernel,
	linux-kernel, Nick Desaulniers, Nathan Chancellor

Clang warns:

drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is
ignored, place it after "struct" to apply attribute to type declaration
[-Wignored-attributes]
}; __aligned(64)
   ^
./include/linux/compiler_types.h:200:38: note: expanded from macro
'__aligned'
#define __aligned(x)            __attribute__((aligned(x)))
                                               ^
1 warning generated.

As Nick pointed out in the previous version of this patch, the author
likely intended for this struct to be 8-byte (64-bit) aligned, not
64-byte, which is the default. Remove the hanging __aligned attribute.

Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/dma/xilinx/zynqmp_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index c74a88b65039..73de6a6179fc 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -163,7 +163,7 @@ struct zynqmp_dma_desc_ll {
 	u32 ctrl;
 	u64 nxtdscraddr;
 	u64 rsvd;
-}; __aligned(64)
+};
 
 /**
  * struct zynqmp_dma_desc_sw - Per Transaction structure
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll
  2018-10-25 18:05 [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll Nathan Chancellor
@ 2018-10-25 18:11 ` Nick Desaulniers
  2018-10-25 18:14   ` Nathan Chancellor
  2018-11-24 13:41 ` Vinod Koul
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2018-10-25 18:11 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: vkoul, dan.j.williams, michal.simek, dmaengine, Linux ARM, LKML

On Thu, Oct 25, 2018 at 11:06 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> Clang warns:
>
> drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is
> ignored, place it after "struct" to apply attribute to type declaration
> [-Wignored-attributes]
> }; __aligned(64)
>    ^
> ./include/linux/compiler_types.h:200:38: note: expanded from macro
> '__aligned'
> #define __aligned(x)            __attribute__((aligned(x)))
>                                                ^
> 1 warning generated.
>
> As Nick pointed out in the previous version of this patch, the author
> likely intended for this struct to be 8-byte (64-bit) aligned, not
> 64-byte, which is the default. Remove the hanging __aligned attribute.

Here was the v1 discussion, for reference.
https://lkml.org/lkml/2018/9/12/4

Thanks for sending the update Nathan.  One thing I recommend doing is
including the version in the [PATCH] subject line, ie. [PATCH v2].
`git format-patch` can do this automatically for you, ex.
$ git format-patch -v2 HEAD~

>
> Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")
> Reported-by: Nick Desaulniers <ndesaulniers@google.com>
> Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---

Then below this line, you can include the notes about v1 -> v2
changes. (interdiff notes to the reviewers that get discarded from the
commit message).  I think I've seen you use the versioning before, so
sorry if I'm restating something you already know.

Thanks for the patch.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

>  drivers/dma/xilinx/zynqmp_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> index c74a88b65039..73de6a6179fc 100644
> --- a/drivers/dma/xilinx/zynqmp_dma.c
> +++ b/drivers/dma/xilinx/zynqmp_dma.c
> @@ -163,7 +163,7 @@ struct zynqmp_dma_desc_ll {
>         u32 ctrl;
>         u64 nxtdscraddr;
>         u64 rsvd;
> -}; __aligned(64)
> +};
>
>  /**
>   * struct zynqmp_dma_desc_sw - Per Transaction structure
> --
> 2.19.1
>


-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll
  2018-10-25 18:11 ` Nick Desaulniers
@ 2018-10-25 18:14   ` Nathan Chancellor
  2018-10-25 18:18     ` Nick Desaulniers
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2018-10-25 18:14 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: vkoul, dan.j.williams, michal.simek, dmaengine, Linux ARM, LKML

On Thu, Oct 25, 2018 at 11:11:22AM -0700, Nick Desaulniers wrote:
> On Thu, Oct 25, 2018 at 11:06 AM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > Clang warns:
> >
> > drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is
> > ignored, place it after "struct" to apply attribute to type declaration
> > [-Wignored-attributes]
> > }; __aligned(64)
> >    ^
> > ./include/linux/compiler_types.h:200:38: note: expanded from macro
> > '__aligned'
> > #define __aligned(x)            __attribute__((aligned(x)))
> >                                                ^
> > 1 warning generated.
> >
> > As Nick pointed out in the previous version of this patch, the author
> > likely intended for this struct to be 8-byte (64-bit) aligned, not
> > 64-byte, which is the default. Remove the hanging __aligned attribute.
> 
> Here was the v1 discussion, for reference.
> https://lkml.org/lkml/2018/9/12/4
> 
> Thanks for sending the update Nathan.  One thing I recommend doing is
> including the version in the [PATCH] subject line, ie. [PATCH v2].
> `git format-patch` can do this automatically for you, ex.
> $ git format-patch -v2 HEAD~
> 
> >
> > Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")
> > Reported-by: Nick Desaulniers <ndesaulniers@google.com>
> > Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> 
> Then below this line, you can include the notes about v1 -> v2
> changes. (interdiff notes to the reviewers that get discarded from the
> commit message).  I think I've seen you use the versioning before, so
> sorry if I'm restating something you already know.
> 

No, that's fine, I completely forgot all the versioning for this patch
as I was rushing, sorry about that!

> Thanks for the patch.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> 

Thanks for the review!
Nathan

> >  drivers/dma/xilinx/zynqmp_dma.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> > index c74a88b65039..73de6a6179fc 100644
> > --- a/drivers/dma/xilinx/zynqmp_dma.c
> > +++ b/drivers/dma/xilinx/zynqmp_dma.c
> > @@ -163,7 +163,7 @@ struct zynqmp_dma_desc_ll {
> >         u32 ctrl;
> >         u64 nxtdscraddr;
> >         u64 rsvd;
> > -}; __aligned(64)
> > +};
> >
> >  /**
> >   * struct zynqmp_dma_desc_sw - Per Transaction structure
> > --
> > 2.19.1
> >
> 
> 
> -- 
> Thanks,
> ~Nick Desaulniers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll
  2018-10-25 18:14   ` Nathan Chancellor
@ 2018-10-25 18:18     ` Nick Desaulniers
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Desaulniers @ 2018-10-25 18:18 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: vkoul, dan.j.williams, michal.simek, dmaengine, Linux ARM, LKML

On Thu, Oct 25, 2018 at 11:14 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Thu, Oct 25, 2018 at 11:11:22AM -0700, Nick Desaulniers wrote:
> > On Thu, Oct 25, 2018 at 11:06 AM Nathan Chancellor
> > <natechancellor@gmail.com> wrote:
> > >
> > > Clang warns:
> > >
> > > drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is
> > > ignored, place it after "struct" to apply attribute to type declaration
> > > [-Wignored-attributes]
> > > }; __aligned(64)
> > >    ^
> > > ./include/linux/compiler_types.h:200:38: note: expanded from macro
> > > '__aligned'
> > > #define __aligned(x)            __attribute__((aligned(x)))
> > >                                                ^
> > > 1 warning generated.
> > >
> > > As Nick pointed out in the previous version of this patch, the author
> > > likely intended for this struct to be 8-byte (64-bit) aligned, not
> > > 64-byte, which is the default. Remove the hanging __aligned attribute.
> >
> > Here was the v1 discussion, for reference.
> > https://lkml.org/lkml/2018/9/12/4
> >
> > Thanks for sending the update Nathan.  One thing I recommend doing is
> > including the version in the [PATCH] subject line, ie. [PATCH v2].
> > `git format-patch` can do this automatically for you, ex.
> > $ git format-patch -v2 HEAD~
> >
> > >
> > > Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")
> > > Reported-by: Nick Desaulniers <ndesaulniers@google.com>
> > > Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > > ---
> >
> > Then below this line, you can include the notes about v1 -> v2
> > changes. (interdiff notes to the reviewers that get discarded from the
> > commit message).  I think I've seen you use the versioning before, so
> > sorry if I'm restating something you already know.
> >
>
> No, that's fine, I completely forgot all the versioning for this patch
> as I was rushing, sorry about that!

No worries.  There's a lot to juggle when sending a patch and I miss
these all the time (did I run checkpatch, did I cc the folks added to
v1 that get_maintainer did not suggest, did I ...) and the version
info of the patch gets discarded anyways once committed.

>
> > Thanks for the patch.
> > Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> >
>
> Thanks for the review!
> Nathan
>
> > >  drivers/dma/xilinx/zynqmp_dma.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> > > index c74a88b65039..73de6a6179fc 100644
> > > --- a/drivers/dma/xilinx/zynqmp_dma.c
> > > +++ b/drivers/dma/xilinx/zynqmp_dma.c
> > > @@ -163,7 +163,7 @@ struct zynqmp_dma_desc_ll {
> > >         u32 ctrl;
> > >         u64 nxtdscraddr;
> > >         u64 rsvd;
> > > -}; __aligned(64)
> > > +};
> > >
> > >  /**
> > >   * struct zynqmp_dma_desc_sw - Per Transaction structure
> > > --
> > > 2.19.1
> > >
> >
> >
> > --
> > Thanks,
> > ~Nick Desaulniers



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll
  2018-10-25 18:05 [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll Nathan Chancellor
  2018-10-25 18:11 ` Nick Desaulniers
@ 2018-11-24 13:41 ` Vinod Koul
  1 sibling, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2018-11-24 13:41 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Dan Williams, Michal Simek, dmaengine, linux-arm-kernel,
	linux-kernel, Nick Desaulniers

On 25-10-18, 11:05, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is
> ignored, place it after "struct" to apply attribute to type declaration
> [-Wignored-attributes]
> }; __aligned(64)
>    ^
> ./include/linux/compiler_types.h:200:38: note: expanded from macro
> '__aligned'
> #define __aligned(x)            __attribute__((aligned(x)))
>                                                ^
> 1 warning generated.
> 
> As Nick pointed out in the previous version of this patch, the author
> likely intended for this struct to be 8-byte (64-bit) aligned, not
> 64-byte, which is the default. Remove the hanging __aligned attribute.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-24 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 18:05 [PATCH] dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll Nathan Chancellor
2018-10-25 18:11 ` Nick Desaulniers
2018-10-25 18:14   ` Nathan Chancellor
2018-10-25 18:18     ` Nick Desaulniers
2018-11-24 13:41 ` Vinod Koul

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).