Re: return value warnings about scsi_add_host, anything in progre ss?
Matthew Wilcox wrote: I think you misunderstood my point. megaraid does not produce a warning about a missing return check when I compile it with gcc-3.4. Does it warn for you? If not, why did you include it in the list? I grepped the whole source tree and discared the locations where in the very same line the return value got obviousely used for something. I am not sure right now why megaraid got into the list. The listing was meant as a summary information where the described sitatuion might be present as well. I agree, i should have checked the lines in front of the statement for every single location, to avoid any false positives. I didnt do that. -Alex. - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: return value warnings about scsi_add_host, anything in progre ss?
On Monday, February 07, 2005 4:40 AM, Alex wrote: is anything going to happen with the below listed locations? (Some are part of the USB system, one is in block device, rest is SCSI.) Note that a few locations do still lack the XXX comment. I am asking because i am seeing ther respective warning anytime when i am checking the quality of a new linux kernel. And now i am wondering if there is already some work in progress or already pending in the queue for submitting to bitkeeper. Hi Alex, Can you please elaborate the issue and what you'd expect from it? Thanks, Seokmann LSI Logic Corporation. -Original Message- From: Alexander Stohr [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 4:40 AM To: linux-scsi@vger.kernel.org Subject: return value warnings about scsi_add_host, anything in progress? Hello, is anything going to happen with the below listed locations? (Some are part of the USB system, one is in block device, rest is SCSI.) Note that a few locations do still lack the XXX comment. I am asking because i am seeing ther respective warning anytime when i am checking the quality of a new linux kernel. And now i am wondering if there is already some work in progress or already pending in the queue for submitting to bitkeeper. -Alex. PS: i am not subscribed to that list, so please CC me on replys. Hunting answers via the list archives is not always successful. ./drivers/usb/image/hpusbscsi.c:112:scsi_add_host(new-host, intf-dev); /* XXX handle failure */ ./drivers/usb/image/microtek.c:812: scsi_add_host(new_desc-host, NULL); /* XXX handle failure */ ./drivers/scsi/arm/ecoscsi.c:208: scsi_add_host(host, NULL); /* XXX handle failure */ ./drivers/scsi/megaraid.c:4890: error = scsi_add_host(host, pdev-dev); ./drivers/scsi/aic7xxx/aic7xxx_osm.c:1732: scsi_add_host(host, (ahc-dev_softc ? ahc-dev_softc-dev : NULL)); /* XXX handle failure */ ./drivers/scsi/aic7xxx/aic79xx_osm.c:2068: scsi_add_host(host, ahd-dev_softc-dev); /* XXX handle failure */ ./drivers/scsi/pcmcia/fdomain_stub.c:226:scsi_add_host(host, NULL); /* XXX handle failure */ ./drivers/scsi/pcmcia/nsp_cs.c:1908:scsi_add_host (host, NULL); ./drivers/scsi/mac53c94.c:506: scsi_add_host(host, mdev-ofdev.dev); ./drivers/scsi/nsp32.c:2891:scsi_add_host (host, PCIDEV-dev); ./drivers/scsi/mesh.c:1963: scsi_add_host(mesh_host, mdev- ofdev.dev); ./drivers/scsi/aha1740.c:645: scsi_add_host (shpnt, dev); /* XXX handle failure */ ./drivers/scsi/BusLogic.c:2299: scsi_add_host(Host, NULL); ./drivers/block/cciss_scsi.c:709: scsi_add_host(sh, hba[ctlr]-pdev-dev); /* XXX handle failure * -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION Kein Einrichtungspreis nutzen: http://www.gmx.net/de/go/dsl - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: return value warnings about scsi_add_host, anything in progre ss?
On Mon, Feb 07, 2005 at 08:47:36AM -0500, Ju, Seokmann wrote: On Monday, February 07, 2005 4:40 AM, Alex wrote: is anything going to happen with the below listed locations? (Some are part of the USB system, one is in block device, rest is SCSI.) Note that a few locations do still lack the XXX comment. I am asking because i am seeing ther respective warning anytime when i am checking the quality of a new linux kernel. And now i am wondering if there is already some work in progress or already pending in the queue for submitting to bitkeeper. Hi Alex, Can you please elaborate the issue and what you'd expect from it? include/scsi/scsi_host.h:extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *); If you have gcc 3.4 or higher, __must_check is defined as: include/linux/compiler-gcc3.h:#define __must_check __attribute__((warn_unused_result)) `warn_unused_result' The `warn_unused_result' attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is useful for functions where not checking the result is either a security problem or always a bug, such as `realloc'. ie these drivers need to be fixed to use the return value from scsi_add_host(). I'm not sure why returning the result doesn't count as a use of the result (in the case of megaraid). Thanks, Seokmann LSI Logic Corporation. -Original Message- From: Alexander Stohr [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 4:40 AM To: linux-scsi@vger.kernel.org Subject: return value warnings about scsi_add_host, anything in progress? Hello, is anything going to happen with the below listed locations? (Some are part of the USB system, one is in block device, rest is SCSI.) Note that a few locations do still lack the XXX comment. I am asking because i am seeing ther respective warning anytime when i am checking the quality of a new linux kernel. And now i am wondering if there is already some work in progress or already pending in the queue for submitting to bitkeeper. -Alex. PS: i am not subscribed to that list, so please CC me on replys. Hunting answers via the list archives is not always successful. ./drivers/usb/image/hpusbscsi.c:112:scsi_add_host(new-host, intf-dev); /* XXX handle failure */ ./drivers/usb/image/microtek.c:812: scsi_add_host(new_desc-host, NULL); /* XXX handle failure */ ./drivers/scsi/arm/ecoscsi.c:208: scsi_add_host(host, NULL); /* XXX handle failure */ ./drivers/scsi/megaraid.c:4890: error = scsi_add_host(host, pdev-dev); ./drivers/scsi/aic7xxx/aic7xxx_osm.c:1732: scsi_add_host(host, (ahc-dev_softc ? ahc-dev_softc-dev : NULL)); /* XXX handle failure */ ./drivers/scsi/aic7xxx/aic79xx_osm.c:2068: scsi_add_host(host, ahd-dev_softc-dev); /* XXX handle failure */ ./drivers/scsi/pcmcia/fdomain_stub.c:226:scsi_add_host(host, NULL); /* XXX handle failure */ ./drivers/scsi/pcmcia/nsp_cs.c:1908:scsi_add_host (host, NULL); ./drivers/scsi/mac53c94.c:506: scsi_add_host(host, mdev-ofdev.dev); ./drivers/scsi/nsp32.c:2891:scsi_add_host (host, PCIDEV-dev); ./drivers/scsi/mesh.c:1963: scsi_add_host(mesh_host, mdev- ofdev.dev); ./drivers/scsi/aha1740.c:645: scsi_add_host (shpnt, dev); /* XXX handle failure */ ./drivers/scsi/BusLogic.c:2299: scsi_add_host(Host, NULL); ./drivers/block/cciss_scsi.c:709: scsi_add_host(sh, hba[ctlr]-pdev-dev); /* XXX handle failure * -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION Kein Einrichtungspreis nutzen: http://www.gmx.net/de/go/dsl - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html -- Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception. -- Mark Twain - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: return value warnings about scsi_add_host, anything in progre ss?
On Monday, February 07, 2005 11:29 AM, Matthew wrote: I don't get a warning from this line, using gcc 3.4.4 20041218 (prerelease) (Debian 3.4.3-7): drivers/scsi/megaraid.c: In function `megadev_ioctl': drivers/scsi/megaraid.c:3626: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result Were you confused with that warning? Thank you for your comment. The driver being referred here is pretty old version and it's been quite while since LSI move forward to 2.10.9.x for 2.4 kernel support. Please upgrade the driver to 2.10.9.x. Thanks, - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: return value warnings about scsi_add_host, anything in progre ss?
On Mon, Feb 07, 2005 at 04:10:22PM +, Matthew Wilcox wrote: I'm not sure why returning the result doesn't count as a use of the result (in the case of megaraid). From: Alexander Stohr [mailto:[EMAIL PROTECTED] ./drivers/scsi/megaraid.c:4890: error = scsi_add_host(host, pdev-dev); I don't get a warning from this line, using gcc 3.4.4 20041218 (prerelease) (Debian 3.4.3-7): drivers/scsi/megaraid.c: In function `megadev_ioctl': drivers/scsi/megaraid.c:3626: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result Were you confused with that warning? My main concern was the adaptec aic7 and aic9 series, and i am aware that a one-time loading device should have good chances to succeed, i dont call it critical for my particular application case (some few Gigs main memory). But as the very same problem exists all over the place, even in USB devices - which can be plugged and unplugged any now and then. Producing a memory leak of a few 10 to 100 kB on every plug and remove is nothing really acceptable for a system that is expected to have longer uptimes. So if there are some solutions out there for getting the return value interpreted and in the error case the device registering canceled, then i asked if the respective coders and maintainers could pop up for getting thoses messages removed from the compiler`s output. Can you please? I just dont want to duplicate any works here, or much worser code something that no one with a better understanding would ever integrate into the kernel. -Alex. - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html