Re: [linux-sunxi] Re: [PATCH v2 1/8] mfd: AXP20x: Add mfd driver for AXP20x PMIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, Mar 22, 2014 at 11:42:01AM -0700, Dmitry Torokhov wrote:
> On Sat, Mar 22, 2014 at 07:13:36PM +0100, Carlo Caione wrote:
> > On Sat, Mar 22, 2014 at 6:33 PM, Mark Brown <broonie@xxxxxxxxxx> wrote:
> > > On Sat, Mar 22, 2014 at 05:51:32PM +0100, Carlo Caione wrote:
> > >> On Tue, Mar 18, 2014 at 03:59:19PM +0000, Lee Jones wrote:
> > >
> > >> > > + of_id = of_match_device(axp20x_of_match, &i2c->dev);
> > >> > > + if (!of_id) {
> > >> > > +         dev_err(&i2c->dev, "Unable to setup AXP20X data\n");
> > >> > > +         return -ENODEV;
> > >> > > + }
> > >> > > + axp20x->variant = (int) of_id->data;
> > >
> > >> > No need to cast from void *.
> > >
> > >> My compiler says otherwise :)
> > >
> > > Are you sure your compiler isn't correctly telling you not to cast away
> > > const?  If the compiler is complaining about a cast on void then it's
> > > spotted a definite bug.
> > 
> > [resend since gmail decided to not put broonie in CC]
> > 
> > drivers/mfd/axp20x.c:172:18: warning: assignment makes integer
> > frompointer without a cast [enabled by default]
> 
> You need to cast to long, otherwise you will get warnings when compiling
> on 64 bit arches.

Actually no warning also with (int) cast.

-- 
Carlo Caione
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux