Re: [renesas-drivers:topic/renesas-overlays 23/92] drivers/of/dynamic.c:1141:13: sparse: incorrect type in assignment (different base types)

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

 



Hi Fengguang,

On Thu, Dec 14, 2017 at 10:37 PM, kbuild test robot
<fengguang.wu@xxxxxxxxx> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/renesas-overlays
> head:   47d433a558bb60587eb9f86a4d010ef74e03fa0d
> commit: e068b1eab7180587d15bbc55abdc5851b7f216dc [23/92] of: changesets: Introduce changeset helper methods
> reproduce:
>         # apt-get install sparse
>         git checkout e068b1eab7180587d15bbc55abdc5851b7f216dc
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>
> vim +1141 drivers/of/dynamic.c
>
>   1124
>   1125  /**
>   1126   * of_changeset_add_property_u32 - Create a new u32 property
>   1127   *
>   1128   * @ocs:        changeset pointer
>   1129   * @np:         device node pointer
>   1130   * @name:       name of the property
>   1131   * @val:        value in host endian format
>   1132   *
>   1133   * Adds a u32 property to the changeset.
>   1134   *
>   1135   * Returns zero on success, a negative error value otherwise.
>   1136   */
>   1137  int of_changeset_add_property_u32(struct of_changeset *ocs,
>   1138                  struct device_node *np, const char *name, u32 val)
>   1139  {
>   1140          /* in place */
>> 1141          val = cpu_to_be32(val);
>   1142          return of_changeset_add_property_copy(ocs, np, name, &val, sizeof(val));
>   1143  }

Thank you, folding

+       __be32 x;
+
        /* in place */
-       val = cpu_to_be32(val);
-       return of_changeset_add_property_copy(ocs, np, name, &val, sizeof(val));
+       x = cpu_to_be32(val);
+       return of_changeset_add_property_copy(ocs, np, name, &x, sizeof(x));

into the offending commit.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux