2012-05-15 12:04:40

by Jan Beulich

[permalink] [raw]
Subject: [PATCH, resend] efivars: remove stray exports

There's no in-tree consumer, and the way they are currently prototyped
it doesn't look like they're really usable from anywhere but the base
EFI implementation.

Signed-off-by: Jan Beulich <[email protected]>

---
drivers/firmware/efivars.c | 13 ++++++-------
include/linux/efi.h | 5 -----
2 files changed, 6 insertions(+), 12 deletions(-)

--- 3.4-rc7/drivers/firmware/efivars.c
+++ 3.4-rc7-efivars/drivers/firmware/efivars.c
@@ -1039,7 +1039,7 @@ efivar_create_sysfs_entry(struct efivars
return 0;
}

-static int
+static int __init
create_efivars_bin_attributes(struct efivars *efivars)
{
struct bin_attribute *attr;
@@ -1098,7 +1098,7 @@ out_free:
return error;
}

-void unregister_efivars(struct efivars *efivars)
+static void unregister_efivars(struct efivars *efivars)
{
struct efivar_entry *entry, *n;

@@ -1116,11 +1116,11 @@ void unregister_efivars(struct efivars *
kfree(efivars->del_var);
kset_unregister(efivars->kset);
}
-EXPORT_SYMBOL_GPL(unregister_efivars);

-int register_efivars(struct efivars *efivars,
- const struct efivar_operations *ops,
- struct kobject *parent_kobj)
+static int __init
+register_efivars(struct efivars *efivars,
+ const struct efivar_operations *ops,
+ struct kobject *parent_kobj)
{
efi_status_t status = EFI_NOT_FOUND;
efi_guid_t vendor_guid;
@@ -1192,7 +1192,6 @@ out:

return error;
}
-EXPORT_SYMBOL_GPL(register_efivars);

static struct efivars __efivars;
static struct efivar_operations ops;
--- 3.4-rc7/include/linux/efi.h
+++ 3.4-rc7-efivars/include/linux/efi.h
@@ -655,11 +655,6 @@ struct efivars {
struct pstore_info efi_pstore_info;
};

-int register_efivars(struct efivars *efivars,
- const struct efivar_operations *ops,
- struct kobject *parent_kobj);
-void unregister_efivars(struct efivars *efivars);
-
#endif /* CONFIG_EFI_VARS */

#endif /* _LINUX_EFI_H */



2012-05-15 17:03:13

by Mike Waychison

[permalink] [raw]
Subject: Re: [PATCH, resend] efivars: remove stray exports

On Tue, May 15, 2012 at 10:01 AM, Mike Waychison <[email protected]> wrote:
> On Tue, May 15, 2012 at 5:55 AM, Matt Domsch <[email protected]> wrote:
>> On Tue, May 15, 2012 at 07:05:08AM -0500, Jan Beulich wrote:
>>> There's no in-tree consumer, and the way they are currently prototyped
>>> it doesn't look like they're really usable from anywhere but the base
>>> EFI implementation.
>>
>> Seems reasonable, copying Mike who created the code paths being
>> modified here.
>
> I'm using these in drivers/google/firmware/gsmi.c
>

drivers/firmware/google/gsmi.c even (sorry, just starting my day...)

>>
>>>
>>> Signed-off-by: Jan Beulich <[email protected]>
>>>
>>> ---
>>> ?drivers/firmware/efivars.c | ? 13 ++++++-------
>>> ?include/linux/efi.h ? ? ? ?| ? ?5 -----
>>> ?2 files changed, 6 insertions(+), 12 deletions(-)
>>>
>>> --- 3.4-rc7/drivers/firmware/efivars.c
>>> +++ 3.4-rc7-efivars/drivers/firmware/efivars.c
>>> @@ -1039,7 +1039,7 @@ efivar_create_sysfs_entry(struct efivars
>>> ? ? ? return 0;
>>> ?}
>>>
>>> -static int
>>> +static int __init
>>> ?create_efivars_bin_attributes(struct efivars *efivars)
>>> ?{
>>> ? ? ? struct bin_attribute *attr;
>>> @@ -1098,7 +1098,7 @@ out_free:
>>> ? ? ? return error;
>>> ?}
>>>
>>> -void unregister_efivars(struct efivars *efivars)
>>> +static void unregister_efivars(struct efivars *efivars)
>>> ?{
>>> ? ? ? struct efivar_entry *entry, *n;
>>>
>>> @@ -1116,11 +1116,11 @@ void unregister_efivars(struct efivars *
>>> ? ? ? kfree(efivars->del_var);
>>> ? ? ? kset_unregister(efivars->kset);
>>> ?}
>>> -EXPORT_SYMBOL_GPL(unregister_efivars);
>>>
>>> -int register_efivars(struct efivars *efivars,
>>> - ? ? ? ? ? ? ? ? ?const struct efivar_operations *ops,
>>> - ? ? ? ? ? ? ? ? ?struct kobject *parent_kobj)
>>> +static int __init
>>> +register_efivars(struct efivars *efivars,
>>> + ? ? ? ? ? ? ?const struct efivar_operations *ops,
>>> + ? ? ? ? ? ? ?struct kobject *parent_kobj)
>>> ?{
>>> ? ? ? efi_status_t status = EFI_NOT_FOUND;
>>> ? ? ? efi_guid_t vendor_guid;
>>> @@ -1192,7 +1192,6 @@ out:
>>>
>>> ? ? ? return error;
>>> ?}
>>> -EXPORT_SYMBOL_GPL(register_efivars);
>>>
>>> ?static struct efivars __efivars;
>>> ?static struct efivar_operations ops;
>>> --- 3.4-rc7/include/linux/efi.h
>>> +++ 3.4-rc7-efivars/include/linux/efi.h
>>> @@ -655,11 +655,6 @@ struct efivars {
>>> ? ? ? struct pstore_info efi_pstore_info;
>>> ?};
>>>
>>> -int register_efivars(struct efivars *efivars,
>>> - ? ? ? ? ? ? ? ? ?const struct efivar_operations *ops,
>>> - ? ? ? ? ? ? ? ? ?struct kobject *parent_kobj);
>>> -void unregister_efivars(struct efivars *efivars);
>>> -
>>> ?#endif /* CONFIG_EFI_VARS */
>>>
>>> ?#endif /* _LINUX_EFI_H */
>>>
>>>
>>>
>>
>> --
>> Matt Domsch
>> Technology Strategist
>> Dell | Office of the CTO

2012-05-15 17:07:25

by Mike Waychison

[permalink] [raw]
Subject: Re: [PATCH, resend] efivars: remove stray exports

On Tue, May 15, 2012 at 5:55 AM, Matt Domsch <[email protected]> wrote:
> On Tue, May 15, 2012 at 07:05:08AM -0500, Jan Beulich wrote:
>> There's no in-tree consumer, and the way they are currently prototyped
>> it doesn't look like they're really usable from anywhere but the base
>> EFI implementation.
>
> Seems reasonable, copying Mike who created the code paths being
> modified here.

I'm using these in drivers/google/firmware/gsmi.c

>
>>
>> Signed-off-by: Jan Beulich <[email protected]>
>>
>> ---
>> ?drivers/firmware/efivars.c | ? 13 ++++++-------
>> ?include/linux/efi.h ? ? ? ?| ? ?5 -----
>> ?2 files changed, 6 insertions(+), 12 deletions(-)
>>
>> --- 3.4-rc7/drivers/firmware/efivars.c
>> +++ 3.4-rc7-efivars/drivers/firmware/efivars.c
>> @@ -1039,7 +1039,7 @@ efivar_create_sysfs_entry(struct efivars
>> ? ? ? return 0;
>> ?}
>>
>> -static int
>> +static int __init
>> ?create_efivars_bin_attributes(struct efivars *efivars)
>> ?{
>> ? ? ? struct bin_attribute *attr;
>> @@ -1098,7 +1098,7 @@ out_free:
>> ? ? ? return error;
>> ?}
>>
>> -void unregister_efivars(struct efivars *efivars)
>> +static void unregister_efivars(struct efivars *efivars)
>> ?{
>> ? ? ? struct efivar_entry *entry, *n;
>>
>> @@ -1116,11 +1116,11 @@ void unregister_efivars(struct efivars *
>> ? ? ? kfree(efivars->del_var);
>> ? ? ? kset_unregister(efivars->kset);
>> ?}
>> -EXPORT_SYMBOL_GPL(unregister_efivars);
>>
>> -int register_efivars(struct efivars *efivars,
>> - ? ? ? ? ? ? ? ? ?const struct efivar_operations *ops,
>> - ? ? ? ? ? ? ? ? ?struct kobject *parent_kobj)
>> +static int __init
>> +register_efivars(struct efivars *efivars,
>> + ? ? ? ? ? ? ?const struct efivar_operations *ops,
>> + ? ? ? ? ? ? ?struct kobject *parent_kobj)
>> ?{
>> ? ? ? efi_status_t status = EFI_NOT_FOUND;
>> ? ? ? efi_guid_t vendor_guid;
>> @@ -1192,7 +1192,6 @@ out:
>>
>> ? ? ? return error;
>> ?}
>> -EXPORT_SYMBOL_GPL(register_efivars);
>>
>> ?static struct efivars __efivars;
>> ?static struct efivar_operations ops;
>> --- 3.4-rc7/include/linux/efi.h
>> +++ 3.4-rc7-efivars/include/linux/efi.h
>> @@ -655,11 +655,6 @@ struct efivars {
>> ? ? ? struct pstore_info efi_pstore_info;
>> ?};
>>
>> -int register_efivars(struct efivars *efivars,
>> - ? ? ? ? ? ? ? ? ?const struct efivar_operations *ops,
>> - ? ? ? ? ? ? ? ? ?struct kobject *parent_kobj);
>> -void unregister_efivars(struct efivars *efivars);
>> -
>> ?#endif /* CONFIG_EFI_VARS */
>>
>> ?#endif /* _LINUX_EFI_H */
>>
>>
>>
>
> --
> Matt Domsch
> Technology Strategist
> Dell | Office of the CTO

2012-05-16 07:51:52

by Jan Beulich

[permalink] [raw]
Subject: Re: [PATCH, resend] efivars: remove stray exports

>>> On 15.05.12 at 19:02, Mike Waychison <[email protected]> wrote:
> On Tue, May 15, 2012 at 10:01 AM, Mike Waychison <[email protected]> wrote:
>> On Tue, May 15, 2012 at 5:55 AM, Matt Domsch <[email protected]> wrote:
>>> On Tue, May 15, 2012 at 07:05:08AM -0500, Jan Beulich wrote:
>>>> There's no in-tree consumer, and the way they are currently prototyped
>>>> it doesn't look like they're really usable from anywhere but the base
>>>> EFI implementation.
>>>
>>> Seems reasonable, copying Mike who created the code paths being
>>> modified here.
>>
>> I'm using these in drivers/google/firmware/gsmi.c
>>
>
> drivers/firmware/google/gsmi.c even (sorry, just starting my day...)

Oh - should have re-checked before re-sending (this must have
appeared after the original posting).

Jan