public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Dave Penkler <dpenkler@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: gpib: Fix i386 build issue
Date: Wed, 4 Dec 2024 13:01:51 +0100	[thread overview]
Message-ID: <Z1BEr4QEF3vPDo57@egonzo> (raw)
In-Reply-To: <Z07EtdJpe6mnKYOH@egonzo>

On Tue, Dec 03, 2024 at 09:43:33AM +0100, Dave Penkler wrote:
> On Mon, Dec 02, 2024 at 09:48:49AM -0800, Guenter Roeck wrote:
> > On 12/2/24 09:33, Dave Penkler wrote:
> > > Both drivers cast resource_type_t to void * causing the build to fail.
> > > 
> > > With CONFIG_X86_PAE enabled the resource_size_t type is a 64bit unsigned int
> > > which cannot be cast to a 32 bit pointer.
> > > 
> > > Use ioremap() instead of pci_resource_start()
> > > 
> > > Reported_by: Guenter Roeck <linux@roeck-us.net>
> > > Link: https://lore.kernel.org/all/f10e976e-7a04-4454-b38d-39cd18f142da@roeck-us.net/
> > > Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
> > > Fixes: e1339245eba3 ("staging: gpib: Add Computer Equipment Corporation GPIB driver")
> > > 
> > > Signed-off-by: Dave Penkler <dpenkler@gmail.com>
> > > ---
> > > v1 -> v2 changed pci_resource_start to pci_resource_len for second parameter of ioremap
> > > 
> > Sorry, there are some more.
> > 
> > drivers/staging/gpib/tnt4882/tnt4882_gpib.c: In function ???ni_isa_attach_common???:
> > drivers/staging/gpib/tnt4882/tnt4882_gpib.c:1430:26: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> > 
> > drivers/staging/gpib/cb7210/cb7210.c: In function 'cb_pci_attach':
> > drivers/staging/gpib/cb7210/cb7210.c:974:36: error: cast to pointer from integer of different size
> > 
> > Not sure if that really fixes the problem though, since there is other code
> > which maps the void * back to phys_addr_t (or, rather, to unsigned long).
> > It might be better to work around the problem for now by disabling support
> > for platforms where sizeof(phys_addr_t) > sizeof(void *).
> 
> I think it is dealt with in v3.
> - Dave
OK this does not work so I will submit a v4 which makes these
drivers depend on !X86_PAE
-Dave

      reply	other threads:[~2024-12-04 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 17:33 [PATCH v2] staging: gpib: Fix i386 build issue Dave Penkler
2024-12-02 17:48 ` Guenter Roeck
2024-12-03  8:43   ` Dave Penkler
2024-12-04 12:01     ` Dave Penkler [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=Z1BEr4QEF3vPDo57@egonzo \
    --to=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux@roeck-us.net \
    /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