public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL" failed to apply to 6.12-stable tree
@ 2024-12-27 16:02 gregkh
  2024-12-30  1:39 ` [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL Binbin Zhou
  0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2024-12-27 16:02 UTC (permalink / raw)
  To: zhoubinbin, dan.carpenter, vkoul; +Cc: stable


The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 4b65d5322e1d8994acfdb9b867aa00bdb30d177b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2024122721-badge-research-e542@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 4b65d5322e1d8994acfdb9b867aa00bdb30d177b Mon Sep 17 00:00:00 2001
From: Binbin Zhou <zhoubinbin@loongson.cn>
Date: Mon, 28 Oct 2024 17:34:13 +0800
Subject: [PATCH] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL

Fix the following smatch static checker warning:

drivers/dma/loongson2-apb-dma.c:189 ls2x_dma_write_cmd()
warn: was expecting a 64 bit value instead of '~(((0)) + (((~((0))) - (((1)) << (0)) + 1) & (~((0)) >> ((8 * 4) - 1 - (4)))))'

The GENMASK macro used "unsigned long", which caused build issues when
using a 32-bit toolchain because it would try to access bits > 31. This
patch switches GENMASK to GENMASK_ULL, which uses "unsigned long long".

Fixes: 71e7d3cb6e55 ("dmaengine: ls2x-apb: New driver for the Loongson LS2X APB DMA controller")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/87cdc025-7246-4548-85ca-3d36fdc2be2d@stanley.mountain/
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/20241028093413.1145820-1-zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>

diff --git a/drivers/dma/loongson2-apb-dma.c b/drivers/dma/loongson2-apb-dma.c
index 367ed34ce4da..c528f02b9f84 100644
--- a/drivers/dma/loongson2-apb-dma.c
+++ b/drivers/dma/loongson2-apb-dma.c
@@ -31,7 +31,7 @@
 #define LDMA_ASK_VALID		BIT(2)
 #define LDMA_START		BIT(3) /* DMA start operation */
 #define LDMA_STOP		BIT(4) /* DMA stop operation */
-#define LDMA_CONFIG_MASK	GENMASK(4, 0) /* DMA controller config bits mask */
+#define LDMA_CONFIG_MASK	GENMASK_ULL(4, 0) /* DMA controller config bits mask */
 
 /* Bitfields in ndesc_addr field of HW descriptor */
 #define LDMA_DESC_EN		BIT(0) /*1: The next descriptor is valid */


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

* [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
  2024-12-27 16:02 FAILED: patch "[PATCH] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL" failed to apply to 6.12-stable tree gregkh
@ 2024-12-30  1:39 ` Binbin Zhou
  2024-12-30  3:04   ` Sasha Levin
  2024-12-30  3:18   ` Sasha Levin
  0 siblings, 2 replies; 5+ messages in thread
From: Binbin Zhou @ 2024-12-30  1:39 UTC (permalink / raw)
  To: stable; +Cc: Binbin Zhou, Dan Carpenter, Vinod Koul

Fix the following smatch static checker warning:

drivers/dma/loongson2-apb-dma.c:189 ls2x_dma_write_cmd()
warn: was expecting a 64 bit value instead of '~(((0)) + (((~((0))) - (((1)) << (0)) + 1) & (~((0)) >> ((8 * 4) - 1 - (4)))))'

The GENMASK macro used "unsigned long", which caused build issues when
using a 32-bit toolchain because it would try to access bits > 31. This
patch switches GENMASK to GENMASK_ULL, which uses "unsigned long long".

Fixes: 71e7d3cb6e55 ("dmaengine: ls2x-apb: New driver for the Loongson LS2X APB DMA controller")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/87cdc025-7246-4548-85ca-3d36fdc2be2d@stanley.mountain/
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/20241028093413.1145820-1-zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
(cherry picked from commit 4b65d5322e1d8994acfdb9b867aa00bdb30d177b)
---
 drivers/dma/ls2x-apb-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ls2x-apb-dma.c b/drivers/dma/ls2x-apb-dma.c
index 9652e8666722..b4f18be62945 100644
--- a/drivers/dma/ls2x-apb-dma.c
+++ b/drivers/dma/ls2x-apb-dma.c
@@ -31,7 +31,7 @@
 #define LDMA_ASK_VALID		BIT(2)
 #define LDMA_START		BIT(3) /* DMA start operation */
 #define LDMA_STOP		BIT(4) /* DMA stop operation */
-#define LDMA_CONFIG_MASK	GENMASK(4, 0) /* DMA controller config bits mask */
+#define LDMA_CONFIG_MASK	GENMASK_ULL(4, 0) /* DMA controller config bits mask */
 
 /* Bitfields in ndesc_addr field of HW descriptor */
 #define LDMA_DESC_EN		BIT(0) /*1: The next descriptor is valid */
-- 
2.43.5


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

* Re: [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
  2024-12-30  1:39 ` [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL Binbin Zhou
@ 2024-12-30  3:04   ` Sasha Levin
  2024-12-30  3:18   ` Sasha Levin
  1 sibling, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-12-30  3:04 UTC (permalink / raw)
  To: stable; +Cc: Binbin Zhou, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

Found matching upstream commit: 4b65d5322e1d8994acfdb9b867aa00bdb30d177b


Status in newer kernel trees:
6.12.y | Not found

Note: The patch differs from the upstream commit:
---
1:  4b65d5322e1d ! 1:  c2210939eb07 dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
    @@ Commit message
         Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
         Link: https://lore.kernel.org/r/20241028093413.1145820-1-zhoubinbin@loongson.cn
         Signed-off-by: Vinod Koul <vkoul@kernel.org>
    +    (cherry picked from commit 4b65d5322e1d8994acfdb9b867aa00bdb30d177b)
     
    - ## drivers/dma/loongson2-apb-dma.c ##
    + ## drivers/dma/ls2x-apb-dma.c ##
     @@
      #define LDMA_ASK_VALID		BIT(2)
      #define LDMA_START		BIT(3) /* DMA start operation */
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.12.y       |  Success    |  Success   |

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

* Re: [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
  2024-12-30  1:39 ` [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL Binbin Zhou
  2024-12-30  3:04   ` Sasha Levin
@ 2024-12-30  3:18   ` Sasha Levin
  2024-12-30  3:27     ` 周彬彬
  1 sibling, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2024-12-30  3:18 UTC (permalink / raw)
  To: Binbin Zhou; +Cc: stable, Dan Carpenter, Vinod Koul

On Mon, Dec 30, 2024 at 09:39:19AM +0800, Binbin Zhou wrote:
>Fix the following smatch static checker warning:
>
>drivers/dma/loongson2-apb-dma.c:189 ls2x_dma_write_cmd()
>warn: was expecting a 64 bit value instead of '~(((0)) + (((~((0))) - (((1)) << (0)) + 1) & (~((0)) >> ((8 * 4) - 1 - (4)))))'
>
>The GENMASK macro used "unsigned long", which caused build issues when
>using a 32-bit toolchain because it would try to access bits > 31. This
>patch switches GENMASK to GENMASK_ULL, which uses "unsigned long long".
>
>Fixes: 71e7d3cb6e55 ("dmaengine: ls2x-apb: New driver for the Loongson LS2X APB DMA controller")
>Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
>Closes: https://lore.kernel.org/all/87cdc025-7246-4548-85ca-3d36fdc2be2d@stanley.mountain/
>Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
>Link: https://lore.kernel.org/r/20241028093413.1145820-1-zhoubinbin@loongson.cn
>Signed-off-by: Vinod Koul <vkoul@kernel.org>
>(cherry picked from commit 4b65d5322e1d8994acfdb9b867aa00bdb30d177b)

I'll queue it up, but please read
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3

-- 
Thanks,
Sasha

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

* Re: Re: [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
  2024-12-30  3:18   ` Sasha Levin
@ 2024-12-30  3:27     ` 周彬彬
  0 siblings, 0 replies; 5+ messages in thread
From: 周彬彬 @ 2024-12-30  3:27 UTC (permalink / raw)
  To: Sasha Levin; +Cc: stable, Dan Carpenter, Vinod Koul




> -----原始邮件-----
> 发件人: "Sasha Levin" <sashal@kernel.org>
> 发送时间:2024-12-30 11:18:48 (星期一)
> 收件人: "Binbin Zhou" <zhoubinbin@loongson.cn>
> 抄送: stable@vger.kernel.org, "Dan Carpenter" <dan.carpenter@linaro.org>, "Vinod Koul" <vkoul@kernel.org>
> 主题: Re: [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL
> 
> On Mon, Dec 30, 2024 at 09:39:19AM +0800, Binbin Zhou wrote:
> >Fix the following smatch static checker warning:
> >
> >drivers/dma/loongson2-apb-dma.c:189 ls2x_dma_write_cmd()
> >warn: was expecting a 64 bit value instead of '~(((0)) + (((~((0))) - (((1)) << (0)) + 1) & (~((0)) >> ((8 * 4) - 1 - (4)))))'
> >
> >The GENMASK macro used "unsigned long", which caused build issues when
> >using a 32-bit toolchain because it would try to access bits > 31. This
> >patch switches GENMASK to GENMASK_ULL, which uses "unsigned long long".
> >
> >Fixes: 71e7d3cb6e55 ("dmaengine: ls2x-apb: New driver for the Loongson LS2X APB DMA controller")
> >Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> >Closes: https://lore.kernel.org/all/87cdc025-7246-4548-85ca-3d36fdc2be2d@stanley.mountain/
> >Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> >Link: https://lore.kernel.org/r/20241028093413.1145820-1-zhoubinbin@loongson.cn
> >Signed-off-by: Vinod Koul <vkoul@kernel.org>
> >(cherry picked from commit 4b65d5322e1d8994acfdb9b867aa00bdb30d177b)
> 
> I'll queue it up, but please read
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
> 

Hi Sasha:

Thanks for the heads up.
I apologize for my irregularity, although this is the first time I've submitted a patch to stable tree.
And I will read the documentation about this part carefully.

Thanks.
Binbin
> -- 
> Thanks,
> Sasha


本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 
This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it. 



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

end of thread, other threads:[~2024-12-30  3:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27 16:02 FAILED: patch "[PATCH] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL" failed to apply to 6.12-stable tree gregkh
2024-12-30  1:39 ` [PATCH 6.12.y] dmaengine: loongson2-apb: Change GENMASK to GENMASK_ULL Binbin Zhou
2024-12-30  3:04   ` Sasha Levin
2024-12-30  3:18   ` Sasha Levin
2024-12-30  3:27     ` 周彬彬

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox