llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-omap@vger.kernel.org, Dhruva Gole <d-gole@ti.com>,
	Nishanth Menon <nm@ti.com>
Subject: Re: [tmlind-omap:omap-for-v6.6/ti-sysc 3/5] drivers/bus/ti-sysc.c:3107:19: warning: cast to smaller integer type 'enum sysc_soc' from 'const void *'
Date: Tue, 15 Aug 2023 08:45:28 +0300	[thread overview]
Message-ID: <20230815054528.GQ11676@atomide.com> (raw)
In-Reply-To: <20230815053948.GP11676@atomide.com>

* Tony Lindgren <tony@atomide.com> [230815 08:39]:
> * kernel test robot <lkp@intel.com> [230814 23:20]:
> > Hi Tony,
> > 
> > First bad commit (maybe != root cause):
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git omap-for-v6.6/ti-sysc
> > head:   40a4f49cd32dbc641c706215c1fa6c5bd051428c
> > commit: 063dc0622705623b3a70739b9f33d5ea019882e6 [3/5] bus: ti-sysc: Build driver for TI K3 SoCs
> > config: arm64-randconfig-r006-20230815 (https://download.01.org/0day-ci/archive/20230815/202308150723.ziuGCdM3-lkp@intel.com/config)
> > compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> > reproduce: (https://download.01.org/0day-ci/archive/20230815/202308150723.ziuGCdM3-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202308150723.ziuGCdM3-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > >> drivers/bus/ti-sysc.c:3107:19: warning: cast to smaller integer type 'enum sysc_soc' from 'const void *' [-Wvoid-pointer-to-enum-cast]
> >     3107 |                 sysc_soc->soc = (enum sysc_soc)match->data;
> >          |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >    1 warning generated.
> 
> Thanks seems we need to do (enum sysc_soc)(unsigned long)match->data or just
> (unsigned long)match->data.

Actually seems (enum sysc_soc)(uintptr_t)match->data is what is used in
similar places based on git grep " = (enum " | grep ')('.

Regards,

Tony

      reply	other threads:[~2023-08-15  5:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 23:20 [tmlind-omap:omap-for-v6.6/ti-sysc 3/5] drivers/bus/ti-sysc.c:3107:19: warning: cast to smaller integer type 'enum sysc_soc' from 'const void *' kernel test robot
2023-08-15  5:39 ` Tony Lindgren
2023-08-15  5:45   ` Tony Lindgren [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=20230815054528.GQ11676@atomide.com \
    --to=tony@atomide.com \
    --cc=d-gole@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nm@ti.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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).