mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Peter Mamonov <pmamonov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [RFC PATCH 15/15] i2c/muxes/i2c-mux-pca954x: fix private data retrieval for 64bit mode
Date: Thu, 17 May 2018 14:34:59 -0700	[thread overview]
Message-ID: <CAHQ1cqGBN7Gght6hMc+6dj7aGe2Mz-pvihhCvFeq31OAviUiyg@mail.gmail.com> (raw)
In-Reply-To: <20180517135858.16202-16-pmamonov@gmail.com>

On Thu, May 17, 2018 at 6:58 AM, Peter Mamonov <pmamonov@gmail.com> wrote:
> Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
> ---
>  drivers/i2c/muxes/i2c-mux-pca954x.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
> index 0d5515b71..395254cdc 100644
> --- a/drivers/i2c/muxes/i2c-mux-pca954x.c
> +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
> @@ -180,6 +180,7 @@ static int pca954x_probe(struct device_d *dev)
>         struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
>         int num, force;
>         struct pca954x *data;
> +       uintptr_t tmp;
>         int ret = -ENODEV;
>         int gpio;
>
> @@ -203,7 +204,8 @@ static int pca954x_probe(struct device_d *dev)
>                 goto exit_free;
>         }
>
> -       ret = dev_get_drvdata(dev, (const void **)&data->type);
> +       ret = dev_get_drvdata(dev, (const void **)&tmp);
> +       data->type = tmp;

Upstream Linux driver doesn't store "type", but the actual pointer to
"chip_desc". I think if you convert the driver to do that instead you
can avoid type width problems and not need helper variable minutiae.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-05-17 21:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 13:58 [RFC PATCH 00/15] MIPS64 support Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 01/15] FIXME: add t4..t7 definitions for MIPS64 Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 02/15] MIPS: use CKSEG1 instead of KSEG1 Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 03/15] FIXME: mips: fix copy_to_link_location for 64 bit mode Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 04/15] mips: fix warnings from CPHYSADDR() macro Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 05/15] mips: fix dma_sync_* stuff for MIPS64 Peter Mamonov
2018-05-18  5:57   ` Sascha Hauer
2018-05-18 15:24     ` Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 06/15] common/Kconfig: add PHYS_ADDR_T_64BIT option Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 07/15] mips: 64BIT selects PHYS_ADDR_T_64BIT Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 08/15] fixup! MIPS: import optimized string functions from Linux Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 09/15] MIPS: import 64-bit address conversion macros Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 10/15] common.h: fix IOMEM() for MIPS64 Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 11/15] resource: fix iomem root resource for 64 bit Peter Mamonov
2018-05-17 21:50   ` Andrey Smirnov
2018-05-18 11:07     ` Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 12/15] FIXME: commands/mem: fix /dev/mem size Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 13/15] FIXME: fs: fix memory access for 64bit MIPS Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 14/15] mtd: cfi-flash: fix write_buff() for 64BIT Peter Mamonov
2018-05-17 13:58 ` [RFC PATCH 15/15] i2c/muxes/i2c-mux-pca954x: fix private data retrieval for 64bit mode Peter Mamonov
2018-05-17 21:34   ` Andrey Smirnov [this message]
2018-05-18  5:49 ` [RFC PATCH 00/15] MIPS64 support Sascha Hauer

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=CAHQ1cqGBN7Gght6hMc+6dj7aGe2Mz-pvihhCvFeq31OAviUiyg@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=pmamonov@gmail.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