From: David Miller <davem@davemloft.net>
To: natechancellor@gmail.com
Cc: Ariel.Elior@cavium.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ndesaulniers@google.com,
Dept-EngEverestLinuxL2@cavium.com, Tomer.Tayar@cavium.com
Subject: Re: [PATCH v2] qed: Avoid implicit enum conversion in qed_ooo_submit_tx_buffers
Date: Thu, 04 Oct 2018 09:58:45 -0700 (PDT) [thread overview]
Message-ID: <20181004.095845.964782412753569093.davem@davemloft.net> (raw)
In-Reply-To: <20181004163919.13972-1-natechancellor@gmail.com>
From: Nathan Chancellor <natechancellor@gmail.com>
Date: Thu, 4 Oct 2018 09:39:20 -0700
> Clang warns when one enumerated type is implicitly converted to another.
>
> drivers/net/ethernet/qlogic/qed/qed_ll2.c:799:32: warning: implicit
> conversion from enumeration type 'enum core_tx_dest' to different
> enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion]
> tx_pkt.tx_dest = p_ll2_conn->tx_dest;
> ~ ~~~~~~~~~~~~^~~~~~~
> 1 warning generated.
>
> Fix this by using a switch statement to convert between the enumerated
> values since they are not 1 to 1, which matches how the rest of the
> driver handles this conversion.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/125
> Suggested-by: Tomer Tayar <Tomer.Tayar@cavium.com>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> v1 -> v2:
>
> * Use an explicit switch statement to convert between the enumerated
> types like the rest of the driver, as suggested by Tomer.
Applied to net-next.
prev parent reply other threads:[~2018-10-04 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 0:09 [PATCH] qed: Remove unneeded enumerated type core_tx_dest Nathan Chancellor
2018-10-04 16:23 ` Tayar, Tomer
2018-10-04 16:27 ` Nathan Chancellor
2018-10-04 16:39 ` [PATCH v2] qed: Avoid implicit enum conversion in qed_ooo_submit_tx_buffers Nathan Chancellor
2018-10-04 16:46 ` Tayar, Tomer
2018-10-04 16:58 ` David Miller [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=20181004.095845.964782412753569093.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Ariel.Elior@cavium.com \
--cc=Dept-EngEverestLinuxL2@cavium.com \
--cc=Tomer.Tayar@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.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
all inboxes | Powered by JetHome®