Skip to contentSkip to conversation

gpio:Fix build warning about void to integer cast in the function mmio_74xx_gpio_probe

PATCH Linus Walleij 2 participants 3 messages Jul 16, 2015 – Aug 17, 2015 3 messages not in the archive GPIO

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · Nicholas Krause

This fixes the build warning , warning: cast from pointer to integer of different size when building this file on a x86 allmodconfig configuration. In order for me to fix this build warning I changed the cast in the function mmio_74xx_gpio_probe from casting the variable data of the stucture pointer of_id to uintptr_t rather then unsigned when assigning to the variable flag of the structure pointer priv of the structure type mmio_74xx_gpio_priv.

Patch applied with some tweaks to the long subject line.

Yours,
Linus Walleij

#3 lore raw
In reply to a message not in the archive
Quoted 16 lines · nick
Quoted 13 lines · Linus Walleij
Quoted 10 lines · Nicholas Krause

This fixes the build warning , warning: cast from pointer to integer of different size when building this file on a x86 allmodconfig configuration. In order for me to fix this build warning I changed the cast in the function mmio_74xx_gpio_probe from casting the variable data of the stucture pointer of_id to uintptr_t rather then unsigned when assigning to the variable flag of the structure pointer priv of the structure type mmio_74xx_gpio_priv.

Quoted 7 lines
Quoted 5 lines

Patch applied with some tweaks to the long subject line.

Yours,
Linus Walleij

Sorry about that I kinda suck at commit messages if you would like to some me the edit so I can get better at it, that would be helpful.

As explained in Documentation/SubmittingPatches: (probably a good idea to re-read that document)

"For these reasons, the "summary" must be no more than 70-75 characters, and it must describe both what the patch changes, as well as why the patch might be necessary. It is challenging to be both succinct and descriptive, but that is what a well-written summary should do."

Your patch subject line should not be longer than 70-75 characters. If you need to be more extensive, do so in the first paragraph of your commit log.

#5 lore raw
In reply to a message not in the archive
Quoted 18 lines · nick
Quoted 15 lines · Linus Walleij
Quoted 10 lines · Nicholas Krause

This fixes the build warning , warning: cast from pointer to integer of different size when building this file on a x86 allmodconfig configuration. In order for me to fix this build warning I changed the cast in the function mmio_74xx_gpio_probe from casting the variable data of the stucture pointer of_id to uintptr_t rather then unsigned when assigning to the variable flag of the structure pointer priv of the structure type mmio_74xx_gpio_priv.

Patch applied with some tweaks to the long subject line.

Quoted 7 lines
Quoted 3 lines

Yours,
Linus Walleij

Linus,
After searching through your git tree for gpio subsystem I haven't found this patch merged yet. Is there any reason for that or should I just resend.

I can see this patch in both Linus' for-next branch
(git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
for-next), and linux-next. Always check linux-next first.