linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Vitaly Chikunov <vt@altlinux.org>
Cc: linux-hyperv@vger.kernel.org,
	Tianyu Lan <Tianyu.Lan@microsoft.com>,
	Michael Kelley <mikelley@microsoft.com>,
	Long Li <longli@microsoft.com>, Wei Liu <wei.liu@kernel.org>
Subject: Re: hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type
Date: Fri, 04 Feb 2022 10:33:33 +0100	[thread overview]
Message-ID: <874k5fascy.fsf@redhat.com> (raw)
In-Reply-To: <20220203235828.hcsj6najsl7yxmxa@altlinux.org>

Vitaly Chikunov <vt@altlinux.org> writes:

> Hi,
>
> There is new compilation error (for a second week for drm-tip[1] kernel):
>
>      CC [M]  drivers/hv/vmbus_drv.o
>    drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
>    static u64 vmbus_dma_mask = DMA_BIT_MASK(64);
> 			       ^~~~~~~~~~~~~~~~
>    ./include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
>    #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
> 							^ ~~~
>    1 error generated.
>
> I understand this looks like possible GCC (11.2.1) bug, but still it prevents
> building kernel with CONFIG_HYPERV.

It seems DMA_BIT_MASK(64) is very common:

$ git grep DMA_BIT_MASK\(64\) | wc -l
230

Is Hyper-V vmbus_drv the only victim? What happens if you replace
'DMA_BIT_MASK(64)' with '~0ULL', does the rest of the drivers compile
normally?

-- 
Vitaly


      reply	other threads:[~2022-02-04  9:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 23:58 hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type Vitaly Chikunov
2022-02-04  9:33 ` Vitaly Kuznetsov [this message]

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=874k5fascy.fsf@redhat.com \
    --to=vkuznets@redhat.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mikelley@microsoft.com \
    --cc=vt@altlinux.org \
    --cc=wei.liu@kernel.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;
as well as URLs for NNTP newsgroup(s).