All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: linux-kernel@vger.kernel.org, Martin Liska <mliska@suse.cz>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/srp (gcc13): move large values to a new enum
Date: Mon, 12 Dec 2022 11:28:06 -0800	[thread overview]
Message-ID: <e5dfd705-4d46-f965-6772-4de51798d2ca@acm.org> (raw)
In-Reply-To: <20221212120411.13750-1-jirislaby@kernel.org>

On 12/12/22 04:04, Jiri Slaby (SUSE) wrote:
> Since gcc13, each member of an enum has the same type as the enum [1]. And
> that is inherited from its members. Provided these two:
>    SRP_TAG_NO_REQ        = ~0U,
>    SRP_TAG_TSK_MGMT	= 1U << 31
> all other members are unsigned ints.
> 
> Esp. with SRP_MAX_SGE and SRP_TSK_MGMT_SQ_SIZE and their use in min(),
> this results in the following warnings:
>    include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast
>    drivers/infiniband/ulp/srp/ib_srp.c:563:42: note: in expansion of macro 'min'
> 
>    include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast
>    drivers/infiniband/ulp/srp/ib_srp.c:2369:27: note: in expansion of macro 'min'
> 
> So move the large values away to a separate enum, so that they don't
> affect other members.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>


  reply	other threads:[~2022-12-12 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 12:04 [PATCH v2] RDMA/srp (gcc13): move large values to a new enum Jiri Slaby (SUSE)
2022-12-12 19:28 ` Bart Van Assche [this message]
2022-12-29  7:10 ` Leon Romanovsky

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=e5dfd705-4d46-f965-6772-4de51798d2ca@acm.org \
    --to=bvanassche@acm.org \
    --cc=jgg@ziepe.ca \
    --cc=jirislaby@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mliska@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.