linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Yunfei Dong <yunfei.dong@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev, linux-staging@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 1/3] media: cx231xx: Convert enum into a define
Date: Thu, 20 Feb 2025 17:25:21 +0200	[thread overview]
Message-ID: <Z7dJYemMR-mgZXG6@smile.fi.intel.com> (raw)
In-Reply-To: <55389b80-9f0e-4423-8e92-c486de058720@xs4all.nl>

On Thu, Feb 20, 2025 at 04:12:38PM +0100, Hans Verkuil wrote:
> On 2/20/25 15:06, Andy Shevchenko wrote:
> > On Thu, Feb 20, 2025 at 02:55:42PM +0100, Hans Verkuil wrote:
> >> On 12/3/24 09:31, Mauro Carvalho Chehab wrote:

...

> >> ORing enums is really not a good idea: you would normally never do that, and
> > 
> > I think you missed a keyword "different", so "ORing different enums ..."
> > which I totally agree on, but the same enum values are fine.
> 
> While the compiler might be happy with that, I think ORing enums regardless
> is weird. It's not what enums are for.

I disagree. It's totally normal to have "mixed" enums where we have ranges of
sequential values mixed with bit flags. Cross-enum bit operations (and what
this patch is about) should be prohibited, indeed.

> >> the compiler warning is IMHO appropriate.

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2025-02-20 15:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 15:47 [PATCH 0/3] media: Fix warnings with llvm9 Ricardo Ribalda
2024-12-02 15:47 ` [PATCH 1/3] media: cx231xx: Convert enum into a define Ricardo Ribalda
2024-12-03  8:31   ` Mauro Carvalho Chehab
2025-02-20 13:55     ` Hans Verkuil
2025-02-20 14:06       ` Andy Shevchenko
2025-02-20 15:12         ` Hans Verkuil
2025-02-20 15:25           ` Andy Shevchenko [this message]
2024-12-02 15:47 ` [PATCH 2/3] media: atomisp: Use the actual value of the enum instead of the enum Ricardo Ribalda
2024-12-02 16:14   ` Andy Shevchenko
2024-12-02 15:47 ` [PATCH 3/3] media: mediatek: vcodec: Workaround a compiler warning Ricardo Ribalda
2024-12-02 16:24   ` Nathan Chancellor
2024-12-02 17:26     ` Ricardo Ribalda

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=Z7dJYemMR-mgZXG6@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=llvm@lists.linux.dev \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=yunfei.dong@mediatek.com \
    /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).