Hi Corentin, 

於 一,2010-12-06 於 08:17 +0100,Corentin Chary 提到:
> >>
> >> Just noticed - this function (and others similar to this in your
> >> subsequent patces) mixes acpi-style return values (acpi_status) with
> >> Linux ones (-ERRXXX). You need to pick one standard (I'd advocate Linux
> >> style) and stick with it.
> >>
> >
> > Thank's for your review and suggestion, I choice use acpi-style because
> > it don't need change too much and old functions in acer-wmi also follow
> > acpi-style.
> > I replaced the -EINVAL with AE_ERROR, the following is new patch. If it's 
> > OK,
> > I will modify patch 2/4 and patch 3/4 then re-send patchset again.
> >
> >
> 
> But if you use acpi-style errors won't be able to go back to the user (errno)
> and userspace programs won't be able to display appropriate errors (on 
> modprobe,
> manipulating sysfs files, etc...). I didn't read the code, so it may
> not be an issue here,

Yes, those functions are internal used in acer-wmi, and acer_wmi_init
function will transfer all ACPI error to Linux style then send to
userland.
So, yes, there have no any issue even mix 2 different style return
value.

> but you should check that meaningful error codes are sent back to userspace.
> 

I still replaced the -EINVAL with AE_ERROR because those 2 functions
declare return a acpi_status.


Thank's a lot!
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to