From: David Laight <David.Laight@ACULAB.COM>
To: "'minyard@acm.org'" <minyard@acm.org>,
Justin Stitt <justinstitt@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
"openipmi-developer@lists.sourceforge.net"
<openipmi-developer@lists.sourceforge.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>,
Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>
Subject: RE: [PATCH] ipmi_si: fix -Wvoid-pointer-to-enum-cast warning
Date: Tue, 15 Aug 2023 11:19:50 +0000 [thread overview]
Message-ID: <85c5e4b69dbb4ff699f380b373f6440f@AcuMS.aculab.com> (raw)
In-Reply-To: <ZNaZrHEs5FP7Lf8A@mail.minyard.net>
From: Corey Minyard
> Sent: 11 August 2023 21:27
...
> > memset(&io, 0, sizeof(io));
> > - io.si_type = (enum si_type) match->data;
> > + io.si_type = (unsigned long) match->data;
>
> Wouldn't you want to use intptr_t or uintptr_t?
The kernel tends to use 'long' for the same reason
it doesn't use uint8_t.
Although I'm sure the correct/better fix is to either add variants
of the match/lookup functions that return (say) unsigned long
or change all the drivers to allocate a structure that contains
the required value.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-08-15 11:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 21:05 Justin Stitt
2023-08-11 20:27 ` Corey Minyard
2023-08-15 11:19 ` David Laight [this message]
2023-08-15 20:46 ` Corey Minyard
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=85c5e4b69dbb4ff699f380b373f6440f@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=arnd@arndb.de \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=minyard@acm.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=trix@redhat.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
all inboxes | Powered by JetHome®