Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1312118

Re: [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables

From Jean Delvare <jdelvare@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables
Date 2016-01-19 12:10 +0100
Message-ID <qSCkG-6VX-3@gated-at.bofh.it> (permalink)
References <qSp47-5SG-9@gated-at.bofh.it> <qSpdL-6bN-7@gated-at.bofh.it>
Organization SUSE Linux

Show all headers | View raw


Hi Andy,

One more thing I just noticed...

On Mon, 18 Jan 2016 12:59:38 -0800, Andy Lutomirski wrote:
> @@ -372,20 +390,26 @@ static int __init dell_wmi_input_setup(void)
>  	dell_wmi_input_dev->phys = "wmi/input0";
>  	dell_wmi_input_dev->id.bustype = BUS_HOST;
>  
> -	if (dell_new_hk_type) {
> -		const struct key_entry *keymap = dell_wmi_prepare_new_keymap();
> -		if (!keymap) {
> -			err = -ENOMEM;
> -			goto err_free_dev;
> -		}
> +	err = dmi_walk(handle_dmi_entry, &dmi_results);
> +	if (err)
> +		goto err_free_dev;
> (...)
> @@ -431,7 +446,6 @@ static int __init dell_wmi_init(void)
>  		return -ENODEV;
>  	}
>  
> -	dmi_walk(find_hk_type, NULL);
>  
>  	err = dell_wmi_input_setup();
>  	if (err)

Before, in the absence of DMI support, the driver would load and assume
the old hotkey interface. After your change, the driver will fail to
load if DMI support is missing. This could, in theory, cause a
regression (although I would be very surprised if even the oldest
supported models don't implement DMI.)

If you want this patch to make it into stable, you probably should
stick to the original behavior and move that change (if you still
believe it is a good idea) to a separate patch, and at the same time
make DELL_WMI either select or depend on DMI. Many other platform/x86
drivers should do the same, BTW, but that's a separate topic.

-- 
Jean Delvare
SUSE L3 Support

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/3] dell-wmi: DMI misuse fixes Andy Lutomirski <luto@kernel.org> - 2016-01-18 22:00 +0100
  [PATCH v2 2/3] dell-wmi: Fix hotkey table size check Andy Lutomirski <luto@kernel.org> - 2016-01-18 22:10 +0100
    Re: [PATCH v2 2/3] dell-wmi: Fix hotkey table size check Jean Delvare <jdelvare@suse.de> - 2016-01-19 09:40 +0100
      Re: [PATCH v2 2/3] dell-wmi: Fix hotkey table size check Andy Lutomirski <luto@amacapital.net> - 2016-01-19 19:50 +0100
  [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables Andy Lutomirski <luto@kernel.org> - 2016-01-18 22:10 +0100
    Re: [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables Jean Delvare <jdelvare@suse.de> - 2016-01-19 09:50 +0100
    Re: [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables Jean Delvare <jdelvare@suse.de> - 2016-01-19 12:10 +0100
      Re: [PATCH v2 1/3] dell-wmi: Stop storing pointers to DMI tables Andy Lutomirski <luto@amacapital.net> - 2016-01-19 19:30 +0100
  [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return real error codes Andy Lutomirski <luto@kernel.org> - 2016-01-18 22:10 +0100
    Re: [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return  real error codes Jean Delvare <jdelvare@suse.de> - 2016-01-19 09:00 +0100
      Re: [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return real  error codes Pali Rohár <pali.rohar@gmail.com> - 2016-01-19 09:40 +0100
        Re: [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return real  error codes Pali Rohár <pali.rohar@gmail.com> - 2016-01-19 10:10 +0100
          Re: [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return  real error codes Jean Delvare <jdelvare@suse.de> - 2016-01-19 10:50 +0100
            Re: [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return real  error codes Andy Lutomirski <luto@amacapital.net> - 2016-01-20 01:00 +0100
        Re: [PATCH v2 3/3] dmi: Make dmi_walk and dmi_walk_early return  real error codes Jean Delvare <jdelvare@suse.de> - 2016-01-19 10:10 +0100

csiph-web