Re: [PATCH] hwmon: (pc87360) Fix device resource declaration

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

 





On Wed, Aug 11, 2010 at 6:59 AM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
Hi Jim,

On Sat, 7 Aug 2010 05:23:20 -0600, Jim Cromie wrote:
> On Wed, Jul 7, 2010 at 6:58 AM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
>
> > It's not OK to call platform_device_add_resources() multiple times
> > in a row. Despite its name, this functions sets the resources, it
> > doesn't add them. So we have to prepare an array with all the

snip
 
> I applied this patch, and it built w/o errors. 
> Howver I have some distro (voyage 0.6.5) vs kernel issues
> to resolve before I have a solid testing env.
> It looks like 2.6.35 doesnt like udev 145, which shipped along with 2.6.30
> kernel
>
> [   11.252182] udev: starting version 145
> [   11.252232] <3>udev: missing sysfs features; please update the kernel or
> disable the kernel's CONFIG_SYSFS_DEPRECATED option; udev may fail to work
> correctly

I can't help you much with this, I'm afraid. Just try what they say...

FTR - udev 145 is added into the initramfs file from my laptop, 
not from voyage-linux.  So I should be able to fix this and test soon.

 > In the meantime, it looks like res_count isnt initialized before 1st use.
>
> Oddly, gcc doesnt complain about this,
> is this somehow hidden by zeroed memory due to __init on the function ??

This is indeed a bug, thanks a lot for finding and reporting it. It's
fixed now.


WRT lack of uninit-var warning,

[jimc@harpo sk1]$ make V=1 drivers/hwmon/pc87360.ko
...
  gcc -Wp,-MD,drivers/hwmon/.pc87360.o.d  -nostdinc -isystem /usr/lib/gcc/i686-redhat-linux/4.4.4/include -I/home/jimc/lx/linux-2.6.git/arch/x86/include -Iinclude  -I/home/jimc/lx/linux-2.6.git/include -include include/generated/autoconf.h  -I/home/jimc/lx/linux-2.6.git/drivers/hwmon -Idrivers/hwmon -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=pentium-mmx -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pc87360)"  -D"KBUILD_MODNAME=KBUILD_STR(pc87360)"  -c -o drivers/hwmon/pc87360.o /home/jimc/lx/linux-2.6.git/drivers/hwmon/pc87360.c
make -f /home/jimc/lx/linux-2.6.git/scripts/Makefile.modpost
  scripts/mod/modpost   -o /home/jimc/lx/sk1/Module.symvers    -S   -s
WARNING: modpost: Found 21 section mismatch(es).

-Wuninitialized  is not in there (explaining lack of warnings)

is this a local config problem, or has it somehow dropped out of the Kconfig process ?
or was it never in there (seems unlikely) ?

also, regarding your patch, is there a real need for res_count at all ?
IOW, why not this (abbreviated) ?

- res[res_count].start = extra_isa[i];
+ res[i].start = extra_isa[i];
...
- err = platform_device_add_resources(pdev, res, res_count);
+ err = platform_device_add_resources(pdev, res, --i);

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux