Use BIT macro instead of (1 << HSDMA_GLO_BT_SHIFT)
Subsystems (2)
PATCH 1/1 Use BIT macro instead of (1 << HSDMA_GLO_BT_SHIFT)
This patch replaces (1 << HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the file drivers/staging/mt7621-dma/hsdma-mt7621.c .
--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/mt7621-dma/hsdma-mt7621.c +2 -3
@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)
@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev); }static inline struct mtk_hsdma_chan *to_mtk_hsdma_chan (struct dma_chan *c)
Signature · 1 line
2.25.1
Greg KH
maintainerQuoted 35 lines · Krish Jain
This patch replaces (1 <<
HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the filedrivers/staging/mt7621-dma/hsdma-mt7621.c.Signed-off-by Krish Jain <[email protected]>--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/mt7621-dma/hsdma-mt7621.c +2
-3@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev); }static inline struct mtk_hsdma_chan *to_mtk_hsdma_chan (struct dma_chan *c)Signature · 1 line
2.25.1
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.
- You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what a proper Subject: line should look like.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Hi. How do I fix this issue, Greg? Thanks.
Best Regards
Quoted 73 lines · Greg KH
Quoted 32 lines · Krish Jain
This patch replaces (1 <<
HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the filedrivers/staging/mt7621-dma/hsdma-mt7621.c.Signed-off-by Krish Jain <[email protected]>--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/mt7621-dma/hsdma-mt7621.c +2
-4@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev); }static inline struct mtk_hsdma_chan *to_mtk_hsdma_chan (struct dma_chan *c) --Quoted 3 lines
2.25.1
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.
- You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatchesfor what a proper Subject: line should look like.If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Quoted 80 lines · Krish Jain
Hi. How do I fix this issue, Greg? Thanks.
Best Regards
Quoted 73 lines · Greg KH
Quoted 32 lines · Krish Jain
This patch replaces (1 <<
HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the filedrivers/staging/mt7621-dma/hsdma-mt7621.c.Signed-off-by Krish Jain <[email protected]>--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/mt7621-dma/hsdma-mt7621.c +2
-4@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev); }static inline struct mtk_hsdma_chan *to_mtk_hsdma_chan (struct dma_chan *c) --Quoted 3 lines
2.25.1
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.
- You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatchesfor what a proper Subject: line should look like.If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Oops, muscle memory, sorry for top posting. "How do I fix this issue, Greg? Thanks."
Best Regards
Greg KH
maintainerQuoted 78 lines · Krish Jain
Quoted 77 lines · Krish Jain
Hi. How do I fix this issue, Greg? Thanks.
Best Regards
Quoted 70 lines · Greg KH
Quoted 32 lines · Krish Jain
This patch replaces (1 <<
HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the filedrivers/staging/mt7621-dma/hsdma-mt7621.c.Signed-off-by Krish Jain <[email protected]>--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/mt7621-dma/hsdma-mt7621.c +2
-4@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev); }static inline struct mtk_hsdma_chan *to_mtk_hsdma_chan (struct dma_chan *c) --Quoted 3 lines
2.25.1
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.
- You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatchesfor what a proper Subject: line should look like.If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
thanks,
greg k-h's patch email bot
Oops, muscle memory, sorry for top posting. "How do I fix this issue, Greg? Thanks."
Did you read the above text from the bot? What specific suggestions there did you try and not agree with?
thanks,
greg k-h
The subject is wrong. It doesn't have the subsystem prefix.
Quoted 1 line · Krish Jain
This patch replaces (1 <<
HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the filedrivers/staging/mt7621-dma/hsdma-mt7621.c.'
Run checkpatch on your patches.
Quoted 12 lines
Signed-off-by Krish Jain <[email protected]>--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/mt7621-dma/hsdma-mt7621.c +0
-0
drivers/staging/mt7621-dma/hsdma-mt7621.c line 77
Quoted 7 lines
drivers/staging/mt7621-dma/hsdma-mt7621.c +1
-1@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)
No. This block doesn't make sense now because one line is weird. Just leave it. Checkpatch is wrong here because it only analyzes one line at a time.
drivers/staging/mt7621-dma/hsdma-mt7621.c struct mtk_hsdam_engine { · line 167
Quoted 8 lines
drivers/staging/mt7621-dma/hsdma-mt7621.c +1
-2@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev);
This is fine but it needs to be in a separate commit.
drivers/staging/mt7621-dma/hsdma-mt7621.c struct mtk_hsdam_engine { · line 168
Quoted 1 line
drivers/staging/mt7621-dma/hsdma-mt7621.c +0
-0}
regards,
dan carpenter
Quoted 7 lines · Dan Carpenter
The subject is wrong. It doesn't have the subsystem prefix.
Quoted 1 line · Krish Jain
This patch replaces (1 <<
HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the filedrivers/staging/mt7621-dma/hsdma-mt7621.c.'Run checkpatch on your patches.
Noted.
Quoted 14 lines
Quoted 14 lines
Signed-off-by Krish Jain <[email protected]>--- drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/mt7621-dma/hsdma-mt7621.c +0
-0@@ -72,7 +72,7 @@#define HSDMA_GLO_TX_DMA BIT(0)
Quoted 9 lines
drivers/staging/mt7621-dma/hsdma-mt7621.c line 77
Quoted 5 lines
drivers/staging/mt7621-dma/hsdma-mt7621.c +1
-1#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) -#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) +#define HSDMA_BT_SIZE_32BYTES BIT(HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT)#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT)No. This block doesn't make sense now because one line is weird. Just leave it. Checkpatch is wrong here because it only analyzes one line at a time.
How can I fix this then?
Quoted 12 lines
drivers/staging/mt7621-dma/hsdma-mt7621.c struct mtk_hsdam_engine { · line 167
Quoted 8 lines
drivers/staging/mt7621-dma/hsdma-mt7621.c +1
-2@@ -164,8 +164,7 @@ struct mtk_hsdam_engine {static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev (struct mtk_hsdma_chan *chan) { - return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, - ddev); + return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev);This is fine but it needs to be in a separate commit.
Quoted 1 line
drivers/staging/mt7621-dma/hsdma-mt7621.c +0
-0}
Ok, this is already being worked on as a separate commit.
Quoted 3 lines
regards,
dan carpenter
Thanks.
Best Regards,
Krish