Skip to contentSkip to conversation

dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll

PATCH Applied Nathan Chancellor 3 participants 5 messages Oct 25, 2018 – Nov 24, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll

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")
---
 drivers/dma/xilinx/zynqmp_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/zynqmp_dma.c +1 -1
index c74a88b65039..73de6a6179fc 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · 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'

Quoted 7 lines
#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~
Quoted 6 lines
Fixes b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")

---

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.

Quoted 19 lines
 drivers/dma/xilinx/zynqmp_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/zynqmp_dma.c +1 -2
index c74a88b65039..73de6a6179fc 100644
@@ -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

#2 lore raw
Quoted 35 lines · Nick Desaulniers
Quoted 10 lines · 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'

Quoted 7 lines
#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~
Quoted 6 lines
Fixes b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")

---

Quoted 5 lines

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!

Quoted 3 lines

Thanks for the patch.

Thanks for the review!
Nathan

Quoted 24 lines
Quoted 19 lines
 drivers/dma/xilinx/zynqmp_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/zynqmp_dma.c +1 -2
index c74a88b65039..73de6a6179fc 100644
@@ -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

Signature · 2 lines
Thanks,
~Nick Desaulniers
#3 lore raw
Quoted 37 lines · Nathan Chancellor
Quoted 35 lines · Nick Desaulniers
Quoted 10 lines · 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'

Quoted 7 lines
#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~
Quoted 6 lines
Fixes b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")

---

Quoted 8 lines
Quoted 5 lines

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.

Quoted 32 lines
Quoted 4 lines

Thanks for the patch.

Thanks for the review!
Nathan

Quoted 24 lines
Quoted 17 lines
 drivers/dma/xilinx/zynqmp_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/zynqmp_dma.c +1 -2
index c74a88b65039..73de6a6179fc 100644
@@ -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
--
Quoted 2 lines

2.19.1

--
Thanks,
~Nick Desaulniers

maintainer Applied
#4 lore raw
In reply to Nathan Chancellor
Quoted 9 lines · 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'

Quoted 7 lines
#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