Linux CXL
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: alison.schofield@intel.com, Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	linux-cxl@vger.kernel.org
Subject: Re: [PATCH] cxl/mbox: Remove useless cast in cxl_mem_create_range_info()
Date: Mon, 7 Aug 2023 17:28:00 +0300	[thread overview]
Message-ID: <ZND/cKkWvby8hPl6@smile.fi.intel.com> (raw)
In-Reply-To: <20230807143334.00005448@Huawei.com>

On Mon, Aug 07, 2023 at 02:33:34PM +0100, Jonathan Cameron wrote:
> On Fri,  4 Aug 2023 12:03:09 -0700
> alison.schofield@intel.com wrote:
> 
> > From: Alison Schofield <alison.schofield@intel.com>
> > 
> > DEFINE_RES_MEM() returns a struct resource so the cast is not needed.
> > Remove it.

> Good to call out this is a result of Andy's cleanup
> 
> 42c4211f1 ("resource: Convert DEFINE_RES_NAMED() to be a compound literal")
> 
> I thought we'd long caught all of these (IIRC there were a few at the time).
> Ah well.

We caught only compile-time errors. The "casting" of the compound literal is
only a warning which doesn't affect code generation.

Btw, Alison, the commit message should really be more clear about those macros.
They are compound literals, which are associated with the corresponding data
type. It's not a cast there, but only on the side of the user. I'm not a native
speaker to suggest on how to amend, maybe Jonathan can help?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-08-07 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 19:03 [PATCH] cxl/mbox: Remove useless cast in cxl_mem_create_range_info() alison.schofield
2023-08-07 13:33 ` Jonathan Cameron
2023-08-07 14:28   ` Andy Shevchenko [this message]
2023-08-15 16:46     ` Alison Schofield

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=ZND/cKkWvby8hPl6@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.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