Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: benjamin.gaignard@collabora.com
Cc: linux-rockchip@lists.infradead.org
Subject: [bug report] iommu: rockchip: Add support for iommu v2
Date: Fri, 18 Jun 2021 12:15:47 +0300	[thread overview]
Message-ID: <YMxkQ2Xn9g5DSEBO@mwanda> (raw)

Hello Benjamin Gaignard,

The patch c55356c534aa: "iommu: rockchip: Add support for iommu v2"
from Jun 4, 2021, leads to the following static checker warning:

	drivers/iommu/rockchip-iommu.c:552 rk_dte_addr_phys_v2()
	warn: potential shift truncation.  '0xff00000000 (0,4294967296-1095216660480) << 28'

drivers/iommu/rockchip-iommu.c
   544  }
   545  
   546  #define DT_HI_MASK GENMASK_ULL(39, 32)
                           ^^^^^^^^^^^^^^^^^^^

   547  #define DT_SHIFT   28
   548  
   549  static inline phys_addr_t rk_dte_addr_phys_v2(u32 addr)
   550  {
   551          return (phys_addr_t)(addr & RK_DTE_PT_ADDRESS_MASK) |
   552                 ((addr & DT_HI_MASK) << DT_SHIFT);
                         ^^^^^^^^^^^^^^^^^
Is addr supposed to be a u64?

   553  }

regards,
dan carpenter

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

             reply	other threads:[~2021-06-18  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  9:15 Dan Carpenter [this message]
2021-06-18 10:01 ` [bug report] iommu: rockchip: Add support for iommu v2 Benjamin Gaignard
2021-06-18 10:26 ` Robin Murphy

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=YMxkQ2Xn9g5DSEBO@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=linux-rockchip@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox