Re: [PATCH 2/4] Enabled Acer Launch Manager mode

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

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux